TrueChartsCatalogClone/incubator/money-balancer/2.0.9/templates/_secrets.tpl

21 lines
450 B
Smarty

{{/* Define the secrets */}}
{{- define "moneybalancer.secrets" -}}
{{- $secretName := printf "%s-moneybalancer-secret" (include "tc.common.names.fullname" .) }}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: {{ $secretName }}
data:
{{- with (lookup "v1" "Secret" .Release.Namespace $secretName) }}
JWT_SECRET: {{ index .data "JWT_SECRET" }}
{{- else }}
JWT_SECRET: {{ randAlphaNum 32 | b64enc }}
{{- end }}
{{- end -}}