[SDC] Service Mesh Compliance for SDC
[oom.git] / kubernetes / sdc / components / sdc-onboarding-be / templates / job.yaml
index c8edb29..bfc1ef8 100644 (file)
@@ -62,6 +62,13 @@ spec:
       - name: {{ include "common.name" . }}-job
         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.onboardingInitImage }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+        {{- if include "common.onServiceMesh" . }}
+        args:
+        - echo "waiting 10s for istio side cars to be up"; sleep 10s; /home/sdc/startup.sh
+        command:
+        - /bin/sh
+        - -c
+        {{- end }}
         volumeMounts:
         - name: {{ include "common.fullname" . }}-environments
           mountPath: /home/sdc/chef-solo/environments/
@@ -82,7 +89,7 @@ spec:
           valueFrom:
             secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: cs_password}
         - name: CS_HOST_IP
-          value: "{{ .Values.global.cassandra.serviceName }}"
+          value: "{{ .Values.global.sdc_cassandra.serviceName }}"
         resources:
           limits:
             cpu: 800m
@@ -90,6 +97,7 @@ spec:
           requests:
             cpu: 200m
             memory: 200Mi
+      {{ include "common.waitForJobContainer" . | indent 6 | trim }}
       volumes:
       - name: {{ include "common.fullname" . }}-environments
         configMap: