scale-catalog/stable/serpbear/3.8.14/templates/_secret.tpl

22 lines
657 B
Smarty
Raw Normal View History

2024-07-13 07:59:30 +00:00
{{/* Define the secret */}}
{{- define "serpbear.secret" -}}
{{- $secretName := (printf "%s-serpbear-secret" (include "tc.v1.common.lib.chart.names.fullname" $)) }}
enabled: true
data:
{{/* Secret Key */}}
{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) }}
SECRET: {{ index .data "SECRET" }}
{{- else }}
SECRET: {{ randAlphaNum 32 }}
{{- end }}
{{- with .Values.serpbear.api_key }}
APIKEY: {{ . }}
{{- end }}
USER: {{ .Values.serpbear.user }}
PASSWORD: {{ .Values.serpbear.password }}
SESSION_DURATION: {{ .Values.serpbear.session_duration | quote }}
NEXT_PUBLIC_APP_URL: {{ .Values.serpbear.app_url }}
{{- end }}