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 }}