[DMAAP] Use common aaf template in dmaap-bc
[oom.git] / kubernetes / dmaap / components / dmaap-dr-node / templates / post-install-job.yaml
1 apiVersion: batch/v1
2 kind: Job
3 metadata: {{ include "common.resourceMetadata" (dict "dot" . "suffix" "post-install" "annotations" .Values.job.annotations) | nindent 2 }}
4 spec:
5   template:
6     metadata: {{- include "common.templateMetadata" . | nindent 6 }}
7     spec:
8       restartPolicy: Never
9       containers:
10       - name: post-install-job
11         image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}"
12         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
13         env:
14         - name: DELAY
15           value: "60"
16     {{- if .Values.global.allow_http }}
17         - name: PROTO
18           value: "http"
19         - name: PORT
20           value: "8080"
21     {{ end }}
22         - name: REQUESTID
23           value: "{{.Chart.Name}}-post-install"
24
25         volumeMounts:
26         - mountPath: /etc/localtime
27           name: localtime
28           readOnly: true
29
30 # NOTE: on the following several configMaps, careful to include / at end
31 #       since there may be more than one file in each mountPath
32 # NOTE: the basename of the subdirectory is important - it matches the DBCL API URI
33         - name: {{ include "common.fullname" . }}-dbc-drnodes
34           mountPath: /opt/app/config/dr_nodes/
35         resources: {{ include "common.resources" . | nindent 10 }}
36         {{- if .Values.nodeSelector }}
37       nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
38         {{- end -}}
39         {{- if .Values.affinity }}
40       affinity: {{ toYaml .Values.affinity | nindent 8 }}
41         {{- end }}
42       volumes:
43         - name: localtime
44           hostPath:
45             path: /etc/localtime
46         - name: {{ include "common.fullname" . }}-dbc-drnodes
47           configMap:
48             name: {{ include "common.fullname" . }}-dbc-drnodes
49       imagePullSecrets:
50       - name: "{{ include "common.namespace" . }}-docker-registry-key"