Skip to content

Commit

Permalink
Bump the operator memory limit to 1Gi for larger deployments (elastic…
Browse files Browse the repository at this point in the history
  • Loading branch information
pebrc authored and naemono committed Jan 13, 2022
1 parent 48488f7 commit 6e5e09f
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion deploy/eck-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ imagePullSecrets: []
resources:
limits:
cpu: 1
memory: 512Mi
memory: 1Gi
requests:
cpu: 100m
memory: 150Mi
Expand Down
4 changes: 2 additions & 2 deletions docs/operating-eck/troubleshooting/common-problems.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ endif::[]

On very large Kubernetes clusters with many hundreds of resources (pods, secrets, config maps, and so on), the operator may fail to start with its pod getting killed with a `OOMKilled` message. This is an issue with the `controller-runtime` framework on top of which the operator is built. Even though the operator is only interested in the resources created by itself, the framework code needs to gather information about all relevant resources in the Kubernetes cluster in order to provide the filtered view of cluster state required by the operator. On very large clusters, this information gathering can use up a lot of memory and exceed the default resource limit defined for the operator pod.

The default link:https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory[memory limit] for the operator pod is set to 512 MiB. You can increase (or decrease) this limit to a value suited to your cluster as follows:
The default link:https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#meaning-of-memory[memory limit] for the operator pod is set to 1 Gi. You can increase (or decrease) this limit to a value suited to your cluster as follows:

[source,sh]
----
kubectl patch sts elastic-operator -n elastic-system -p '{"spec":{"template":{"spec":{"containers":[{"name":"manager", "resources":{"limits":{"memory":"768Mi"}}}]}}}}'
kubectl patch sts elastic-operator -n elastic-system -p '{"spec":{"template":{"spec":{"containers":[{"name":"manager", "resources":{"limits":{"memory":"2Gi"}}}]}}}}'
----


Expand Down
2 changes: 1 addition & 1 deletion hack/manifest-gen/testdata/kube116.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ imagePullSecrets: []
resources:
limits:
cpu: 1
memory: 512Mi
memory: 1Gi
requests:
cpu: 100m
memory: 150Mi
Expand Down
2 changes: 1 addition & 1 deletion hack/manifest-gen/testdata/no_defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ imagePullSecrets:
resources:
limits:
cpu: 1
memory: 512Mi
memory: 1Gi
requests:
cpu: 100m
memory: 150Mi
Expand Down
2 changes: 1 addition & 1 deletion hack/operatorhub/templates/csv.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ spec:
resources:
limits:
cpu: 1
memory: 512Mi
memory: 1Gi
requests:
cpu: 100m
memory: 150Mi
Expand Down

0 comments on commit 6e5e09f

Please sign in to comment.