[SDNC] SDNC ServiceMesh compatibility

SDNC charts and properties file changes to make it work with servicemesh

Issue-ID: OOM-2983
Signed-off-by: Radoslaw Chmiel <r.chmiel@partner.samsung.com>
Change-Id: I30bf8948f65d6a1b912c3f840ca44cead03bdc96
diff --git a/kubernetes/sdnc/templates/job.yaml b/kubernetes/sdnc/templates/job.yaml
index 11b1a87..b6dc32b 100755
--- a/kubernetes/sdnc/templates/job.yaml
+++ b/kubernetes/sdnc/templates/job.yaml
@@ -131,8 +131,28 @@
         command:
           - /bin/bash
         args:
-          - {{.Values.config.binDir }}/installSdncDb.sh
+          - -c
+          - |
+            sleep 60; {{.Values.config.binDir }}/installSdncDb.sh
         resources: {{ include "common.resources" . | nindent 10 }}
+      {{- if include "common.onServiceMesh" . }}
+      - name: sdnc-service-mesh-wait-for-job-container
+        image: {{ include "repositoryGenerator.image.quitQuit" . }}
+        imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        command:
+          - /bin/sh
+          - "-c"
+        args:
+          - |
+            echo "waiting 20s for istio side cars to be up"; sleep 20s;
+            /app/ready.py --service-mesh-check sdnc -t 45;
+        env:
+        - name: NAMESPACE
+          valueFrom:
+            fieldRef:
+              apiVersion: v1
+              fieldPath: metadata.namespace
+      {{- end }}
       {{- if .Values.nodeSelector }}
       nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
       {{- end }}