mirror of
https://github.com/nikdoof/helm-charts.git
synced 2025-12-24 07:09:30 +00:00
[common] Add common chart from KaH
This commit is contained in:
19
charts/common/templates/_configmap.tpl
Normal file
19
charts/common/templates/_configmap.tpl
Normal file
@@ -0,0 +1,19 @@
|
||||
{{/*
|
||||
Renders the configMap objects required by the chart.
|
||||
*/}}
|
||||
{{- define "common.configmap" -}}
|
||||
{{- /* Generate named configMaps as required */ -}}
|
||||
{{- range $name, $configmap := .Values.configmap }}
|
||||
{{- if $configmap.enabled -}}
|
||||
{{- $configmapValues := $configmap -}}
|
||||
|
||||
{{/* set the default nameOverride to the configMap name */}}
|
||||
{{- if not $configmapValues.nameOverride -}}
|
||||
{{- $_ := set $configmapValues "nameOverride" $name -}}
|
||||
{{ end -}}
|
||||
|
||||
{{- $_ := set $ "ObjectValues" (dict "configmap" $configmapValues) -}}
|
||||
{{- include "common.classes.configmap" $ }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
Reference in New Issue
Block a user