Skip to content

Commit 772515b

Browse files
committed
feat: Add extraEnvs to operator helm chart
Signed-off-by: Cédric de Saint Martin <[email protected]>
1 parent 2ef7d58 commit 772515b

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

charts/postgres-operator/templates/deployment.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ spec:
5252
{{- if .Values.controllerID.create }}
5353
- name: CONTROLLER_ID
5454
value: {{ template "postgres-operator.controllerID" . }}
55+
{{- end }}
56+
{{- if .Values.extraEnvs }}
57+
{{- .Values.extraEnvs | toYaml | nindent 12 }}
5558
{{- end }}
5659
resources:
5760
{{ toYaml .Values.resources | indent 10 }}

charts/postgres-operator/values.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ priorityClassName: ""
478478
# priority class for database pods
479479
podPriorityClassName:
480480
# If create is false with no name set, no podPriorityClassName is specified.
481-
# Hence, the pod priorityClass is the one with globalDefault set.
481+
# Hence, the pod priorityClass is the one with globalDefault set.
482482
# If there is no PriorityClass with globalDefault set, the priority of Pods with no priorityClassName is zero.
483483
create: true
484484
# If not set a name is generated using the fullname template and "-pod" suffix
@@ -504,6 +504,24 @@ readinessProbe:
504504
initialDelaySeconds: 5
505505
periodSeconds: 10
506506

507+
# configure extra environment variables
508+
# Extra environment variables are writen in kubernetes format and added "as is" to the pod's env variables
509+
# https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/
510+
# https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables
511+
extraEnvs:
512+
[]
513+
# Exemple of settings maximum amount of memory / cpu that can be used by go process (to match resources.limits)
514+
# - name: MY_VAR
515+
# value: my-value
516+
# - name: GOMAXPROCS
517+
# valueFrom:
518+
# resourceFieldRef:
519+
# resource: limits.cpu
520+
# - name: GOMEMLIMIT
521+
# valueFrom:
522+
# resourceFieldRef:
523+
# resource: limits.memory
524+
507525
# Affinity for pod assignment
508526
# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
509527
affinity: {}

0 commit comments

Comments
 (0)