Files
catalog/stable/bookstack/11.2.8/templates/_secrets.tpl
TrueCharts-Bot ca39c31f2f Commit new Chart releases for TrueCharts
Signed-off-by: TrueCharts-Bot <bot@truecharts.org>
2024-01-02 20:53:54 +00:00

15 lines
471 B
Smarty

{{/* Define the secrets */}}
{{- define "bookstack.secrets" -}}
{{- $secretName := (printf "%s-bookstack-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }}
{{- $bookstackprevious := lookup "v1" "Secret" .Release.Namespace $secretName }}
enabled: true
data:
{{- if $bookstackprevious }}
APP_KEY: {{ index $bookstackprevious.data "APP_KEY" | b64dec }}
{{- else }}
{{- $app_key := randAlphaNum 32 }}
APP_KEY: {{ $app_key }}
{{- end }}
{{- end -}}