matrix-synapse: Require switch to new auth config

This commit is contained in:
Alexander "Ace" Olofsson 2022-12-20 19:03:17 +01:00
parent 3620f71b05
commit 09e1669cbc
No known key found for this signature in database
GPG key ID: D439C9470CB04C73
3 changed files with 9 additions and 9 deletions

View file

@ -150,7 +150,7 @@ Set postgresql username
*/}} */}}
{{- define "matrix-synapse.postgresql.username" -}} {{- define "matrix-synapse.postgresql.username" -}}
{{- if .Values.postgresql.enabled -}} {{- 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." -}} {{- fail "You need to switch to the new postgresql.auth values." -}}
{{- end -}} {{- end -}}
{{- .Values.postgresql.auth.username | default "postgres" }} {{- .Values.postgresql.auth.username | default "postgres" }}
@ -164,7 +164,7 @@ Set postgresql password
*/}} */}}
{{- define "matrix-synapse.postgresql.password" -}} {{- define "matrix-synapse.postgresql.password" -}}
{{- if .Values.postgresql.enabled -}} {{- 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." -}} {{- fail "You need to switch to the new postgresql.auth values." -}}
{{- end -}} {{- end -}}
{{- .Values.postgresql.auth.password | default "synapse" }} {{- .Values.postgresql.auth.password | default "synapse" }}
@ -178,7 +178,7 @@ Set postgresql database
*/}} */}}
{{- define "matrix-synapse.postgresql.database" -}} {{- define "matrix-synapse.postgresql.database" -}}
{{- if .Values.postgresql.enabled -}} {{- 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." -}} {{- fail "You need to switch to the new postgresql.auth values." -}}
{{- end -}} {{- end -}}
{{- .Values.postgresql.auth.database | default "synapse" }} {{- .Values.postgresql.auth.database | default "synapse" }}

View file

@ -87,7 +87,7 @@ spec:
secretKeyRef: secretKeyRef:
{{- if .Values.postgresql.enabled }} {{- if .Values.postgresql.enabled }}
name: {{ .Values.postgresql.existingSecret | default (include "matrix-synapse.postgresql.fullname" .) }} name: {{ .Values.postgresql.existingSecret | default (include "matrix-synapse.postgresql.fullname" .) }}
key: postgresql-password key: password
{{- else }} {{- else }}
name: {{ .Values.externalPostgresql.existingSecret }} name: {{ .Values.externalPostgresql.existingSecret }}
key: {{ .Values.externalPostgresql.existingSecretPasswordKey }} key: {{ .Values.externalPostgresql.existingSecretPasswordKey }}

View file

@ -677,17 +677,17 @@ wellknown:
postgresql: postgresql:
enabled: true enabled: true
auth: {} auth:
# XXX Change me! # 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 ## instead of static password
## ##
# existingSecret: postgresql-secret # existingSecret: postgresql-secret
# username: synapse username: synapse
# database: synapse database: synapse
primary: primary:
initdb: initdb: