scale-catalog/stable/speedtest-tracker/1.11.9/templates/_secrets.tpl

12 lines
399 B
Smarty
Raw Permalink Normal View History

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