mirror of
https://github.com/Thumbscrew/k8s-charts.git
synced 2024-11-14 01:50:03 +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 64 | b64enc) }}
|
||
|
password: {{ $secretKey | quote }}
|
||
|
{{- end }}
|