updating helm/docker files and database config files
[it/otf.git] / otf-helm / otf / charts / databases / mongodb / templates / initialization-configmap.yaml
diff --git a/otf-helm/otf/charts/databases/mongodb/templates/initialization-configmap.yaml b/otf-helm/otf/charts/databases/mongodb/templates/initialization-configmap.yaml
new file mode 100644 (file)
index 0000000..34a854d
--- /dev/null
@@ -0,0 +1,14 @@
+{{ 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 }}