dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 1 | apiVersion: batch/v1 |
| 2 | kind: Job |
| 3 | metadata: |
| 4 | name: {{ include "common.fullname" . }}-post-install |
Sylvain Desbureaux | 0de113e | 2020-03-10 09:57:25 +0100 | [diff] [blame] | 5 | namespace: {{ include "common.namespace" . }} |
| 6 | labels: {{- include "common.labels" . | nindent 4 }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 7 | annotations: |
| 8 | # This is what defines this resource as a hook. Without this line, the |
| 9 | # job is considered part of the release. |
| 10 | "helm.sh/hook": post-install |
| 11 | "helm.sh/hook-weight": "-5" |
| 12 | "helm.sh/hook-delete-policy": hook-succeeded |
| 13 | spec: |
| 14 | template: |
Sylvain Desbureaux | 0de113e | 2020-03-10 09:57:25 +0100 | [diff] [blame] | 15 | metadata: {{- include "common.templateMetadata" . | nindent 6 }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 16 | spec: |
| 17 | restartPolicy: Never |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 18 | containers: |
| 19 | - name: post-install-job |
| 20 | image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}" |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 21 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 22 | env: |
| 23 | - name: DELAY |
| 24 | value: "0" |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 25 | - name: PROTO |
Sylvain Desbureaux | 0de113e | 2020-03-10 09:57:25 +0100 | [diff] [blame] | 26 | {{- if (include "common.needTLS" .) }} |
pkaras | cd79084 | 2019-04-18 10:21:40 +0200 | [diff] [blame] | 27 | value: "https" |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 28 | - name: PORT |
pkaras | cd79084 | 2019-04-18 10:21:40 +0200 | [diff] [blame] | 29 | value: "8443" |
Sylvain Desbureaux | 0de113e | 2020-03-10 09:57:25 +0100 | [diff] [blame] | 30 | {{- else }} |
| 31 | value: "http" |
| 32 | - name: PORT |
| 33 | value: "8080" |
| 34 | {{- end }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 35 | - name: REQUESTID |
| 36 | value: "{{.Chart.Name}}-post-install" |
| 37 | volumeMounts: |
| 38 | - mountPath: /etc/localtime |
| 39 | name: localtime |
| 40 | readOnly: true |
| 41 | |
| 42 | # NOTE: on the following several configMaps, careful to include / at end |
| 43 | # since there may be more than one file in each mountPath |
| 44 | # NOTE: the basename of the subdirectory of mountPath is important - it matches the DBCL API URI |
| 45 | - name: {{ include "common.fullname" . }}-dbc-dmaap |
| 46 | mountPath: /opt/app/config/dmaap/ |
| 47 | - name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 48 | mountPath: /opt/app/config/dcaeLocations/ |
Sylvain Desbureaux | 0de113e | 2020-03-10 09:57:25 +0100 | [diff] [blame] | 49 | resources: {{ include "common.resources" . | nindent 10 }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 50 | {{- if .Values.nodeSelector }} |
Sylvain Desbureaux | 0de113e | 2020-03-10 09:57:25 +0100 | [diff] [blame] | 51 | nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 52 | {{- end -}} |
| 53 | {{- if .Values.affinity }} |
Sylvain Desbureaux | 0de113e | 2020-03-10 09:57:25 +0100 | [diff] [blame] | 54 | affinity: {{ toYaml .Values.affinity | nindent 8 }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 55 | {{- end }} |
| 56 | volumes: |
| 57 | - name: localtime |
| 58 | hostPath: |
| 59 | path: /etc/localtime |
| 60 | - name: {{ include "common.fullname" . }}-dbc-dmaap |
| 61 | configMap: |
| 62 | name: {{ include "common.fullname" . }}-dbc-dmaap |
| 63 | - name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 64 | configMap: |
| 65 | name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 66 | imagePullSecrets: |
| 67 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |