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}}" |
| 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 |
| 15 | spec: |
| 16 | template: |
| 17 | metadata: |
dglFromAtt | 655708d | 2019-03-18 16:30:47 +0000 | [diff] [blame] | 18 | name: {{ include "common.fullname" . }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 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 | |
| 26 | containers: |
| 27 | - name: post-install-job |
| 28 | image: "{{ include "common.repository" . }}/{{ .Values.global.clientImage }}" |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 29 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 30 | env: |
| 31 | - name: DELAY |
| 32 | value: "0" |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 33 | - name: PROTO |
pkaras | cd79084 | 2019-04-18 10:21:40 +0200 | [diff] [blame^] | 34 | value: "https" |
sunil.unnava | 02f077e | 2019-03-28 20:50:29 -0400 | [diff] [blame] | 35 | - name: PORT |
pkaras | cd79084 | 2019-04-18 10:21:40 +0200 | [diff] [blame^] | 36 | value: "8443" |
dglFromAtt | 671f59b | 2019-03-13 15:50:40 +0000 | [diff] [blame] | 37 | - name: REQUESTID |
| 38 | value: "{{.Chart.Name}}-post-install" |
| 39 | volumeMounts: |
| 40 | - mountPath: /etc/localtime |
| 41 | name: localtime |
| 42 | readOnly: true |
| 43 | |
| 44 | # NOTE: on the following several configMaps, careful to include / at end |
| 45 | # since there may be more than one file in each mountPath |
| 46 | # NOTE: the basename of the subdirectory of mountPath is important - it matches the DBCL API URI |
| 47 | - name: {{ include "common.fullname" . }}-dbc-dmaap |
| 48 | mountPath: /opt/app/config/dmaap/ |
| 49 | - name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 50 | mountPath: /opt/app/config/dcaeLocations/ |
| 51 | resources: |
| 52 | {{ include "common.resources" . | indent 10 }} |
| 53 | {{- if .Values.nodeSelector }} |
| 54 | nodeSelector: |
| 55 | {{ toYaml .Values.nodeSelector | indent 8 }} |
| 56 | {{- end -}} |
| 57 | {{- if .Values.affinity }} |
| 58 | affinity: |
| 59 | {{ toYaml .Values.affinity | indent 8 }} |
| 60 | {{- end }} |
| 61 | volumes: |
| 62 | - name: localtime |
| 63 | hostPath: |
| 64 | path: /etc/localtime |
| 65 | - name: {{ include "common.fullname" . }}-dbc-dmaap |
| 66 | configMap: |
| 67 | name: {{ include "common.fullname" . }}-dbc-dmaap |
| 68 | - name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 69 | configMap: |
| 70 | name: {{ include "common.fullname" . }}-dbc-dcaelocations |
| 71 | imagePullSecrets: |
| 72 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |