X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=helm%2Finfrastructure%2Fsubcharts%2Fkong%2Fcharts%2Fpostgresql%2Ftemplates%2Fsecrets.yaml;h=094d18b49f8689b8e944541591cad96c6fe42752;hb=7a43fbd4642448783aaf708d07ca883bf9bc5afd;hp=acc1681415e40885d876ee1f0178210cadb46e1c;hpb=282e7af25ec053ae6d1c5a399c91c2c323f705cd;p=ric-plt%2Fric-dep.git diff --git a/helm/infrastructure/subcharts/kong/charts/postgresql/templates/secrets.yaml b/helm/infrastructure/subcharts/kong/charts/postgresql/templates/secrets.yaml index acc1681..094d18b 100755 --- a/helm/infrastructure/subcharts/kong/charts/postgresql/templates/secrets.yaml +++ b/helm/infrastructure/subcharts/kong/charts/postgresql/templates/secrets.yaml @@ -1,4 +1,4 @@ -{{- if not .Values.existingSecret }} +{{- if (include "postgresql.createSecret" .) }} apiVersion: v1 kind: Secret metadata: @@ -10,16 +10,14 @@ metadata: heritage: {{ .Release.Service | quote }} type: Opaque data: - {{- if .Values.postgresqlPassword }} - postgresql-password: {{ .Values.postgresqlPassword | b64enc | quote }} - {{- else }} - postgresql-password: {{ randAlphaNum 10 | b64enc | quote }} + {{- if and .Values.postgresqlPostgresPassword (not (eq .Values.postgresqlUsername "postgres")) }} + postgresql-postgres-password: {{ include "postgresql.postgres.password" . | b64enc | quote }} {{- end }} + postgresql-password: {{ include "postgresql.password" . | b64enc | quote }} {{- if .Values.replication.enabled }} - {{- if .Values.replication.password }} - postgresql-replication-password: {{ .Values.replication.password | b64enc | quote }} - {{- else }} - postgresql-replication-password: {{ randAlphaNum 10 | b64enc | quote }} + postgresql-replication-password: {{ include "postgresql.replication.password" . | b64enc | quote }} {{- end }} + {{- if (and .Values.ldap.enabled .Values.ldap.bind_password)}} + postgresql-ldap-password: {{ .Values.ldap.bind_password | b64enc | quote }} {{- end }} {{- end -}}