Skip to content

Commit b98dfaf

Browse files
committed
feat: Add extraEnvs to operator helm chart
Signed-off-by: Cédric de Saint Martin <cdesaintmartin@wiremind.io>
1 parent 2ef7d58 commit b98dfaf

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-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: 20 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,25 @@ readinessProbe:
504504
initialDelaySeconds: 5
505505
periodSeconds: 10
506506

507+
# configure extra ENVs
508+
# Extra ENVs 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+
# UI specific env variables can be found here: https://github.com/zalando/postgres-operator/blob/master/ui/operator_ui/main.py
512+
extraEnvs:
513+
[]
514+
# Exemple of settings to make snapshot view working in the ui when using AWS
515+
# - name: MY_VAR
516+
# value: my-value
517+
# - name: GOMAXPROCS
518+
# valueFrom:
519+
# resourceFieldRef:
520+
# resource: limits.cpu
521+
# - name: GOMEMLIMIT
522+
# valueFrom:
523+
# resourceFieldRef:
524+
# resource: limits.memory
525+
507526
# Affinity for pod assignment
508527
# Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity
509528
affinity: {}

0 commit comments

Comments
 (0)