diff --git a/charts/quickstart-openshift-backends/templates/secret.yaml b/charts/quickstart-openshift-backends/templates/secret.yaml index ad8ff9f..12f98b2 100644 --- a/charts/quickstart-openshift-backends/templates/secret.yaml +++ b/charts/quickstart-openshift-backends/templates/secret.yaml @@ -1,6 +1,6 @@ {{- if and .Values.global.secrets .Values.global.secrets.enabled}} {{- $databaseUser := .Values.global.secrets.databaseUser| default "quickstart" }} -{{- $databasePassword := .Values.global.secrets.databasePassword | default (randAlphaNum 10) | quote }} +{{- $databasePassword := .Values.global.secrets.databasePassword | default (randAlphaNum 10) }} {{- $secretObj := (lookup "v1" "Secret" .Release.Namespace .Release.Name ) | default dict }} {{- $secretData := (get $secretObj "data") | default dict }} # set below to existing secret data or generate a random one when not exists @@ -33,5 +33,5 @@ data: POSTGRES_USER: {{ $databaseUser | b64enc | quote }} POSTGRES_DATABASE: {{ $databaseName | b64enc | quote }} POSTGRES_HOST: {{ $hostWithoutPort | b64enc | quote }} - + POSTGRES_DB: {{ $databaseName | b64enc | quote }} {{- end }}