diff --git a/charts/matrix-synapse/Chart.yaml b/charts/matrix-synapse/Chart.yaml index ef7296e..f87f576 100644 --- a/charts/matrix-synapse/Chart.yaml +++ b/charts/matrix-synapse/Chart.yaml @@ -6,17 +6,17 @@ icon: https://matrix.org/images/matrix-logo.svg appVersion: 1.74.0 type: application -version: 2.7.10 +version: 3.0.0 maintainers: - name: Alexander Olofsson email: ace@haxalot.com dependencies: - name: postgresql - version: ^10.9.4 + version: ^12.1.4 repository: https://charts.bitnami.com/bitnami condition: postgresql.enabled - name: redis - version: ^16.1.0 + version: ^17.3.17 repository: https://charts.bitnami.com/bitnami condition: redis.enabled diff --git a/charts/matrix-synapse/templates/_helpers.tpl b/charts/matrix-synapse/templates/_helpers.tpl index a2e4df6..c4cd479 100644 --- a/charts/matrix-synapse/templates/_helpers.tpl +++ b/charts/matrix-synapse/templates/_helpers.tpl @@ -150,7 +150,10 @@ Set postgresql username */}} {{- define "matrix-synapse.postgresql.username" -}} {{- if .Values.postgresql.enabled -}} -{{- .Values.postgresql.postgresqlUsername | default "postgres" }} +{{- if (and (not .Values.postgresql.auth.username) (.Values.postgresql.postgresqlUsername)) -}} +{{- fail "You need to switch to the new postgresql.auth values." -}} +{{- end -}} +{{- .Values.postgresql.auth.username | default "postgres" }} {{- else -}} {{ required "A valid externalPostgresql.username is required" .Values.externalPostgresql.username }} {{- end -}} @@ -161,7 +164,10 @@ Set postgresql password */}} {{- define "matrix-synapse.postgresql.password" -}} {{- if .Values.postgresql.enabled -}} -{{- .Values.postgresql.postgresqlPassword | default "" }} +{{- if (and (not .Values.postgresql.auth.password) (.Values.postgresql.postgresqlPassword)) -}} +{{- fail "You need to switch to the new postgresql.auth values." -}} +{{- end -}} +{{- .Values.postgresql.auth.password | default "synapse" }} {{- else if not (and .Values.externalPostgresql.existingSecret .Values.externalPostgresql.existingSecretPasswordKey) -}} {{ required "A valid externalPostgresql.password is required" .Values.externalPostgresql.password }} {{- end -}} @@ -172,7 +178,10 @@ Set postgresql database */}} {{- define "matrix-synapse.postgresql.database" -}} {{- if .Values.postgresql.enabled -}} -{{- .Values.postgresql.postgresqlDatabase | default "synapse" }} +{{- if (and (not .Values.postgresql.auth.database) (.Values.postgresql.postgresqlDatabase)) -}} +{{- fail "You need to switch to the new postgresql.auth values." -}} +{{- end -}} +{{- .Values.postgresql.auth.database | default "synapse" }} {{- else -}} {{ required "A valid externalPostgresql.database is required" .Values.externalPostgresql.database }} {{- end -}} diff --git a/charts/matrix-synapse/values.yaml b/charts/matrix-synapse/values.yaml index c99cf80..c182280 100644 --- a/charts/matrix-synapse/values.yaml +++ b/charts/matrix-synapse/values.yaml @@ -677,22 +677,25 @@ wellknown: postgresql: enabled: true - # XXX Change me! - postgresqlPassword: synapse + auth: + # XXX Change me! + # password: synapse - ## Or use existing secret with "postgresql-password" key - ## instead of static password - ## - # existingSecret: postgresql-secret + ## Or use existing secret with "postgresql-password" key + ## instead of static password + ## + # existingSecret: postgresql-secret - postgresqlUsername: synapse - postgresqlDatabase: synapse + # username: synapse + # database: synapse - postgresqlInitdbArgs: "--lc-collate=C --lc-ctype=C" + primary: + initdb: + args: "--lc-collate=C --lc-ctype=C" - persistence: - # storageClass: "-" - size: 16Gi + persistence: + # storageClass: "-" + size: 16Gi ## Extra arguments for the database connection ## ref: https://github.com/matrix-org/synapse/blob/develop/docs/postgres.md#synapse-config @@ -741,6 +744,7 @@ redis: architecture: standalone master: + kind: Deployment persistence: ## Note that Synapse only uses redis as a synchronization utility, so no ## data will ever need to be persisted. @@ -748,8 +752,6 @@ redis: enabled: false service: port: 6379 - statefulset: - updateStrategy: RollingUpdate ## An externally configured Redis server to use for workers/sharding. ##