From 09e1669cbc235be9c3840a88640eafc7494a3d9c Mon Sep 17 00:00:00 2001 From: "Alexander \"Ace\" Olofsson" Date: Tue, 20 Dec 2022 19:03:17 +0100 Subject: [PATCH] matrix-synapse: Require switch to new auth config --- charts/matrix-synapse/templates/_helpers.tpl | 6 +++--- charts/matrix-synapse/templates/deployment.yaml | 2 +- charts/matrix-synapse/values.yaml | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/charts/matrix-synapse/templates/_helpers.tpl b/charts/matrix-synapse/templates/_helpers.tpl index c4cd479..9b3ebdc 100644 --- a/charts/matrix-synapse/templates/_helpers.tpl +++ b/charts/matrix-synapse/templates/_helpers.tpl @@ -150,7 +150,7 @@ Set postgresql username */}} {{- define "matrix-synapse.postgresql.username" -}} {{- if .Values.postgresql.enabled -}} -{{- if (and (not .Values.postgresql.auth.username) (.Values.postgresql.postgresqlUsername)) -}} +{{- if .Values.postgresql.postgresqlUsername -}} {{- fail "You need to switch to the new postgresql.auth values." -}} {{- end -}} {{- .Values.postgresql.auth.username | default "postgres" }} @@ -164,7 +164,7 @@ Set postgresql password */}} {{- define "matrix-synapse.postgresql.password" -}} {{- if .Values.postgresql.enabled -}} -{{- if (and (not .Values.postgresql.auth.password) (.Values.postgresql.postgresqlPassword)) -}} +{{- if .Values.postgresql.postgresqlPassword -}} {{- fail "You need to switch to the new postgresql.auth values." -}} {{- end -}} {{- .Values.postgresql.auth.password | default "synapse" }} @@ -178,7 +178,7 @@ Set postgresql database */}} {{- define "matrix-synapse.postgresql.database" -}} {{- if .Values.postgresql.enabled -}} -{{- if (and (not .Values.postgresql.auth.database) (.Values.postgresql.postgresqlDatabase)) -}} +{{- if .Values.postgresql.postgresqlDatabase -}} {{- fail "You need to switch to the new postgresql.auth values." -}} {{- end -}} {{- .Values.postgresql.auth.database | default "synapse" }} diff --git a/charts/matrix-synapse/templates/deployment.yaml b/charts/matrix-synapse/templates/deployment.yaml index bc340e1..6fef133 100644 --- a/charts/matrix-synapse/templates/deployment.yaml +++ b/charts/matrix-synapse/templates/deployment.yaml @@ -87,7 +87,7 @@ spec: secretKeyRef: {{- if .Values.postgresql.enabled }} name: {{ .Values.postgresql.existingSecret | default (include "matrix-synapse.postgresql.fullname" .) }} - key: postgresql-password + key: password {{- else }} name: {{ .Values.externalPostgresql.existingSecret }} key: {{ .Values.externalPostgresql.existingSecretPasswordKey }} diff --git a/charts/matrix-synapse/values.yaml b/charts/matrix-synapse/values.yaml index 741fdbc..ac505e4 100644 --- a/charts/matrix-synapse/values.yaml +++ b/charts/matrix-synapse/values.yaml @@ -677,17 +677,17 @@ wellknown: postgresql: enabled: true - auth: {} + auth: # XXX Change me! - # password: synapse + password: synapse - ## Or use existing secret with "postgresql-password" key + ## Or use existing secret with "password" key ## instead of static password ## # existingSecret: postgresql-secret - # username: synapse - # database: synapse + username: synapse + database: synapse primary: initdb: