2022-06-23 16:28:57 +00:00
|
|
|
{{/* Define the secrets */}}
|
|
|
|
{{- define "hedgedoc.secrets" -}}
|
|
|
|
{{- $hedgedocprevious := lookup "v1" "Secret" .Release.Namespace "hedgedoc-secrets" }}
|
|
|
|
{{- $session_secret := "" }}
|
2023-04-11 10:07:17 +00:00
|
|
|
enabled: true
|
2022-06-23 16:28:57 +00:00
|
|
|
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 -}}
|