Skip to content

Commit 15714f5

Browse files
committed
Set GOMEMLIMIT from container memory limit
Without GOMEMLIMIT the Go GC is unaware of the container limit and may let the heap grow until the kernel OOM-kills the process.
1 parent 441452b commit 15714f5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

charts/openstack-hypervisor-operator/templates/deployment.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ spec:
4747
value: {{ quote .Values.controllerManager.manager.env.labelSelector }}
4848
- name: KUBERNETES_CLUSTER_DOMAIN
4949
value: {{ quote .Values.kubernetesClusterDomain }}
50+
- name: GOMEMLIMIT
51+
valueFrom:
52+
resourceFieldRef:
53+
resource: limits.memory
5054
image: {{ .Values.controllerManager.manager.image.repository }}:{{ .Chart.AppVersion }}
5155
livenessProbe:
5256
httpGet:

0 commit comments

Comments
 (0)