From 4a7fba45425c1be8459aecf5e211762be94b6e6d Mon Sep 17 00:00:00 2001 From: Alexander Lomov Date: Thu, 12 Dec 2024 16:42:40 +0300 Subject: [PATCH] fix: disabling automatic creation of adminPassword and adminSecret when the admin panel is disabled --- charts/centrifugo/templates/secret.yaml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/charts/centrifugo/templates/secret.yaml b/charts/centrifugo/templates/secret.yaml index 3c17b96..dd83b67 100644 --- a/charts/centrifugo/templates/secret.yaml +++ b/charts/centrifugo/templates/secret.yaml @@ -17,15 +17,17 @@ data: {{- if .Values.secrets.grpcApiKey }} grpcApiKey: {{ .Values.secrets.grpcApiKey | b64enc | quote }} {{- end }} - {{- if .Values.secrets.adminPassword }} - adminPassword: {{ .Values.secrets.adminPassword | b64enc | quote }} - {{- else }} - adminPassword: {{ randAlphaNum 12 | b64enc | quote }} - {{- end }} - {{- if .Values.secrets.adminSecret }} - adminSecret: {{ .Values.secrets.adminSecret | b64enc | quote }} - {{- else }} - adminSecret: {{ randAlphaNum 24 | b64enc | quote }} + {{- if.Values.config.admin }} + {{- if.Values.secrets.adminPassword }} + adminPassword: {{.Values.secrets.adminPassword | b64enc | quote }} + {{- else }} + adminPassword: {{ randAlphaNum 12 | b64enc | quote }} + {{- end }} + {{- if.Values.secrets.adminSecret }} + adminSecret: {{.Values.secrets.adminSecret | b64enc | quote }} + {{- else }} + adminSecret: {{ randAlphaNum 24 | b64enc | quote }} + {{- end }} {{- end }} {{- if .Values.secrets.redisAddress }} redisAddress: {{ .Values.secrets.redisAddress | b64enc | quote }}