blob: 6d246de87fd42122488f81e97a0c612d3b3d828e [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
sunil.unnava02f077e2019-03-28 20:50:29 -040013 "helm.sh/hook-weight": "-4"
dglFromAtt671f59b2019-03-13 15:50:40 +000014 "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 }}"
sunil.unnava02f077e2019-03-28 20:50:29 -040028 imagePullPolicy: "Always"
dglFromAtt671f59b2019-03-13 15:50:40 +000029 env:
30 - name: DELAY
sunil.unnava02f077e2019-03-28 20:50:29 -040031 value: "30"
32 - name: PROTO
33 value: "http"
34 - name: PORT
35 value: "8080"
dglFromAtt671f59b2019-03-13 15:50:40 +000036 - name: REQUESTID
37 value: "{{.Chart.Name}}-post-install"
38 volumeMounts:
39 - mountPath: /etc/localtime
40 name: localtime
41 readOnly: true
42
43# NOTE: on the following several configMaps, careful to include / at end
44# since there may be more than one file in each mountPath
45# NOTE: the basename of the subdirectory of mountPath is important - it matches the DBCL API URI
46 - name: {{ include "common.fullname" . }}-dbc-mrclusters
47 mountPath: /opt/app/config/mr_clusters/
48 - name: {{ include "common.fullname" . }}-dbc-topics
49 mountPath: /opt/app/config/topics/
50 resources:
51{{ include "common.resources" . | indent 10 }}
52 {{- if .Values.nodeSelector }}
53 nodeSelector:
54{{ toYaml .Values.nodeSelector | indent 8 }}
55 {{- end -}}
56 {{- if .Values.affinity }}
57 affinity:
58{{ toYaml .Values.affinity | indent 8 }}
59 {{- end }}
60 volumes:
61 - name: localtime
62 hostPath:
63 path: /etc/localtime
64 - name: {{ include "common.fullname" . }}-dbc-mrclusters
65 configMap:
66 name: {{ include "common.fullname" . }}-dbc-mrclusters
67 - name: {{ include "common.fullname" . }}-dbc-topics
68 configMap:
69 name: {{ include "common.fullname" . }}-dbc-topics
70 imagePullSecrets:
71 - name: "{{ include "common.namespace" . }}-docker-registry-key"