scale-catalog/stable/redmine/12.0.12/templates/_secrets.tpl

15 lines
525 B
Smarty
Raw Normal View History

2024-07-13 07:59:30 +00:00
{{/* Define the secrets */}}
{{- define "redmine.secrets" -}}
{{- $secretName := (printf "%s-redmine-secrets" (include "tc.v1.common.lib.chart.names.fullname" $)) }}
{{- $redmineprevious := lookup "v1" "Secret" .Release.Namespace $secretName }}
enabled: true
data:
{{- if $redmineprevious }}
REDMINE_SECRET_KEY_BASE: {{ index $redmineprevious.data "REDMINE_SECRET_KEY_BASE" | b64dec }}
{{- else }}
{{- $secret_key_base := randAlphaNum 80 }}
REDMINE_SECRET_KEY_BASE: {{ $secret_key_base }}
{{- end }}
{{- end -}}