From 37055af06edf1c0aa6dab36a0ae2111e8a32836a Mon Sep 17 00:00:00 2001 From: Tao Li Date: Mon, 25 Nov 2024 12:06:49 +0800 Subject: [PATCH] port the fix that avoid setting configmap name with config.secret=true Signed-off-by: Tao Li --- .../templates/deployment.yaml | 9 ++++++--- .../templates/deployment.yaml | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/charts/edb-postgres-distributed-for-kubernetes/charts/edb-postgres-for-kubernetes-lts/templates/deployment.yaml b/charts/edb-postgres-distributed-for-kubernetes/charts/edb-postgres-for-kubernetes-lts/templates/deployment.yaml index 146ed65..14d4ee4 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/charts/edb-postgres-for-kubernetes-lts/templates/deployment.yaml +++ b/charts/edb-postgres-distributed-for-kubernetes/charts/edb-postgres-for-kubernetes-lts/templates/deployment.yaml @@ -53,9 +53,12 @@ spec: - args: - controller - --leader-elect - {{- with .Values.config.name }} - - --config-map-name={{ . }} - - --secret-name={{ . }} + {{- if .Values.config.name }} + {{- if not .Values.config.secret }} + - --config-map-name={{ .Values.config.name }} + {{- else }} + - --secret-name={{ .Values.config.name }} + {{- end }} {{- end }} - --webhook-port={{ .Values.webhook.port }} {{- range .Values.additionalArgs }} diff --git a/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml b/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml index a1095b7..d5da064 100644 --- a/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml +++ b/charts/edb-postgres-distributed-for-kubernetes/templates/deployment.yaml @@ -51,9 +51,12 @@ spec: - args: - controller - --leader-elect - {{- with .Values.config.name }} - - --config-map-name={{ . }} - - --secret-name={{ . }} + {{- if .Values.config.name }} + {{- if not .Values.config.secret }} + - --config-map-name={{ .Values.config.name }} + {{- else }} + - --secret-name={{ .Values.config.name }} + {{- end }} {{- end }} - --webhook-port={{ .Values.webhook.port }} {{- range .Values.additionalArgs }}