mirror of
https://github.com/Thumbscrew/k8s-charts.git
synced 2025-07-03 03:19:00 +00:00
feat: Tandoor recipes chart (#50)
This commit is contained in:
12
charts/tandoor-recipes/templates/secret.yaml
Normal file
12
charts/tandoor-recipes/templates/secret.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
{{- 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 }}
|
Reference in New Issue
Block a user