[DMAAP] Update datarouter image versions
[oom.git] / kubernetes / dmaap / components / dmaap-bc / templates / dmaap-provisioning-job.yaml
index ac176a9..f449245 100644 (file)
@@ -1,3 +1,22 @@
+{{/*
+  # ============LICENSE_START===================================================
+  #  Copyright (C) 2022 Nordix Foundation
+  # ============================================================================
+  # Licensed under the Apache License, Version 2.0 (the "License");
+  # you may not use this file except in compliance with the License.
+  # You may obtain a copy of the License at
+  #
+  #      http://www.apache.org/licenses/LICENSE-2.0
+  #
+  # Unless required by applicable law or agreed to in writing, software
+  # distributed under the License is distributed on an "AS IS" BASIS,
+  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  # See the License for the specific language governing permissions and
+  # limitations under the License.
+  #
+  # SPDX-License-Identifier: Apache-2.0
+  # ============LICENSE_END=====================================================
+*/}}
 apiVersion: batch/v1
 kind: Job
 metadata:
@@ -12,13 +31,13 @@ spec:
       restartPolicy: Never
       initContainers:
       - name: {{ include "common.name" . }}-init-readiness
-        image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
+        image: {{ include "repositoryGenerator.image.readiness" . }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         command:
         - /app/ready.py
         args:
         - --container-name
-        - dmaap-bc
+        - {{ include "common.name" . }}
         env:
         - name: NAMESPACE
           valueFrom:
@@ -27,17 +46,15 @@ spec:
               fieldPath: metadata.namespace
       containers:
       - name: dmaap-provisioning-job
-        image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}"
+        image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.dbcClientImage }}
         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
         env:
         - name: DELAY
           value: "0"
-    {{- if .Values.global.allow_http }}
         - name: PROTO
           value: "http"
         - name: PORT
           value: "8080"
-    {{ end }}
         - name: REQUESTID
           value: "{{.Chart.Name}}-dmaap-provisioning"
         volumeMounts:
@@ -60,12 +77,14 @@ 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 -}}
         {{- if .Values.affinity }}
       affinity: {{ toYaml .Values.affinity | nindent 8 }}
         {{- end }}
+      serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
       volumes:
         - name: localtime
           hostPath: