[DMAAP] Update datarouter image versions
[oom.git] / kubernetes / dmaap / components / dmaap-bc / templates / dmaap-provisioning-job.yaml
1 {{/*
2   # ============LICENSE_START===================================================
3   #  Copyright (C) 2022 Nordix Foundation
4   # ============================================================================
5   # Licensed under the Apache License, Version 2.0 (the "License");
6   # you may not use this file except in compliance with the License.
7   # You may obtain a copy of the License at
8   #
9   #      http://www.apache.org/licenses/LICENSE-2.0
10   #
11   # Unless required by applicable law or agreed to in writing, software
12   # distributed under the License is distributed on an "AS IS" BASIS,
13   # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   # See the License for the specific language governing permissions and
15   # limitations under the License.
16   #
17   # SPDX-License-Identifier: Apache-2.0
18   # ============LICENSE_END=====================================================
19 */}}
20 apiVersion: batch/v1
21 kind: Job
22 metadata:
23   name: {{ include "common.fullname" . }}-dmaap-provisioning
24   namespace: {{ include "common.namespace" . }}
25   labels: {{- include "common.labels" . | nindent 4 }}
26 spec:
27   backoffLimit: 20
28   template:
29     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
30     spec:
31       restartPolicy: Never
32       initContainers:
33       - name: {{ include "common.name" . }}-init-readiness
34         image: {{ include "repositoryGenerator.image.readiness" . }}
35         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
36         command:
37         - /app/ready.py
38         args:
39         - --container-name
40         - {{ include "common.name" . }}
41         env:
42         - name: NAMESPACE
43           valueFrom:
44             fieldRef:
45               apiVersion: v1
46               fieldPath: metadata.namespace
47       containers:
48       - name: dmaap-provisioning-job
49         image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.dbcClientImage }}
50         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51         env:
52         - name: DELAY
53           value: "0"
54         - name: PROTO
55           value: "http"
56         - name: PORT
57           value: "8080"
58         - name: REQUESTID
59           value: "{{.Chart.Name}}-dmaap-provisioning"
60         volumeMounts:
61         - mountPath: /etc/localtime
62           name: localtime
63           readOnly: true
64 # NOTE: on the following several configMaps, careful to include / at end
65 #       since there may be more than one file in each mountPath
66 # NOTE: the basename of the subdirectory of mountPath is important - it matches the DBCL API URI
67         - name:  {{ include "common.fullname" . }}-dbc-dmaap
68           mountPath: /opt/app/config/dmaap/
69         - name:  {{ include "common.fullname" . }}-dbc-dcaelocations
70           mountPath: /opt/app/config/dcaeLocations/
71         - name:  {{ include "common.fullname" . }}-dr-nodes
72           mountPath: /opt/app/config/dr_nodes/
73         - name:  {{ include "common.fullname" . }}-feeds
74           mountPath: /opt/app/config/feeds/
75         - name:  {{ include "common.fullname" . }}-mr-clusters
76           mountPath: /opt/app/config/mr_clusters/
77         - name:  {{ include "common.fullname" . }}-topics
78           mountPath: /opt/app/config/topics/
79         resources: {{ include "common.resources" . | nindent 10 }}
80       {{ include "common.waitForJobContainer" . | indent 6 | trim }}
81         {{- if .Values.nodeSelector }}
82       nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
83         {{- end -}}
84         {{- if .Values.affinity }}
85       affinity: {{ toYaml .Values.affinity | nindent 8 }}
86         {{- end }}
87       serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
88       volumes:
89         - name: localtime
90           hostPath:
91             path: /etc/localtime
92         - name: {{ include "common.fullname" . }}-dbc-dmaap
93           configMap:
94             name: {{ include "common.fullname" . }}-dbc-dmaap
95         - name: {{ include "common.fullname" . }}-dbc-dcaelocations
96           configMap:
97             name: {{ include "common.fullname" . }}-dbc-dcaelocations
98         - name: {{ include "common.fullname" . }}-dr-nodes
99           configMap:
100             name: {{ include "common.fullname" . }}-dr-nodes
101         - name: {{ include "common.fullname" . }}-feeds
102           configMap:
103             name: {{ include "common.fullname" . }}-feeds
104         - name: {{ include "common.fullname" . }}-mr-clusters
105           configMap:
106             name: {{ include "common.fullname" . }}-mr-clusters
107         - name: {{ include "common.fullname" . }}-topics
108           configMap:
109             name: {{ include "common.fullname" . }}-topics
110       imagePullSecrets:
111       - name: "{{ include "common.namespace" . }}-docker-registry-key"