{{- 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 }}