mautrix-whatsapp/templates/secret.yaml

20 lines
875 B
YAML
Raw Permalink Normal View History

{{- 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-whatsapp.fullname" . }}
labels:
{{ include "mautrix-whatsapp.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-whatsapp.registration-yaml" . | b64enc | quote }}