blob: ab6f573a34f6645965f1e68005801a59cf74c5f9 [file] [log] [blame]
efiacorc75eacb2020-04-24 14:29:17 +01001apiVersion: batch/v1
2kind: Job
3metadata:
4 name: {{ include "common.fullname" . }}-dmaap-provisioning
5 namespace: {{ include "common.namespace" . }}
6 labels: {{- include "common.labels" . | nindent 4 }}
7spec:
efiacorea800572020-08-12 14:29:25 +01008 backoffLimit: 20
efiacorc75eacb2020-04-24 14:29:17 +01009 template:
10 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
11 spec:
12 restartPolicy: Never
13 initContainers:
14 - name: {{ include "common.name" . }}-init-readiness
Sylvain Desbureaux6b096542020-11-21 22:51:24 +010015 image: {{ include "repositoryGenerator.image.readiness" . }}
efiacorc75eacb2020-04-24 14:29:17 +010016 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
17 command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020018 - /app/ready.py
efiacorc75eacb2020-04-24 14:29:17 +010019 args:
20 - --container-name
21 - dmaap-bc
22 env:
23 - name: NAMESPACE
24 valueFrom:
25 fieldRef:
26 apiVersion: v1
27 fieldPath: metadata.namespace
28 containers:
29 - name: dmaap-provisioning-job
Sylvain Desbureaux6b096542020-11-21 22:51:24 +010030 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.clientImage }}
efiacorc75eacb2020-04-24 14:29:17 +010031 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
32 env:
33 - name: DELAY
34 value: "0"
Andreas Geissler0d5c9172022-04-19 18:10:52 +020035 {{- if or (include "common.onServiceMesh" .) .Values.global.allow_http }}
efiacorc75eacb2020-04-24 14:29:17 +010036 - name: PROTO
37 value: "http"
38 - name: PORT
39 value: "8080"
40 {{ end }}
41 - name: REQUESTID
42 value: "{{.Chart.Name}}-dmaap-provisioning"
43 volumeMounts:
44 - mountPath: /etc/localtime
45 name: localtime
46 readOnly: true
47# NOTE: on the following several configMaps, careful to include / at end
48# since there may be more than one file in each mountPath
49# NOTE: the basename of the subdirectory of mountPath is important - it matches the DBCL API URI
50 - name: {{ include "common.fullname" . }}-dbc-dmaap
51 mountPath: /opt/app/config/dmaap/
52 - name: {{ include "common.fullname" . }}-dbc-dcaelocations
53 mountPath: /opt/app/config/dcaeLocations/
54 - name: {{ include "common.fullname" . }}-dr-nodes
efiacor79148d12020-06-17 15:06:21 +010055 mountPath: /opt/app/config/dr_nodes/
efiacorc75eacb2020-04-24 14:29:17 +010056 - name: {{ include "common.fullname" . }}-feeds
57 mountPath: /opt/app/config/feeds/
58 - name: {{ include "common.fullname" . }}-mr-clusters
efiacor79148d12020-06-17 15:06:21 +010059 mountPath: /opt/app/config/mr_clusters/
efiacorc75eacb2020-04-24 14:29:17 +010060 - name: {{ include "common.fullname" . }}-topics
61 mountPath: /opt/app/config/topics/
62 resources: {{ include "common.resources" . | nindent 10 }}
Andreas Geissler0d5c9172022-04-19 18:10:52 +020063 {{ include "common.waitForJobContainer" . | indent 6 | trim }}
efiacorc75eacb2020-04-24 14:29:17 +010064 {{- if .Values.nodeSelector }}
65 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
66 {{- end -}}
67 {{- if .Values.affinity }}
68 affinity: {{ toYaml .Values.affinity | nindent 8 }}
69 {{- end }}
70 volumes:
71 - name: localtime
72 hostPath:
73 path: /etc/localtime
74 - name: {{ include "common.fullname" . }}-dbc-dmaap
75 configMap:
76 name: {{ include "common.fullname" . }}-dbc-dmaap
77 - name: {{ include "common.fullname" . }}-dbc-dcaelocations
78 configMap:
79 name: {{ include "common.fullname" . }}-dbc-dcaelocations
80 - name: {{ include "common.fullname" . }}-dr-nodes
81 configMap:
82 name: {{ include "common.fullname" . }}-dr-nodes
83 - name: {{ include "common.fullname" . }}-feeds
84 configMap:
85 name: {{ include "common.fullname" . }}-feeds
86 - name: {{ include "common.fullname" . }}-mr-clusters
87 configMap:
88 name: {{ include "common.fullname" . }}-mr-clusters
89 - name: {{ include "common.fullname" . }}-topics
90 configMap:
91 name: {{ include "common.fullname" . }}-topics
92 imagePullSecrets:
93 - name: "{{ include "common.namespace" . }}-docker-registry-key"