diff --git a/charts/matrix-synapse/templates/_helpers.tpl b/charts/matrix-synapse/templates/_helpers.tpl index 52a2c66..cdf335b 100644 --- a/charts/matrix-synapse/templates/_helpers.tpl +++ b/charts/matrix-synapse/templates/_helpers.tpl @@ -150,10 +150,7 @@ Set postgresql username */}} {{- define "matrix-synapse.postgresql.username" -}} {{- if .Values.postgresql.enabled -}} -{{- if .Values.postgresql.postgresqlUsername -}} -{{- fail "You need to switch to the new postgresql.auth values." -}} -{{- end -}} -{{- .Values.postgresql.auth.username | default "postgres" }} +{{ required "A valid postgresql.auth.username is required" .Values.postgresql.auth.username }} {{- else -}} {{ required "A valid externalPostgresql.username is required" .Values.externalPostgresql.username }} {{- end -}} @@ -164,10 +161,7 @@ Set postgresql password */}} {{- define "matrix-synapse.postgresql.password" -}} {{- if .Values.postgresql.enabled -}} -{{- if .Values.postgresql.postgresqlPassword -}} -{{- fail "You need to switch to the new postgresql.auth values." -}} -{{- end -}} -{{- .Values.postgresql.auth.password | default "synapse" }} +{{ required "A valid postgresql.auth.password is required" .Values.postgresql.auth.password }} {{- else if not (and .Values.externalPostgresql.existingSecret .Values.externalPostgresql.existingSecretPasswordKey) -}} {{ required "A valid externalPostgresql.password is required" .Values.externalPostgresql.password }} {{- end -}}