mautrix-discord/templates/secret.yaml

20 lines
872 B
YAML
Raw Permalink Normal View History

2024-05-14 22:19:54 +00:00
{{- if not .Values.config.homeserver.address }}
{{- fail "config.homeserver.address is required" }}
{{- else if not .Values.config.homeserver.domain }}
{{- fail "config.homeserver.domain is required" }}
{{- else if not .Values.config.appservice.address }}
{{- fail "config.appservice.address is required" }}
{{- end }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "mautrix-discord.fullname" . }}
labels:
{{ include "mautrix-discord.labels" . | indent 4 }}
type: Opaque
data:
# Ugh. Can we stop leaving real issues unfixed because of "purity" and twisted definitions of "intended behavior"? https://github.com/helm/helm/issues/5568
config.yaml: {{ tpl (regexReplaceAll "('{{ \".*?)\\n\\s*(.*?\" }}')" (.Values.config | toYaml) "${1} ${2}") . | b64enc | quote }}
registration.yaml: {{ include "mautrix-discord.registration-yaml" . | b64enc | quote }}