blob: 5637812437e4e99e12468ffe63f6082a3c1ddaff [file] [log] [blame]
dglFromAtt671f59b2019-03-13 15:50:40 +00001apiVersion: batch/v1
2kind: Job
3metadata:
4 name: {{ include "common.fullname" . }}-post-install
5 labels:
6 app.kubernetes.io/managed-by: {{.Release.Service | quote }}
7 app.kubernetes.io/instance: {{.Release.Name | quote }}
8 helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}"
9 annotations:
10 # This is what defines this resource as a hook. Without this line, the
11 # job is considered part of the release.
12 "helm.sh/hook": post-install
13 "helm.sh/hook-weight": "-5"
14 "helm.sh/hook-delete-policy": hook-succeeded
15spec:
16 template:
17 metadata:
dglFromAtt655708d2019-03-18 16:30:47 +000018 name: {{ include "common.fullname" . }}
dglFromAtt671f59b2019-03-13 15:50:40 +000019 labels:
20 app.kubernetes.io/managed-by: {{.Release.Service | quote }}
21 app.kubernetes.io/instance: {{.Release.Name | quote }}
22 helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}"
23 spec:
24 restartPolicy: Never
25 containers:
26 - name: post-install-job
27 image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}"
28 env:
29 - name: DELAY
30 value: "60"
31 - name: REQUESTID
32 value: "{{.Chart.Name}}-post-install"
33 volumeMounts:
34 - mountPath: /etc/localtime
35 name: localtime
36 readOnly: true
37
38# NOTE: on the following several configMaps, careful to include / at end
39# since there may be more than one file in each mountPath
40# NOTE: the basename of the subdirectory of mountPath is important - it matches the DBCL API URI
41 - name: {{ include "common.fullname" . }}-dbc-mrclusters
42 mountPath: /opt/app/config/mr_clusters/
43 - name: {{ include "common.fullname" . }}-dbc-topics
44 mountPath: /opt/app/config/topics/
45 resources:
46{{ include "common.resources" . | indent 10 }}
47 {{- if .Values.nodeSelector }}
48 nodeSelector:
49{{ toYaml .Values.nodeSelector | indent 8 }}
50 {{- end -}}
51 {{- if .Values.affinity }}
52 affinity:
53{{ toYaml .Values.affinity | indent 8 }}
54 {{- end }}
55 volumes:
56 - name: localtime
57 hostPath:
58 path: /etc/localtime
59 - name: {{ include "common.fullname" . }}-dbc-mrclusters
60 configMap:
61 name: {{ include "common.fullname" . }}-dbc-mrclusters
62 - name: {{ include "common.fullname" . }}-dbc-topics
63 configMap:
64 name: {{ include "common.fullname" . }}-dbc-topics
65 imagePullSecrets:
66 - name: "{{ include "common.namespace" . }}-docker-registry-key"