diff --git a/charts/matrix-synapse/templates/_helpers.tpl b/charts/matrix-synapse/templates/_helpers.tpl index 06425a9..aa70880 100644 --- a/charts/matrix-synapse/templates/_helpers.tpl +++ b/charts/matrix-synapse/templates/_helpers.tpl @@ -186,6 +186,17 @@ Set postgresql database {{- end -}} {{- end -}} +{{/* +Set postgresql sslmode +*/}} +{{- define "matrix-synapse.postgresql.sslmode" -}} +{{- if .Values.postgresql.enabled -}} +{{- default "prefer" .Values.postgresql.sslmode }} +{{- else -}} +{{- default "prefer" .Values.externalPostgresql.sslmode }} +{{- end -}} +{{- end -}} + {{/* Set redis host */}} diff --git a/charts/matrix-synapse/templates/secrets.yaml b/charts/matrix-synapse/templates/secrets.yaml index e7b30d4..4b69c56 100644 --- a/charts/matrix-synapse/templates/secrets.yaml +++ b/charts/matrix-synapse/templates/secrets.yaml @@ -35,6 +35,7 @@ stringData: {{- $postgresUser := include "matrix-synapse.postgresql.username" . }} {{- $postgresPort := include "matrix-synapse.postgresql.port" . }} {{- $postgresPass := include "matrix-synapse.postgresql.password" . }} +{{- $postgresSSLMode := include "matrix-synapse.postgresql.sslmode" . }} ## Database configuration ## @@ -50,6 +51,7 @@ stringData: database: {{ $postgresDB | quote }} host: {{ $postgresHost | quote }} port: {{ $postgresPort }} + sslmode: {{ $postgresSSLMode | quote }} cp_min: 5 cp_max: 10 diff --git a/charts/matrix-synapse/values.yaml b/charts/matrix-synapse/values.yaml index cb38ddb..4c32b2c 100644 --- a/charts/matrix-synapse/values.yaml +++ b/charts/matrix-synapse/values.yaml @@ -555,7 +555,7 @@ externalPostgresql: username: synapse # password: synapse database: synapse - # sslMode: require + # sslmode: prefer ## This configuration is for the internal Redis that's deployed for use with ## workers/sharding, for an external Redis server you want to set enabled to