From feda9bd14c9b96d40c8efe318b961cb4e389a18b Mon Sep 17 00:00:00 2001 From: puckettgw Date: Fri, 6 Sep 2024 10:11:23 -0400 Subject: [PATCH 1/3] Fix improper url blacklist inclusion Fixes the following error generated when multiple blacklist items are in the map: Error: INSTALLATION FAILED: template: matrix/templates/synapse/deployment.yaml:20:36: executing "matrix/templates/synapse/deployment.yaml" at : error calling include: template: matrix/templates/synapse/configmap.yaml:10:7: executing "matrix/templates/synapse/configmap.yaml" at : error calling include: template: matrix/templates/synapse/_homeserver.yaml:835:18: executing "homeserver.yaml" at <.Values.matrix.urlPreviews.rules.url.blacklist>: wrong type for value; expected string; got []interface {} --- templates/synapse/_homeserver.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/synapse/_homeserver.yaml b/templates/synapse/_homeserver.yaml index 876337e..59e8288 100644 --- a/templates/synapse/_homeserver.yaml +++ b/templates/synapse/_homeserver.yaml @@ -832,7 +832,7 @@ url_preview_ip_range_whitelist: {{- if .Values.matrix.urlPreviews.rules.url.blacklist }} url_preview_url_blacklist: -{{ include .Values.matrix.urlPreviews.rules.url.blacklist . | nindent 2 }} +{{ toYaml .Values.matrix.urlPreviews.rules.url.blacklist | nindent 2 }} {{- end }} # The largest allowed URL preview spidering size in bytes From 4e6984c54e61edf49f2378dabd2ea43b8256e9f9 Mon Sep 17 00:00:00 2001 From: puckettgw Date: Fri, 6 Sep 2024 15:24:44 -0400 Subject: [PATCH 2/3] fix bad smtp settings --- templates/synapse/_homeserver.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/synapse/_homeserver.yaml b/templates/synapse/_homeserver.yaml index 59e8288..15272c9 100644 --- a/templates/synapse/_homeserver.yaml +++ b/templates/synapse/_homeserver.yaml @@ -1820,7 +1820,7 @@ password_config: email: enable_notifs: {{ .Values.mail.enabled }} notif_from: {{ .Values.mail.from }} - {{- if .Values.mail.relay.enabled }} + {{- if eq .Values.mail.relay.enabled true }} smtp_host: {{ include "matrix.fullname" . }}-exim-relay smtp_port: {{ .Values.mail.relay.service.port }} {{- else }} From 80c6b54af8d294b402ed1044474ae3a057c46395 Mon Sep 17 00:00:00 2001 From: puckettgw Date: Fri, 6 Sep 2024 17:07:08 -0400 Subject: [PATCH 3/3] fix serverName.log.config synapse configmap key Fixes garbled generation of configmap caused by unquoted substitution --- templates/synapse/configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/synapse/configmap.yaml b/templates/synapse/configmap.yaml index 5a64f23..edbfd3c 100644 --- a/templates/synapse/configmap.yaml +++ b/templates/synapse/configmap.yaml @@ -8,7 +8,7 @@ metadata: data: homeserver.yaml: | {{ include "homeserver.yaml" . | nindent 4 }} - {{ .Values.matrix.serverName }}.log.config: | + "{{ .Values.matrix.serverName }}.log.config": | version: 1 formatters: