scale-catalog/stable/hedgedoc/13.0.8/templates/_secrets.tpl
Julian Haseleu 5d1ab94342 cleanup
2024-07-14 21:54:53 +00:00

15 lines
443 B
Smarty

{{/* Define the secrets */}}
{{- define "hedgedoc.secrets" -}}
{{- $hedgedocprevious := lookup "v1" "Secret" .Release.Namespace "hedgedoc-secrets" }}
{{- $session_secret := "" }}
enabled: true
data:
{{- if $hedgedocprevious}}
CMD_SESSION_SECRET: {{ index $hedgedocprevious.data "CMD_SESSION_SECRET" }}
{{- else }}
{{- $session_secret := randAlphaNum 32 }}
CMD_SESSION_SECRET: {{ $session_secret | b64enc }}
{{- end }}
{{- end -}}