automatically set GOMEMLIMIT env variable

Signed-off-by: Pascal Sthamer <pascal+github@sthamer.xyz>
This commit is contained in:
Pascal Sthamer
2026-04-07 13:00:49 +02:00
parent 1279bb0949
commit d07ef7376a
8 changed files with 104 additions and 9 deletions
@@ -116,4 +116,10 @@ REGISTRY_URL: "{{ .Values.shuffle.appRegistry }}" # Used by app builder
{{- if .Values.backend.debug }}
DEBUG: "true"
{{- end }}
{{- if .Values.backend.autoGOMEMLIMIT }}
{{- $backendResources := (.Values.backend.resources | default (include "common.resources.preset" (dict "type" .Values.backend.resourcesPreset) | fromYaml)) -}}
{{- if and $backendResources $backendResources.limits $backendResources.limits.memory }}
GOMEMLIMIT: {{ include "shuffle.k8sMemoryLimitToGOMEMLIMIT" (dict "k8sMemoryLimit" $backendResources.limits.memory) | quote }}
{{- end }}
{{- end }}
{{- end -}}