[AAI] Service Mesh compatibility
[oom.git] / kubernetes / aai / components / aai-graphadmin / templates / job-create-db.yaml
index dce8324..7c078e9 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 #
 # ============LICENSE_START=======================================================
 # org.onap.aai
@@ -30,6 +31,7 @@
 # that resources traversal and graphadmin wait until this job is done
 # If you are using an existing cassandra cluster not coming from oom
 # then it is your job to ensure that there are no connections to the database
+*/}}
 
 {{- if and ( not .Values.global.jobs.migration.enabled ) ( .Values.global.jobs.createSchema.enabled ) }}
 apiVersion: batch/v1
@@ -78,8 +80,10 @@ spec:
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
         - /bin/bash
-        - docker-entrypoint.sh
-        - createDBSchema.sh
+        - -c
+        - |
+           bash docker-entrypoint.sh createDBSchema.sh ;
+           {{- include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
         env:
         - name: LOCAL_USER_ID
           value: {{ .Values.global.config.userId | quote }}
@@ -147,5 +151,5 @@ spec:
             {{ end }}
       restartPolicy: Never
       imagePullSecrets:
-      - name: "{{ include "common.namespace" . }}-docker-registry-key"
+      - name: {{ include "common.namespace" . }}-docker-registry-key
 {{ end }}