blob: cb499cfae0c86a09cb0309808b6d98badeb5b800 [file] [log] [blame]
BorislavG57f74d32018-04-12 11:08:39 +03001#============LICENSE_START========================================================
2# ================================================================================
3# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
Durgpal7ad40692018-08-03 07:28:36 +00004# Modifications Copyright © 2018 Amdocs, Bell Canada
BorislavG57f74d32018-04-12 11:08:39 +03005# ================================================================================
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
19apiVersion: batch/v1
20kind: Job
21metadata:
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 }}
29spec:
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" . }}
BorislavGdf11cd52018-05-06 12:55:20 +000064 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
BorislavG57f74d32018-04-12 11:08:39 +030065 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 }}
Lusheng Ji98f947e2018-04-30 12:03:37 -040084 - name: DCAE_NAMESPACE
85 value: {{ .Values.dcae_ns | default "" }}
86 - name: ONAP_NAMESPACE
87 value: {{ include "common.namespace" . }}
BorislavG57f74d32018-04-12 11:08:39 +030088 volumes:
89 - name: {{ include "common.fullname" . }}-dcae-inputs
90 configMap:
91 name: {{ include "common.fullname" . }}-dcae-inputs
92 - name: {{ include "common.fullname" . }}-dcae-config
93 configMap:
94 name: {{ include "common.fullname" . }}-dcae-config
95 - name: localtime
96 hostPath:
97 path: /etc/localtime
98 imagePullSecrets:
99 - name: "{{ include "common.namespace" . }}-docker-registry-key"