[DMAAP] DMaaP ServiceMesh compatibility
[oom.git] / kubernetes / dmaap / components / dmaap-bc / templates / dmaap-provisioning-job.yaml
index f8ef8d1..ab6f573 100644 (file)
@@ -12,10 +12,10 @@ spec:
       restartPolicy: Never
       initContainers:
       - name: {{ include "common.name" . }}-init-readiness
-        image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
-        - /root/ready.py
+        - /app/ready.py
         args:
         - --container-name
         - dmaap-bc
@@ -27,12 +27,12 @@ spec:
               fieldPath: metadata.namespace
       containers:
       - name: dmaap-provisioning-job
-        image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}"
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.clientImage }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         env:
         - name: DELAY
           value: "0"
-    {{- if .Values.global.allow_http }}
+    {{- if or (include "common.onServiceMesh" .) .Values.global.allow_http }}
         - name: PROTO
           value: "http"
         - name: PORT
@@ -60,6 +60,7 @@ spec:
         - name:  {{ include "common.fullname" . }}-topics
           mountPath: /opt/app/config/topics/
         resources: {{ include "common.resources" . | nindent 10 }}
+      {{ include "common.waitForJobContainer" . | indent 6 | trim }}
         {{- if .Values.nodeSelector }}
       nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
         {{- end -}}