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