Hookshot: Fix mounting its appservice registration file into Synapse

This commit is contained in:
Gaël Goinvic committed 2026-05-19 14:44:28 +02:00
1 parent ee5fbc67b8
commit 3877145e4a
5 files changed
+44 -2

No files matched your search

@@ -55,8 +55,13 @@ app.kubernetes.io/version: {{ include "element-io.ess-library.labels.makeSafe" .
{{- define "element-io.hookshot.secret-name" -}}
{{- $root := .root -}}
{{- with required "element-io.hookshot.secret-name requires context" .context -}}
{{- $isHook := .isHook }}
{{- if $isHook -}}
{{ $root.Release.Name }}-hookshot-pre
{{- else -}}
{{ $root.Release.Name }}-hookshot
{{- end -}}
{{- end }}
{{- end }}
{{- end }}
@@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
apiVersion: v1
kind: Secret
metadata:
name: {{ $.Release.Name }}-hookshot
name: {{ include "element-io.hookshot.secret-name" (dict "root" $ "context" (dict "isHook" false)) }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "element-io.hookshot.labels" (dict "root" $ "context" .) | nindent 4 }}
@@ -0,0 +1,24 @@
{{- /*
Copyright 2026 Element Creations Ltd
SPDX-License-Identifier: AGPL-3.0-only
*/ -}}
{{- with $.Values.hookshot -}}
{{- if .enabled -}}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "element-io.hookshot.secret-name" (dict "root" $ "context" (dict "isHook" true)) }}
namespace: {{ $.Release.Namespace }}
labels:
{{- include "element-io.hookshot.labels" (dict "root" $ "context" .) | nindent 4 }}
"k8s.element.io/hook-for": "synapse-check-config"
annotations:
"helm.sh/hook": pre-install,pre-upgrade
"helm.sh/hook-weight": "-1"
type: Opaque
data:
{{- include "element-io.hookshot.secret-data" (dict "root" $ "context" .) | nindent 2 }}
{{- end -}}
{{- end -}}
@@ -182,6 +182,18 @@ responsibleForMedia
{{- end }}
{{- end }}
{{- end }}
{{- with $root.Values.hookshot -}}
{{- if .enabled }}
{{- with .appserviceRegistration }}
{{- with .value }}
{{- $configSecrets = append $configSecrets (include "element-io.hookshot.secret-name" (dict "root" $root "context" (dict "isHook" $isHook))) -}}
{{- end }}
{{- with .secret }}
{{- $configSecrets = append $configSecrets (tpl . $root) -}}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
{{ $configSecrets | uniq | toJson }}
{{- end }}
{{- end }}
+1
View File
@@ -0,0 +1 @@
Fix an issue where a custom appservice registration file configured for Hookshot would not be mounted properly into Synapse pods.