mirror of
https://github.com/Thumbscrew/k8s-charts.git
synced 2024-11-10 08:03:50 +00:00
12 lines
430 B
YAML
12 lines
430 B
YAML
|
{{- if empty .Values.secretKey }}
|
||
|
apiVersion: v1
|
||
|
kind: Secret
|
||
|
metadata:
|
||
|
name: "recipes-secret-key"
|
||
|
type: Opaque
|
||
|
data:
|
||
|
{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "recipes-secret-key") | default dict }}
|
||
|
{{- $secretData := (get $secretObj "data") | default dict }}
|
||
|
{{- $secretKey := (get $secretData "recipes-secret-key") | default (randAlphaNum 32 | b64enc) }}
|
||
|
password: {{ $secretKey | quote }}
|
||
|
{{- end }}
|