From 1eabfa5fce0829169f8abf17c0397c37c02d0ee1 Mon Sep 17 00:00:00 2001 From: Ben Banfield-Zanin Date: Fri, 17 Apr 2026 11:41:58 +0100 Subject: [PATCH] Hookshot: correct Redis password handling --- .../matrix-stack/configs/hookshot/config-override.yaml.tpl | 5 +---- charts/matrix-stack/templates/hookshot/_helpers.tpl | 2 +- newsfragments/1236.fixed.md | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 newsfragments/1236.fixed.md diff --git a/charts/matrix-stack/configs/hookshot/config-override.yaml.tpl b/charts/matrix-stack/configs/hookshot/config-override.yaml.tpl index 3727e4b6..11842362 100644 --- a/charts/matrix-stack/configs/hookshot/config-override.yaml.tpl +++ b/charts/matrix-stack/configs/hookshot/config-override.yaml.tpl @@ -34,10 +34,7 @@ encryption: cache: {{- if .redis }} - redisUri: "redis{{ if .redis.tls }}s{{ end }}://{{ tpl .redis.host $root }}:{{ .redis.port | default 6379 }}/{{ .redis.db | default 0 }}" -{{- if .redis.password }} - redisPassword: ${HOOKSHOT_REDIS_PASSWORD} -{{- end }} + redisUri: "redis{{ if .redis.tls }}s{{ end }}://{{ if .redis.password }}:${HOOKSHOT_REDIS_PASSWORD}@{{ end }}{{ tpl .redis.host $root }}:{{ .redis.port | default 6379 }}/{{ .redis.db | default 0 }}" {{- else }} redisUri: "redis://{{ $root.Release.Name }}-redis.{{ $root.Release.Namespace }}.svc.{{ $root.Values.clusterDomain }}:6379" {{- end }} diff --git a/charts/matrix-stack/templates/hookshot/_helpers.tpl b/charts/matrix-stack/templates/hookshot/_helpers.tpl index 2f2f406f..9b480f60 100644 --- a/charts/matrix-stack/templates/hookshot/_helpers.tpl +++ b/charts/matrix-stack/templates/hookshot/_helpers.tpl @@ -105,7 +105,7 @@ env: - name: HOOKSHOT_REDIS_PASSWORD value: >- {{ - printf "{{ readfile \"/secrets/%s\" | quote }}" + printf "{{ readfile \"/secrets/%s\" | urlencode }}" ( include "element-io.ess-library.provided-secret-path" ( dict "root" $root diff --git a/newsfragments/1236.fixed.md b/newsfragments/1236.fixed.md new file mode 100644 index 00000000..99ae117d --- /dev/null +++ b/newsfragments/1236.fixed.md @@ -0,0 +1 @@ +Correctly set the external Redis password in Hookshot if configured.