[COMMON/VID] Modified VID to use Shared DB.
[oom.git] / kubernetes / common / mariadb-init / templates / configmap.yaml
index d021d60..6708efd 100644 (file)
@@ -27,3 +27,19 @@ metadata:
     heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
+---
+{{ if .Values.dbScript }}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-dbscript
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ include "common.release" . }}
+    heritage: {{ .Release.Service }}
+data:
+  db_cmd.sh: |
+    {{ tpl .Values.dbScript . | indent 4 }}
+{{- end }}