scale-catalog/stable/lldap/4.2.0/templates/_secrets.tpl

17 lines
502 B
Smarty
Raw Normal View History

2024-07-13 07:59:30 +00:00
{{/* 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 -}}