scale-catalog/stable/lldap/4.3.0/templates/_secrets.tpl
Julian Haseleu 5d1ab94342 cleanup
2024-07-14 21:54:53 +00:00

17 lines
502 B
Smarty

{{/* Define the secrets */}}
{{- define "lldap.secrets" -}}
{{- $basename := include "tc.v1.common.lib.chart.names.fullname" $ -}}
{{- $fetchname := printf "%s-secret" $basename -}}
{{/* Initialize all keys */}}
{{- $secrets := randAlphaNum 50 }}
enabled: true
data:
{{ with (lookup "v1" "Secret" .Release.Namespace $fetchname) }}
{{/* Get previous values and decode */}}
{{ $secrets = (index .data "LLDAP_JWT_SECRET") | b64dec }}
{{ end }}
LLDAP_JWT_SECRET: {{ $secrets }}
{{- end -}}