From cc0583f27505067125961fa05b62651f570d7d9a Mon Sep 17 00:00:00 2001 From: David Sabatie Date: Fri, 13 Aug 2021 14:35:38 +0200 Subject: [PATCH 1/3] feat: Add extraEnvs to operator-ui helm chart fix: Not working if extraEnvs is empty --- .../templates/deployment.yaml | 3 ++ charts/postgres-operator-ui/values.yaml | 28 ++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/charts/postgres-operator-ui/templates/deployment.yaml b/charts/postgres-operator-ui/templates/deployment.yaml index 91c27fee5..8a5036fa9 100644 --- a/charts/postgres-operator-ui/templates/deployment.yaml +++ b/charts/postgres-operator-ui/templates/deployment.yaml @@ -76,3 +76,6 @@ spec: "11" ] } + {{- if .Values.extraEnvs }} + {{- .Values.extraEnvs | toYaml | nindent 12 }} + {{- end }} diff --git a/charts/postgres-operator-ui/values.yaml b/charts/postgres-operator-ui/values.yaml index c9f521464..379ff55fa 100644 --- a/charts/postgres-operator-ui/values.yaml +++ b/charts/postgres-operator-ui/values.yaml @@ -48,6 +48,31 @@ envs: teams: - "acid" +extraEnvs: + [] + # Exemple of settings to make snapshot view working in the ui when using AWS + # - name: WALE_S3_ENDPOINT + # value: https+path://s3.us-east-1.amazonaws.com:443 + # - name: SPILO_S3_BACKUP_PREFIX + # value: spilo/ + # - name: AWS_ACCESS_KEY_ID + # valueFrom: + # secretKeyRef: + # name: + # key: AWS_ACCESS_KEY_ID + # - name: AWS_SECRET_ACCESS_KEY + # valueFrom: + # secretKeyRef: + # name: + # key: AWS_SECRET_ACCESS_KEY + # - name: AWS_DEFAULT_REGION + # valueFrom: + # secretKeyRef: + # name: + # key: AWS_DEFAULT_REGION + # - name: SPILO_S3_BACKUP_BUCKET + # value: + # configure UI service service: type: "ClusterIP" @@ -59,7 +84,8 @@ service: # configure UI ingress. If needed: "enabled: true" ingress: enabled: false - annotations: {} + annotations: + {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" hosts: From 495c1df1e02f835bed6349d2ac3cfc432ee02ea0 Mon Sep 17 00:00:00 2001 From: David Sabatie Date: Tue, 17 Aug 2021 17:13:11 +0200 Subject: [PATCH 2/3] chore: Add env variables exemple to exemple manifest --- ui/manifests/deployment.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ui/manifests/deployment.yaml b/ui/manifests/deployment.yaml index 464168ea4..21a87a31f 100644 --- a/ui/manifests/deployment.yaml +++ b/ui/manifests/deployment.yaml @@ -71,3 +71,25 @@ spec: "11" ] } + # Exemple of settings to make snapshot view working in the ui when using AWS + # - name: WALE_S3_ENDPOINT + # value: https+path://s3.us-east-1.amazonaws.com:443 + # - name: SPILO_S3_BACKUP_PREFIX + # value: spilo/ + # - name: AWS_ACCESS_KEY_ID + # valueFrom: + # secretKeyRef: + # name: + # key: AWS_ACCESS_KEY_ID + # - name: AWS_SECRET_ACCESS_KEY + # valueFrom: + # secretKeyRef: + # name: + # key: AWS_SECRET_ACCESS_KEY + # - name: AWS_DEFAULT_REGION + # valueFrom: + # secretKeyRef: + # name: + # key: AWS_DEFAULT_REGION + # - name: SPILO_S3_BACKUP_BUCKET + # value: From ad0f4b0aac5f2b0d9567dd820b513eb96758a925 Mon Sep 17 00:00:00 2001 From: David Sabatie Date: Wed, 18 Aug 2021 17:29:00 +0200 Subject: [PATCH 3/3] docs: Add comments on ui extraenvs --- charts/postgres-operator-ui/values.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/charts/postgres-operator-ui/values.yaml b/charts/postgres-operator-ui/values.yaml index 379ff55fa..18c30d0a6 100644 --- a/charts/postgres-operator-ui/values.yaml +++ b/charts/postgres-operator-ui/values.yaml @@ -48,6 +48,11 @@ envs: teams: - "acid" +# 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