[COMMON/VID] Modified VID to use Shared DB.
This change modifies VID to use the shared DB instance of mariadb.
In addition, we create a mechanism in mariadb-init to allow a shared DB
user to run a script after the DB has been created.
The script can be passed as a configMap (as is the case with VID) or it
can be a standalone script that is passed as a string.
Issue-ID: OOM-1226
Change-Id: Ie51823338562a6fbe7472025d62cd4dba688168d
Signed-off-by: RPMishra <rpmishra@aarnanetworks.com>
Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com>
diff --git a/kubernetes/vid/templates/configmap.yaml b/kubernetes/vid/templates/configmap.yaml
index b1509a9..0ba466d 100644
--- a/kubernetes/vid/templates/configmap.yaml
+++ b/kubernetes/vid/templates/configmap.yaml
@@ -43,7 +43,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ include "common.fullname" . }}
+ name: {{ include "common.fullname" . }}-db-init
namespace: {{ include "common.namespace" . }}
labels:
app: {{ include "common.name" . }}
@@ -51,4 +51,4 @@
release: {{ include "common.release" . }}
heritage: {{ .Release.Service }}
data:
-{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
+{{ tpl (.Files.Glob "resources/config/db_cmd.sh").AsConfig . | indent 2 }}