rancher-charts/charts/epinio/102.0.3+up1.8.1/templates/ui/secret.yaml

18 lines
560 B
YAML
Raw Normal View History

2023-06-13 08:32:16 +00:00
{{- if .Values.epinioUI.enabled }}
{{- $secret := (lookup "v1" "Secret" .Release.Namespace "epinio-ui").data -}}
{{- $encryptionKey := empty $secret | ternary (printf "%x" (randAscii 32)) (b64dec (default "" $secret.encryptionKey)) -}}
{{- $sessionSecret := empty $secret | ternary (randAlphaNum 16) (b64dec (default "" $secret.sessionSecret)) -}}
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: epinio-ui
namespace: {{ .Release.Namespace }}
stringData:
encryptionKey: {{ $encryptionKey }}
sessionSecret: {{ $sessionSecret }}
{{- end }}