Skip to content
Snippets Groups Projects
Commit 32bf8a94 authored by Andri Joos's avatar Andri Joos :blush:
Browse files

add configmap template

parent f77bb704
No related branches found
No related tags found
No related merge requests found
{{- define "common.configmap" -}}
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .Values.name | default "configmap" | quote }}
{{- with .Values.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "common.variables.labels" . | nindent 4 }}
data:
{{- (include "common.variables.configmap.data" .) | nindent 2 }}
---
{{- end }}
...@@ -59,3 +59,14 @@ Secret data ...@@ -59,3 +59,14 @@ Secret data
{{- end }} {{- end }}
{{- toYaml $data -}} {{- toYaml $data -}}
{{- end }} {{- end }}
{{/*
ConfigMap data
*/}}
{{- define "common.variables.configmap.data" -}}
{{- $data := dict -}}
{{- range $key, $value := .Values.data -}}
{{- $data = merge $data (dict $key $value) -}}
{{- end }}
{{- toYaml $data -}}
{{- end }}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment