A lot of work on the workload library
This commit is contained in:
20
charts/workload/templates/configs/_env.tpl
Normal file
20
charts/workload/templates/configs/_env.tpl
Normal file
@ -0,0 +1,20 @@
|
||||
{{- 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 }}
|
||||
{{- with $v.data }}
|
||||
{{ toYaml . | indent 2}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
|
20
charts/workload/templates/configs/_files.tpl
Normal file
20
charts/workload/templates/configs/_files.tpl
Normal file
@ -0,0 +1,20 @@
|
||||
{{- 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 -}}
|
||||
|
Reference in New Issue
Block a user