nats chart provisoning
This commit is contained in:
17
opencloud/charts/nats/files/nats-box/contents-secret.yaml
Normal file
17
opencloud/charts/nats/files/nats-box/contents-secret.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
{{- include "nats.metadataNamespace" $ | nindent 2 }}
|
||||
name: {{ .Values.natsBox.contentsSecret.name }}
|
||||
labels:
|
||||
{{- include "natsBox.labels" $ | nindent 4 }}
|
||||
type: Opaque
|
||||
stringData:
|
||||
{{- range $ctxKey, $ctxVal := .Values.natsBox.contexts }}
|
||||
{{- range $secretKey, $secretVal := dict "creds" "creds" "nkey" "nk" }}
|
||||
{{- $secret := get $ctxVal $secretKey }}
|
||||
{{- if and $secret $secret.contents }}
|
||||
"{{ $ctxKey }}.{{ $secretVal }}": {{ $secret.contents | quote }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user