BorislavG | 57f74d3 | 2018-04-12 11:08:39 +0300 | [diff] [blame] | 1 | #============LICENSE_START======================================================== |
| 2 | # ================================================================================ |
| 3 | # Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved. |
| 4 | # Copyright © 2018 Amdocs, Bell Canada |
| 5 | # ================================================================================ |
| 6 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 7 | # you may not use this file except in compliance with the License. |
| 8 | # You may obtain a copy of the License at |
| 9 | # |
| 10 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 11 | # |
| 12 | # Unless required by applicable law or agreed to in writing, software |
| 13 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 15 | # See the License for the specific language governing permissions and |
| 16 | # limitations under the License. |
| 17 | # ============LICENSE_END========================================================= |
| 18 | |
| 19 | apiVersion: batch/v1 |
| 20 | kind: Job |
| 21 | metadata: |
| 22 | name: {{ include "common.fullname" . }} |
| 23 | namespace: {{ include "common.namespace" . }} |
| 24 | labels: |
| 25 | app: {{ include "common.name" . }} |
| 26 | chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} |
| 27 | release: {{ .Release.Name }} |
| 28 | heritage: {{ .Release.Service }} |
| 29 | spec: |
| 30 | completions: 1 |
| 31 | {{/* backoffLimit: 0*/}} |
| 32 | template: |
| 33 | metadata: |
| 34 | labels: |
| 35 | app: {{ include "common.name" . }} |
| 36 | release: {{ .Release.Name }} |
| 37 | spec: |
| 38 | restartPolicy: Never |
| 39 | initContainers: |
| 40 | - name: {{ include "common.name" . }}-readiness |
| 41 | image: {{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }} |
| 42 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 43 | command: |
| 44 | - /root/ready.py |
| 45 | args: |
| 46 | - --container-name |
| 47 | - dcae-cloudify-manager |
| 48 | - --container-name |
| 49 | - consul-server |
| 50 | - --container-name |
| 51 | - msb-discovery |
| 52 | - --container-name |
| 53 | - kube2msb |
| 54 | - "-t" |
| 55 | - "15" |
| 56 | env: |
| 57 | - name: NAMESPACE |
| 58 | valueFrom: |
| 59 | fieldRef: |
| 60 | apiVersion: v1 |
| 61 | fieldPath: metadata.namespace |
| 62 | containers: |
| 63 | - name: {{ include "common.name" . }} |
| 64 | image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}" |
| 65 | imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }} |
| 66 | volumeMounts: |
| 67 | - mountPath: /inputs |
| 68 | name: {{ include "common.fullname" . }}-dcae-inputs |
| 69 | - mountPath: /dcae-configs |
| 70 | name: {{ include "common.fullname" . }}-dcae-config |
| 71 | - mountPath: /etc/localtime |
| 72 | name: localtime |
| 73 | readOnly: true |
| 74 | env: |
| 75 | - name: CMADDR |
| 76 | value: {{ .Values.config.address.cm }} |
| 77 | - name: CMPASS |
| 78 | valueFrom: |
| 79 | secretKeyRef: |
| 80 | name: {{ include "common.name" . }}-cmpass |
| 81 | key: password |
| 82 | - name: CONSUL |
| 83 | value: {{ .Values.config.address.consul.host }}:{{ .Values.config.address.consul.port }} |
| 84 | volumes: |
| 85 | - name: {{ include "common.fullname" . }}-dcae-inputs |
| 86 | configMap: |
| 87 | name: {{ include "common.fullname" . }}-dcae-inputs |
| 88 | - name: {{ include "common.fullname" . }}-dcae-config |
| 89 | configMap: |
| 90 | name: {{ include "common.fullname" . }}-dcae-config |
| 91 | - name: localtime |
| 92 | hostPath: |
| 93 | path: /etc/localtime |
| 94 | imagePullSecrets: |
| 95 | - name: "{{ include "common.namespace" . }}-docker-registry-key" |