blob: 1f7214f3ec5b2894fc3907d49d53f9056b399a94 [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:
18 name: "{{.Release.Name}}"
19 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: "30"
31 - name: REQUESTID
32 value: "{{.Chart.Name}}-post-install"
33
34 volumeMounts:
35 - mountPath: /etc/localtime
36 name: localtime
37 readOnly: true
38
39# NOTE: on the following several configMaps, careful to include / at end
40# since there may be more than one file in each mountPath
41# NOTE: the basename of the subdirectory is important - it matches the DBCL API URI
42 - name: {{ include "common.fullname" . }}-dbc-feeds
43 mountPath: /opt/app/config/feeds/
44 - name: {{ include "common.fullname" . }}-dbc-drpubs
45 mountPath: /opt/app/config/dr_pubs/
46 - name: {{ include "common.fullname" . }}-dbc-drsubs
47 mountPath: /opt/app/config/dr_subs/
48 resources:
49{{ include "common.resources" . | indent 10 }}
50 {{- if .Values.nodeSelector }}
51 nodeSelector:
52{{ toYaml .Values.nodeSelector | indent 8 }}
53 {{- end -}}
54 {{- if .Values.affinity }}
55 affinity:
56{{ toYaml .Values.affinity | indent 8 }}
57 {{- end }}
58 volumes:
59 - name: localtime
60 hostPath:
61 path: /etc/localtime
62# - name: {{ include "common.name" . }}-config
63# configMap:
64# name: {{ include "common.fullname" . }}-config
65 - name: {{ include "common.fullname" . }}-dbc-feeds
66 configMap:
67 name: {{ include "common.fullname" . }}-dbc-feeds
68 - name: {{ include "common.fullname" . }}-dbc-drpubs
69 configMap:
70 name: {{ include "common.fullname" . }}-dbc-drpubs
71 - name: {{ include "common.fullname" . }}-dbc-drsubs
72 configMap:
73 name: {{ include "common.fullname" . }}-dbc-drsubs
74 imagePullSecrets:
75 - name: "{{ include "common.namespace" . }}-docker-registry-key"