dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 1 | apiVersion: batch/v1 |
| 2 | kind: Job |
Sylvain Desbureaux | f7768e8 | 2020-03-23 16:48:20 +0100 | [diff] [blame] | 3 | metadata: {{ include "common.resourceMetadata" (dict "dot" . "suffix" "post-install" "annotations" .Values.job.annotations) | nindent 2 }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 4 | spec: |
| 5 | template: |
Sylvain Desbureaux | f7768e8 | 2020-03-23 16:48:20 +0100 | [diff] [blame] | 6 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 7 | spec: |
| 8 | restartPolicy: Never |
| 9 | containers: |
| 10 | - name: post-install-job |
| 11 | image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}" |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 12 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 13 | env: |
| 14 | - name: DELAY |
| 15 | value: "60" |
efiacor | 338e966 | 2019-05-15 10:48:17 +0000 | [diff] [blame] | 16 | {{- if .Values.global.allow_http }} |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 17 | - name: PROTO |
| 18 | value: "http" |
| 19 | - name: PORT |
| 20 | value: "8080" |
efiacor | 338e966 | 2019-05-15 10:48:17 +0000 | [diff] [blame] | 21 | {{ end }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 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/ |
Sylvain Desbureaux | f7768e8 | 2020-03-23 16:48:20 +0100 | [diff] [blame] | 35 | resources: {{ include "common.resources" . | nindent 10 }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 36 | {{- if .Values.nodeSelector }} |
Sylvain Desbureaux | f7768e8 | 2020-03-23 16:48:20 +0100 | [diff] [blame] | 37 | nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 38 | {{- end -}} |
| 39 | {{- if .Values.affinity }} |
Sylvain Desbureaux | f7768e8 | 2020-03-23 16:48:20 +0100 | [diff] [blame] | 40 | affinity: {{ toYaml .Values.affinity | nindent 8 }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 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" |