TrueChartsCatalogClone/stable/ferdi-server/10.3.0/templates/_secrets.tpl

15 lines
452 B
Smarty
Raw Normal View History

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