Skip to content

Commit

Permalink
remove resource limit
Browse files Browse the repository at this point in the history
Signed-off-by: root <[email protected]>
  • Loading branch information
ldpliu committed Jan 3, 2025
1 parent e332323 commit 0b11bd8
Show file tree
Hide file tree
Showing 32 changed files with 7 additions and 265 deletions.
3 changes: 0 additions & 3 deletions doc/event-exporter/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ resources: {}
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
Expand Down
2 changes: 0 additions & 2 deletions doc/simulation/scenario/Scenario4: kafka_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@
...
replicas: 3
resources:
limits:
memory: 4Gi
requests:
cpu: 25m
memory: 128Mi
Expand Down
2 changes: 0 additions & 2 deletions doc/simulation/scenario/Scenario5: postgres_metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
imagePullPolicy: Always
name: multicluster-global-hub-postgresql
resources:
limits:
memory: 4Gi
requests:
cpu: 25m
memory: 128Mi
Expand Down
4 changes: 0 additions & 4 deletions operator/api/operator/v1alpha4/multiclusterglobalhub_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,6 @@ type CommonSpec struct {
// ResourceRequirements copied from corev1.ResourceRequirements
// We do not need to support ResourceClaim
type ResourceRequirements struct {
// Limits describes the maximum amount of compute resources allowed.
// For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
// +optional
Limits corev1.ResourceList `json:"limits,omitempty"`
// Requests describes the minimum amount of compute resources required.
// If requests are omitted for a container, it defaults to the specified limits.
// If there are no specified limits, it defaults to an implementation-defined value.
Expand Down
7 changes: 0 additions & 7 deletions operator/api/operator/v1alpha4/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -806,8 +806,6 @@ spec:
initialDelaySeconds: 5
periodSeconds: 10
resources:
limits:
memory: 200Mi
requests:
cpu: 1m
memory: 100Mi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ spec:
resources:
description: Compute Resources required by this component
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
Expand All @@ -98,17 +87,6 @@ spec:
resources:
description: Compute Resources required by this component
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
Expand All @@ -130,17 +108,6 @@ spec:
resources:
description: Compute Resources required by this component
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
Expand All @@ -163,17 +130,6 @@ spec:
resources:
description: Compute Resources required by this component
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
Expand All @@ -195,17 +151,6 @@ spec:
resources:
description: Compute Resources required by this component
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,6 @@ spec:
resources:
description: Compute Resources required by this component
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
Expand All @@ -98,17 +87,6 @@ spec:
resources:
description: Compute Resources required by this component
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
Expand All @@ -130,17 +108,6 @@ spec:
resources:
description: Compute Resources required by this component
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
Expand All @@ -163,17 +130,6 @@ spec:
resources:
description: Compute Resources required by this component
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
Expand All @@ -195,17 +151,6 @@ spec:
resources:
description: Compute Resources required by this component
properties:
limits:
additionalProperties:
anyOf:
- type: integer
- type: string
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
x-kubernetes-int-or-string: true
description: |-
Limits describes the maximum amount of compute resources allowed.
For more information, see: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
type: object
requests:
additionalProperties:
anyOf:
Expand Down
3 changes: 0 additions & 3 deletions operator/config/default/manager_auth_proxy_patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ spec:
protocol: TCP
name: https
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 5m
memory: 64Mi
Expand Down
4 changes: 0 additions & 4 deletions operator/config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ spec:
# TODO(user): Configure the resources accordingly based on the project requirements.
# More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
resources:
limits:
# cpu: 50m
# https://home.robusta.dev/blog/stop-using-cpu-limits
memory: 200Mi
requests:
cpu: 1m
memory: 100Mi
Expand Down
3 changes: 0 additions & 3 deletions operator/pkg/config/addon_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ type ManifestsConfig struct {
}

type Resources struct {
// Limits corresponds to the JSON schema field "limits".
Limits *apiextensions.JSON `json:"limits,omitempty"`

// Requests corresponds to the JSON schema field "requests".
Requests *apiextensions.JSON `json:"requests,omitempty"`
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ spec:
- name: multicluster-global-hub-agent
image: {{ .HoHAgentImage }}
resources:
{{- if .Resources.Limits }}
limits:
{{- range $key, $value := .Resources.Limits }}
{{$key}}: {{$value}}
{{- end }}
{{- end }}
{{- if .Resources.Requests }}
requests:
{{- range $key, $value := .Resources.Requests }}
Expand Down
6 changes: 0 additions & 6 deletions operator/pkg/controllers/grafana/manifests/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ spec:
fieldRef:
fieldPath: status.podIP
resources:
{{- if .Resources.Limits }}
limits:
{{- range $key, $value := .Resources.Limits }}
{{$key}}: {{.ToUnstructured}}
{{- end }}
{{- end }}
{{- if .Resources.Requests }}
requests:
{{- range $key, $value := .Resources.Requests }}
Expand Down
6 changes: 0 additions & 6 deletions operator/pkg/controllers/manager/manifests/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,6 @@ spec:
- name: multicluster-global-hub-manager
image: {{.Image}}
resources:
{{- if .Resources.Limits }}
limits:
{{- range $key, $value := .Resources.Limits }}
{{$key}}: {{.ToUnstructured}}
{{- end }}
{{- end }}
{{- if .Resources.Requests }}
requests:
{{- range $key, $value := .Resources.Requests }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,6 @@ spec:
initialDelaySeconds: 5
timeoutSeconds: 1
resources:
{{- if .Resources.Limits }}
limits:
{{- range $key, $value := .Resources.Limits }}
{{$key}}: {{.ToUnstructured}}
{{- end }}
{{- end }}
{{- if .Resources.Requests }}
requests:
{{- range $key, $value := .Resources.Requests }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ func TestNewKafkaCluster(t *testing.T) {
}
],
"resources": {
"limits": {
"memory": "4Gi"
},
"requests": {
"cpu": "25m",
"memory": "128Mi"
Expand Down Expand Up @@ -191,9 +188,6 @@ func TestNewKafkaCluster(t *testing.T) {
}
],
"resources": {
"limits": {
"memory": "4Gi"
},
"requests": {
"cpu": "25m",
"memory": "128Mi"
Expand Down Expand Up @@ -278,9 +272,6 @@ func TestNewKafkaCluster(t *testing.T) {
}
],
"resources": {
"limits": {
"memory": "4Gi"
},
"requests": {
"cpu": "25m",
"memory": "128Mi"
Expand Down
3 changes: 0 additions & 3 deletions operator/pkg/deployer/testdata/typedv1/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ spec:
path: /
port: http
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 250m
memory: 64Mi
Expand Down
3 changes: 0 additions & 3 deletions operator/pkg/deployer/testdata/typedv1/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ spec:
path: /
port: http
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 250m
memory: 64Mi
Expand Down
3 changes: 0 additions & 3 deletions operator/pkg/deployer/testdata/typedv2/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ spec:
path: /
port: http
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 250m
memory: 64Mi
Expand Down
3 changes: 0 additions & 3 deletions operator/pkg/deployer/testdata/typedv2/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ spec:
path: /
port: http
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 250m
memory: 64Mi
Expand Down
Loading

0 comments on commit 0b11bd8

Please sign in to comment.