softplayer-helm-lib/charts/workload-testing/templates/configs/_files.tpl

21 lines
482 B
Smarty
Raw Normal View History

2024-05-13 15:20:21 +00:00
{{- define "lib.config.files" -}}
{{- range $k, $v := .Values.files }}
{{- $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 }}
{{- with $v.data }}
{{ toYaml . | indent 2}}
{{- end }}
{{- end }}
{{- end -}}