Skip to content

Commit e7fd594

Browse files
authored
remove resource limit (#1310)
Signed-off-by: root <[email protected]>
1 parent b0f8334 commit e7fd594

33 files changed

+7
-268
lines changed

doc/event-exporter/values.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ resources: {}
3232
# choice for the user. This also increases chances charts run on environments with little
3333
# resources, such as Minikube. If you do want to specify resources, uncomment the following
3434
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
35-
# limits:
36-
# cpu: 100m
37-
# memory: 128Mi
3835
# requests:
3936
# cpu: 100m
4037
# memory: 128Mi

doc/simulation/scenario/Scenario4: kafka_metrics.md

-2
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,6 @@
5757
...
5858
replicas: 3
5959
resources:
60-
limits:
61-
memory: 4Gi
6260
requests:
6361
cpu: 25m
6462
memory: 128Mi

doc/simulation/scenario/Scenario5: postgres_metrics.md

-2
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,6 @@
4848
imagePullPolicy: Always
4949
name: multicluster-global-hub-postgresql
5050
resources:
51-
limits:
52-
memory: 4Gi
5351
requests:
5452
cpu: 25m
5553
memory: 128Mi

operator/api/operator/v1alpha4/multiclusterglobalhub_types.go

-4
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,6 @@ type CommonSpec struct {
140140
// ResourceRequirements copied from corev1.ResourceRequirements
141141
// We do not need to support ResourceClaim
142142
type ResourceRequirements struct {
143-
// Limits describes the maximum amount of compute resources allowed.
144-
// For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
145-
// +optional
146-
Limits corev1.ResourceList `json:"limits,omitempty"`
147143
// Requests describes the minimum amount of compute resources required.
148144
// If requests are omitted for a container, it defaults to the specified limits.
149145
// If there are no specified limits, it defaults to an implementation-defined value.

operator/api/operator/v1alpha4/zz_generated.deepcopy.go

-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

operator/bundle/manifests/multicluster-global-hub-operator.clusterserviceversion.yaml

-2
Original file line numberDiff line numberDiff line change
@@ -806,8 +806,6 @@ spec:
806806
initialDelaySeconds: 5
807807
periodSeconds: 10
808808
resources:
809-
limits:
810-
memory: 200Mi
811809
requests:
812810
cpu: 1m
813811
memory: 100Mi

operator/bundle/manifests/operator.open-cluster-management.io_multiclusterglobalhubs.yaml

-55
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,6 @@ spec:
6666
resources:
6767
description: Compute Resources required by this component
6868
properties:
69-
limits:
70-
additionalProperties:
71-
anyOf:
72-
- type: integer
73-
- type: string
74-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
75-
x-kubernetes-int-or-string: true
76-
description: |-
77-
Limits describes the maximum amount of compute resources allowed.
78-
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
79-
type: object
8069
requests:
8170
additionalProperties:
8271
anyOf:
@@ -98,17 +87,6 @@ spec:
9887
resources:
9988
description: Compute Resources required by this component
10089
properties:
101-
limits:
102-
additionalProperties:
103-
anyOf:
104-
- type: integer
105-
- type: string
106-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
107-
x-kubernetes-int-or-string: true
108-
description: |-
109-
Limits describes the maximum amount of compute resources allowed.
110-
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
111-
type: object
11290
requests:
11391
additionalProperties:
11492
anyOf:
@@ -130,17 +108,6 @@ spec:
130108
resources:
131109
description: Compute Resources required by this component
132110
properties:
133-
limits:
134-
additionalProperties:
135-
anyOf:
136-
- type: integer
137-
- type: string
138-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
139-
x-kubernetes-int-or-string: true
140-
description: |-
141-
Limits describes the maximum amount of compute resources allowed.
142-
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
143-
type: object
144111
requests:
145112
additionalProperties:
146113
anyOf:
@@ -163,17 +130,6 @@ spec:
163130
resources:
164131
description: Compute Resources required by this component
165132
properties:
166-
limits:
167-
additionalProperties:
168-
anyOf:
169-
- type: integer
170-
- type: string
171-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
172-
x-kubernetes-int-or-string: true
173-
description: |-
174-
Limits describes the maximum amount of compute resources allowed.
175-
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
176-
type: object
177133
requests:
178134
additionalProperties:
179135
anyOf:
@@ -195,17 +151,6 @@ spec:
195151
resources:
196152
description: Compute Resources required by this component
197153
properties:
198-
limits:
199-
additionalProperties:
200-
anyOf:
201-
- type: integer
202-
- type: string
203-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
204-
x-kubernetes-int-or-string: true
205-
description: |-
206-
Limits describes the maximum amount of compute resources allowed.
207-
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
208-
type: object
209154
requests:
210155
additionalProperties:
211156
anyOf:

operator/config/crd/bases/operator.open-cluster-management.io_multiclusterglobalhubs.yaml

-55
Original file line numberDiff line numberDiff line change
@@ -66,17 +66,6 @@ spec:
6666
resources:
6767
description: Compute Resources required by this component
6868
properties:
69-
limits:
70-
additionalProperties:
71-
anyOf:
72-
- type: integer
73-
- type: string
74-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
75-
x-kubernetes-int-or-string: true
76-
description: |-
77-
Limits describes the maximum amount of compute resources allowed.
78-
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
79-
type: object
8069
requests:
8170
additionalProperties:
8271
anyOf:
@@ -98,17 +87,6 @@ spec:
9887
resources:
9988
description: Compute Resources required by this component
10089
properties:
101-
limits:
102-
additionalProperties:
103-
anyOf:
104-
- type: integer
105-
- type: string
106-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
107-
x-kubernetes-int-or-string: true
108-
description: |-
109-
Limits describes the maximum amount of compute resources allowed.
110-
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
111-
type: object
11290
requests:
11391
additionalProperties:
11492
anyOf:
@@ -130,17 +108,6 @@ spec:
130108
resources:
131109
description: Compute Resources required by this component
132110
properties:
133-
limits:
134-
additionalProperties:
135-
anyOf:
136-
- type: integer
137-
- type: string
138-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
139-
x-kubernetes-int-or-string: true
140-
description: |-
141-
Limits describes the maximum amount of compute resources allowed.
142-
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
143-
type: object
144111
requests:
145112
additionalProperties:
146113
anyOf:
@@ -163,17 +130,6 @@ spec:
163130
resources:
164131
description: Compute Resources required by this component
165132
properties:
166-
limits:
167-
additionalProperties:
168-
anyOf:
169-
- type: integer
170-
- type: string
171-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
172-
x-kubernetes-int-or-string: true
173-
description: |-
174-
Limits describes the maximum amount of compute resources allowed.
175-
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
176-
type: object
177133
requests:
178134
additionalProperties:
179135
anyOf:
@@ -195,17 +151,6 @@ spec:
195151
resources:
196152
description: Compute Resources required by this component
197153
properties:
198-
limits:
199-
additionalProperties:
200-
anyOf:
201-
- type: integer
202-
- type: string
203-
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
204-
x-kubernetes-int-or-string: true
205-
description: |-
206-
Limits describes the maximum amount of compute resources allowed.
207-
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
208-
type: object
209154
requests:
210155
additionalProperties:
211156
anyOf:

operator/config/default/manager_auth_proxy_patch.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ spec:
2121
protocol: TCP
2222
name: https
2323
resources:
24-
limits:
25-
cpu: 500m
26-
memory: 128Mi
2724
requests:
2825
cpu: 5m
2926
memory: 64Mi

operator/config/manager/manager.yaml

-4
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,6 @@ spec:
7777
# TODO(user): Configure the resources accordingly based on the project requirements.
7878
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
7979
resources:
80-
limits:
81-
# cpu: 50m
82-
# https://home.robusta.dev/blog/stop-using-cpu-limits
83-
memory: 200Mi
8480
requests:
8581
cpu: 1m
8682
memory: 100Mi

operator/pkg/config/addon_config.go

-3
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ type ManifestsConfig struct {
128128
}
129129

130130
type Resources struct {
131-
// Limits corresponds to the JSON schema field "limits".
132-
Limits *apiextensions.JSON `json:"limits,omitempty"`
133-
134131
// Requests corresponds to the JSON schema field "requests".
135132
Requests *apiextensions.JSON `json:"requests,omitempty"`
136133
}

operator/pkg/controllers/agent/manifests/templates/agent/multicluster-global-hub-agent-deployment.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,6 @@ spec:
2121
- name: multicluster-global-hub-agent
2222
image: {{ .HoHAgentImage }}
2323
resources:
24-
{{- if .Resources.Limits }}
25-
limits:
26-
{{- range $key, $value := .Resources.Limits }}
27-
{{$key}}: {{$value}}
28-
{{- end }}
29-
{{- end }}
3024
{{- if .Resources.Requests }}
3125
requests:
3226
{{- range $key, $value := .Resources.Requests }}

operator/pkg/controllers/grafana/manifests/deployment.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ spec:
5555
fieldRef:
5656
fieldPath: status.podIP
5757
resources:
58-
{{- if .Resources.Limits }}
59-
limits:
60-
{{- range $key, $value := .Resources.Limits }}
61-
{{$key}}: {{.ToUnstructured}}
62-
{{- end }}
63-
{{- end }}
6458
{{- if .Resources.Requests }}
6559
requests:
6660
{{- range $key, $value := .Resources.Requests }}

operator/pkg/controllers/manager/manifests/deployment.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ spec:
2020
- name: multicluster-global-hub-manager
2121
image: {{.Image}}
2222
resources:
23-
{{- if .Resources.Limits }}
24-
limits:
25-
{{- range $key, $value := .Resources.Limits }}
26-
{{$key}}: {{.ToUnstructured}}
27-
{{- end }}
28-
{{- end }}
2923
{{- if .Resources.Requests }}
3024
requests:
3125
{{- range $key, $value := .Resources.Requests }}

operator/pkg/controllers/storage/manifests.sts/postgres-statefulset.yaml

-6
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ spec:
5151
initialDelaySeconds: 5
5252
timeoutSeconds: 1
5353
resources:
54-
{{- if .Resources.Limits }}
55-
limits:
56-
{{- range $key, $value := .Resources.Limits }}
57-
{{$key}}: {{.ToUnstructured}}
58-
{{- end }}
59-
{{- end }}
6054
{{- if .Resources.Requests }}
6155
requests:
6256
{{- range $key, $value := .Resources.Requests }}

operator/pkg/controllers/transporter/protocol/strimzi_transporter_test.go

-9
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ func TestNewKafkaCluster(t *testing.T) {
118118
}
119119
],
120120
"resources": {
121-
"limits": {
122-
"memory": "4Gi"
123-
},
124121
"requests": {
125122
"cpu": "25m",
126123
"memory": "128Mi"
@@ -191,9 +188,6 @@ func TestNewKafkaCluster(t *testing.T) {
191188
}
192189
],
193190
"resources": {
194-
"limits": {
195-
"memory": "4Gi"
196-
},
197191
"requests": {
198192
"cpu": "25m",
199193
"memory": "128Mi"
@@ -278,9 +272,6 @@ func TestNewKafkaCluster(t *testing.T) {
278272
}
279273
],
280274
"resources": {
281-
"limits": {
282-
"memory": "4Gi"
283-
},
284275
"requests": {
285276
"cpu": "25m",
286277
"memory": "128Mi"

operator/pkg/deployer/testdata/typedv1/deployment.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ spec:
3636
path: /
3737
port: http
3838
resources:
39-
limits:
40-
cpu: 500m
41-
memory: 128Mi
4239
requests:
4340
cpu: 250m
4441
memory: 64Mi

operator/pkg/deployer/testdata/typedv1/statefulset.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ spec:
3636
path: /
3737
port: http
3838
resources:
39-
limits:
40-
cpu: 500m
41-
memory: 128Mi
4239
requests:
4340
cpu: 250m
4441
memory: 64Mi

operator/pkg/deployer/testdata/typedv2/deployment.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ spec:
3636
path: /
3737
port: http
3838
resources:
39-
limits:
40-
cpu: 500m
41-
memory: 128Mi
4239
requests:
4340
cpu: 250m
4441
memory: 64Mi

operator/pkg/deployer/testdata/typedv2/statefulset.yaml

-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ spec:
3636
path: /
3737
port: http
3838
resources:
39-
limits:
40-
cpu: 500m
41-
memory: 128Mi
4239
requests:
4340
cpu: 250m
4441
memory: 64Mi

0 commit comments

Comments
 (0)