diff --git a/charts/matrix-synapse/Chart.yaml b/charts/matrix-synapse/Chart.yaml index 2a3836c..68d3e12 100644 --- a/charts/matrix-synapse/Chart.yaml +++ b/charts/matrix-synapse/Chart.yaml @@ -6,7 +6,7 @@ icon: https://matrix.org/images/matrix-logo.svg appVersion: 1.38.1 type: application -version: 2.1.4 +version: 2.1.5 maintainers: - name: Alexander Olofsson email: ace@haxalot.com diff --git a/charts/matrix-synapse/templates/_helpers.tpl b/charts/matrix-synapse/templates/_helpers.tpl index aa70880..de6e027 100644 --- a/charts/matrix-synapse/templates/_helpers.tpl +++ b/charts/matrix-synapse/templates/_helpers.tpl @@ -197,6 +197,25 @@ Set postgresql sslmode {{- end -}} {{- end -}} + +{{/* +Set postgresql extra args +Refer to https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS +for a list of options that can be passed. +*/}} +{{- define "matrix-synapse.postgresql.extraArgs" -}} +{{- if .Values.postgresql.enabled -}} +{{- with .Values.postgresql.extraArgs }} + {{- . | toYaml }} +{{- end }} +{{- else -}} +{{- with .Values.externalPostgresql.extraArgs }} + {{- . | toYaml }} +{{- end }} +{{- end -}} +{{- end -}} + + {{/* Set redis host */}} diff --git a/charts/matrix-synapse/templates/secrets.yaml b/charts/matrix-synapse/templates/secrets.yaml index 02f3aea..3cdb3ed 100644 --- a/charts/matrix-synapse/templates/secrets.yaml +++ b/charts/matrix-synapse/templates/secrets.yaml @@ -36,6 +36,7 @@ stringData: {{- $postgresPort := include "matrix-synapse.postgresql.port" . }} {{- $postgresPass := include "matrix-synapse.postgresql.password" . }} {{- $postgresSSLMode := include "matrix-synapse.postgresql.sslmode" . }} +{{- $postgresExtraArgs := include "matrix-synapse.postgresql.extraArgs" . }} ## Database configuration ## @@ -54,6 +55,7 @@ stringData: sslmode: {{ $postgresSSLMode | quote }} cp_min: 5 cp_max: 10 + {{- $postgresExtraArgs | nindent 8 }} {{- $redisHost := include "matrix-synapse.redis.host" . }} {{- $redisPort := include "matrix-synapse.redis.port" . }} diff --git a/charts/matrix-synapse/values.yaml b/charts/matrix-synapse/values.yaml index 4e0b181..d98f738 100644 --- a/charts/matrix-synapse/values.yaml +++ b/charts/matrix-synapse/values.yaml @@ -597,6 +597,11 @@ postgresql: # storageClass: "-" size: 16Gi + ## Extra arguments for the database connection + ## ref: https://github.com/matrix-org/synapse/blob/develop/docs/postgres.md#synapse-config + ## + extraArgs: {} + ## An externally configured Postgres server to use for Synapse's database, note ## that the database needs to have both COLLATE and CTYPE set to "C". ## @@ -608,6 +613,11 @@ externalPostgresql: database: synapse # sslmode: prefer + ## Extra arguments for the database connection + ## ref: https://github.com/matrix-org/synapse/blob/develop/docs/postgres.md#synapse-config + ## + extraArgs: {} + ## 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 ## false and configure the externalRedis block.