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 |
| 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}}" |
Ondřej Šmalec | 21a2b5e | 2019-08-14 15:50:06 +0200 | [diff] [blame] | 9 | release: {{ .Release.Name }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 10 | annotations: |
| 11 | # This is what defines this resource as a hook. Without this line, the |
| 12 | # job is considered part of the release. |
| 13 | "helm.sh/hook": post-install |
| 14 | "helm.sh/hook-weight": "-5" |
| 15 | "helm.sh/hook-delete-policy": hook-succeeded |
| 16 | spec: |
| 17 | template: |
| 18 | metadata: |
dglFromAtt | 655708d | 2019-03-18 16:30:47 +0000 | [diff] [blame] | 19 | name: {{ include "common.fullname" . }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 20 | labels: |
| 21 | app.kubernetes.io/managed-by: {{.Release.Service | quote }} |
| 22 | app.kubernetes.io/instance: {{.Release.Name | quote }} |
| 23 | helm.sh/chart: "{{.Chart.Name}}-{{.Chart.Version}}" |
Ondřej Šmalec | 21a2b5e | 2019-08-14 15:50:06 +0200 | [diff] [blame] | 24 | release: {{ .Release.Name }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 25 | spec: |
| 26 | restartPolicy: Never |
| 27 | |
| 28 | containers: |
| 29 | - name: post-install-job |
| 30 | image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}" |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 31 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 32 | env: |
| 33 | - name: DELAY |
| 34 | value: "0" |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 35 | - name: PROTO |
pkaras | cd79084 | 2019-04-18 10:21:40 +0200 | [diff] [blame] | 36 | value: "https" |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 37 | - name: PORT |
pkaras | cd79084 | 2019-04-18 10:21:40 +0200 | [diff] [blame] | 38 | value: "8443" |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 39 | - name: REQUESTID |
| 40 | value: "{{.Chart.Name}}-post-install" |
| 41 | volumeMounts: |
| 42 | - mountPath: /etc/localtime |
| 43 | name: localtime |
| 44 | readOnly: true |
| 45 | |
| 46 | # NOTE: on the following several configMaps, careful to include / at end |
| 47 | # since there may be more than one file in each mountPath |
| 48 | # NOTE: the basename of the subdirectory of mountPath is important - it matches the DBCL API URI |
| 49 | - name: {{ include "common.fullname" . }}-dbc-dmaap |
| 50 | mountPath: /opt/app/config/dmaap/ |
| 51 | - name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 52 | mountPath: /opt/app/config/dcaeLocations/ |
| 53 | resources: |
| 54 | {{ include "common.resources" . | indent 10 }} |
| 55 | {{- if .Values.nodeSelector }} |
| 56 | nodeSelector: |
| 57 | {{ toYaml .Values.nodeSelector | indent 8 }} |
| 58 | {{- end -}} |
| 59 | {{- if .Values.affinity }} |
| 60 | affinity: |
| 61 | {{ toYaml .Values.affinity | indent 8 }} |
| 62 | {{- end }} |
| 63 | volumes: |
| 64 | - name: localtime |
| 65 | hostPath: |
| 66 | path: /etc/localtime |
| 67 | - name: {{ include "common.fullname" . }}-dbc-dmaap |
| 68 | configMap: |
| 69 | name: {{ include "common.fullname" . }}-dbc-dmaap |
| 70 | - name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 71 | configMap: |
| 72 | name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 73 | imagePullSecrets: |
| 74 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |