From eb8099ff89eaca72cc9051f440d817cfd0e24084 Mon Sep 17 00:00:00 2001 From: Antoine Date: Mon, 28 Aug 2023 21:01:11 +0200 Subject: [PATCH] feat(helm): Don't create Secret if existingSecret is provided (#6397) --- ci/helm-chart/templates/secrets.yaml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ci/helm-chart/templates/secrets.yaml b/ci/helm-chart/templates/secrets.yaml index 6c600417a..ae59be450 100644 --- a/ci/helm-chart/templates/secrets.yaml +++ b/ci/helm-chart/templates/secrets.yaml @@ -1,3 +1,4 @@ +{{- if not .Values.existingSecret }} apiVersion: v1 kind: Secret metadata: @@ -11,8 +12,9 @@ metadata: app.kubernetes.io/managed-by: {{ .Release.Service }} type: Opaque data: - {{ if .Values.password }} + {{- if .Values.password }} password: "{{ .Values.password | b64enc }}" - {{ else }} + {{- else }} password: "{{ randAlphaNum 24 | b64enc }}" - {{ end }} + {{- end }} +{{- end }}