scale-catalog/stable/fireflyiii/26.1.5/templates/_secrets.tpl

15 lines
530 B
Smarty
Raw Normal View History

2024-07-13 07:59:30 +00:00
{{/* Define the secrets */}}
{{- define "fireflyiii.secrets" -}}
{{- $secretName := (printf "%s-firefly-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }}
{{- $appKey := randAlphaNum 32 -}}
{{- $cronToken := randAlphaNum 32 -}}
{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) -}}
{{- $appKey = index .data "APP_KEY" | b64dec -}}
{{- $cronToken = index .data "STATIC_CRON_TOKEN" | b64dec -}}
{{- end }}
enabled: true
data:
STATIC_CRON_TOKEN: {{ $cronToken }}
APP_KEY: {{ $appKey }}
{{- end -}}