Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[helm] Set GOMAXPROCS and GOMEMLIMIT environment variables #1528

Merged
merged 2 commits into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 17 additions & 4 deletions helm/sealed-secrets/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ spec:
{{- end }}
- --privatekey-annotations
- {{ trimSuffix "," $privatekeyAnnotations | quote }}
{{- end }}
{{- end }}
{{- if $.Values.privateKeyLabels }}
{{- $privateKeyLabels := ""}}
{{- range $k, $v := $.Values.privateKeyLabels }}
Expand All @@ -132,6 +132,19 @@ spec:
{{- end }}
image: {{ printf "%s/%s:%s" .Values.image.registry .Values.image.repository .Values.image.tag }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- if (.Values.resources.limits).cpu }}
- name: GOMAXPROCS
valueFrom:
resourceFieldRef:
resource: limits.cpu
{{- end }}
{{- if (.Values.resources.limits).memory }}
- name: GOMEMLIMIT
valueFrom:
resourceFieldRef:
resource: limits.memory
{{- end }}
ports:
- containerPort: 8080
name: http
Expand Down Expand Up @@ -168,13 +181,13 @@ spec:
{{- end }}
volumeMounts:
{{- if .Values.additionalVolumeMounts }}
{{- toYaml .Values.additionalVolumeMounts | nindent 12 }}
{{- toYaml .Values.additionalVolumeMounts | nindent 12 }}
{{- end }}
- mountPath: /tmp
name: tmp
volumes:
volumes:
{{- if .Values.additionalVolumes }}
{{- toYaml .Values.additionalVolumes | nindent 8 }}
{{- toYaml .Values.additionalVolumes | nindent 8 }}
{{- end }}
- name: tmp
emptyDir: {}
Expand Down
Loading