--- /dev/null
+{{ if (.Files.Glob "files/docker-entrypoint-initdb.d/*[sh|js|json]") }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ template "mongodb.fullname" . }}-init-scripts
+ namespace: {{.Values.namespace }}
+ labels:
+ app: {{ template "mongodb.name" . }}
+ chart: {{ template "mongodb.chart" . }}
+ release: {{ .Release.Name | quote }}
+ heritage: {{ .Release.Service | quote }}
+data:
+{{ tpl (.Files.Glob "files/docker-entrypoint-initdb.d/*[sh|js|json]").AsConfig . | indent 2 }}
+{{ end }}