blob: f8ef8d145293f3fd5ddbf1bd0fd450d66a59ceef [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
15 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
16 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
17 command:
18 - /root/ready.py
19 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
30 image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}"
31 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
32 env:
33 - name: DELAY
34 value: "0"
35 {{- if .Values.global.allow_http }}
36 - 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 }}
63 {{- if .Values.nodeSelector }}
64 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
65 {{- end -}}
66 {{- if .Values.affinity }}
67 affinity: {{ toYaml .Values.affinity | nindent 8 }}
68 {{- end }}
69 volumes:
70 - name: localtime
71 hostPath:
72 path: /etc/localtime
73 - name: {{ include "common.fullname" . }}-dbc-dmaap
74 configMap:
75 name: {{ include "common.fullname" . }}-dbc-dmaap
76 - name: {{ include "common.fullname" . }}-dbc-dcaelocations
77 configMap:
78 name: {{ include "common.fullname" . }}-dbc-dcaelocations
79 - name: {{ include "common.fullname" . }}-dr-nodes
80 configMap:
81 name: {{ include "common.fullname" . }}-dr-nodes
82 - name: {{ include "common.fullname" . }}-feeds
83 configMap:
84 name: {{ include "common.fullname" . }}-feeds
85 - name: {{ include "common.fullname" . }}-mr-clusters
86 configMap:
87 name: {{ include "common.fullname" . }}-mr-clusters
88 - name: {{ include "common.fullname" . }}-topics
89 configMap:
90 name: {{ include "common.fullname" . }}-topics
91 imagePullSecrets:
92 - name: "{{ include "common.namespace" . }}-docker-registry-key"