softplayer-helm-lib/charts/workload/templates/configs/_env.tpl

21 lines
505 B
Smarty
Raw Normal View History

2024-05-13 15:20:21 +00:00
{{- define "lib.config.env" -}}
{{- range $k, $v := .Values.env }}
{{- $customName := printf "%s-%s" (include "chart.fullname" $) $k }}
---
apiVersion: v1
{{- if not $v.sensitive }}
kind: ConfigMap
{{- include "lib.metadata" (dict "Context" $ "customName" $customName)}}
data:
{{- else }}
kind: Secret
{{- include "lib.metadata" (dict "Context" $ "customName" $customName)}}
stringData:
{{- end }}
2024-07-15 06:34:25 +00:00
{{- range $key, $value := $v.data }}
2024-07-15 06:37:48 +00:00
{{ $key }}: {{ $value | quote }}
2024-05-13 15:20:21 +00:00
{{- end }}
{{- end }}
{{- end -}}