From d6bed06d011528a31336be294d1089be5e2895b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20de=20Saint=20Martin?= Date: Tue, 25 Jun 2024 14:44:15 +0200 Subject: [PATCH] feat: Add extraEnvs to operator helm chart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Cédric de Saint Martin --- .../templates/deployment.yaml | 3 +++ charts/postgres-operator/values.yaml | 21 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/charts/postgres-operator/templates/deployment.yaml b/charts/postgres-operator/templates/deployment.yaml index 1752cb397..ddc3f6a0a 100644 --- a/charts/postgres-operator/templates/deployment.yaml +++ b/charts/postgres-operator/templates/deployment.yaml @@ -52,6 +52,9 @@ spec: {{- if .Values.controllerID.create }} - name: CONTROLLER_ID value: {{ template "postgres-operator.controllerID" . }} + {{- end }} + {{- if .Values.extraEnvs }} + {{- .Values.extraEnvs | toYaml | nindent 12 }} {{- end }} resources: {{ toYaml .Values.resources | indent 10 }} diff --git a/charts/postgres-operator/values.yaml b/charts/postgres-operator/values.yaml index 5700ff783..1f04be19d 100644 --- a/charts/postgres-operator/values.yaml +++ b/charts/postgres-operator/values.yaml @@ -478,7 +478,7 @@ priorityClassName: "" # priority class for database pods podPriorityClassName: # If create is false with no name set, no podPriorityClassName is specified. - # Hence, the pod priorityClass is the one with globalDefault set. + # Hence, the pod priorityClass is the one with globalDefault set. # If there is no PriorityClass with globalDefault set, the priority of Pods with no priorityClassName is zero. create: true # If not set a name is generated using the fullname template and "-pod" suffix @@ -504,6 +504,25 @@ readinessProbe: initialDelaySeconds: 5 periodSeconds: 10 +# configure extra UI ENVs +# Extra ENVs are writen in kubenertes format and added "as is" to the pod's env variables +# https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/ +# https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables +# UI specific env variables can be found here: https://github.com/zalando/postgres-operator/blob/master/ui/operator_ui/main.py +extraEnvs: + [] + # Exemple of settings to make snapshot view working in the ui when using AWS + # - name: MY_VAR + # value: my-value + # - name: GOMAXPROCS + # valueFrom: + # resourceFieldRef: + # resource: limits.cpu + # - name: GOMEMLIMIT + # valueFrom: + # resourceFieldRef: + # resource: limits.memory + # Affinity for pod assignment # Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity affinity: {}