blob: d03d61690c744803e6ed890d890001c4aad142ab [file] [log] [blame]
dglFromAtt671f59b2019-03-13 15:50:40 +00001apiVersion: batch/v1
2kind: Job
Sylvain Desbureauxf7768e82020-03-23 16:48:20 +01003metadata: {{ include "common.resourceMetadata" (dict "dot" . "suffix" "post-install" "annotations" .Values.job.annotations) | nindent 2 }}
dglFromAtt671f59b2019-03-13 15:50:40 +00004spec:
5 template:
Sylvain Desbureauxf7768e82020-03-23 16:48:20 +01006 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
dglFromAtt671f59b2019-03-13 15:50:40 +00007 spec:
8 restartPolicy: Never
9 containers:
10 - name: post-install-job
11 image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}"
sunil.unnava02f077e2019-03-28 20:50:29 -040012 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
dglFromAtt671f59b2019-03-13 15:50:40 +000013 env:
14 - name: DELAY
15 value: "60"
efiacor338e9662019-05-15 10:48:17 +000016 {{- if .Values.global.allow_http }}
sunil.unnava02f077e2019-03-28 20:50:29 -040017 - name: PROTO
18 value: "http"
19 - name: PORT
20 value: "8080"
efiacor338e9662019-05-15 10:48:17 +000021 {{ end }}
dglFromAtt671f59b2019-03-13 15:50:40 +000022 - 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/
Sylvain Desbureauxf7768e82020-03-23 16:48:20 +010035 resources: {{ include "common.resources" . | nindent 10 }}
dglFromAtt671f59b2019-03-13 15:50:40 +000036 {{- if .Values.nodeSelector }}
Sylvain Desbureauxf7768e82020-03-23 16:48:20 +010037 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
dglFromAtt671f59b2019-03-13 15:50:40 +000038 {{- end -}}
39 {{- if .Values.affinity }}
Sylvain Desbureauxf7768e82020-03-23 16:48:20 +010040 affinity: {{ toYaml .Values.affinity | nindent 8 }}
dglFromAtt671f59b2019-03-13 15:50:40 +000041 {{- 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"