blob: b4249aede142e9452e04d42cc660698aa86fc7b9 [file] [log] [blame]
vaibhav_16dece04b2fe2018-03-22 09:07:12 +00001# Copyright © 2017 Amdocs, Bell Canada
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
Mandeep Khinda4b881972017-08-30 14:24:02 +000015apiVersion: extensions/v1beta1
16kind: Deployment
17metadata:
kj9bf27312018-03-19 15:07:44 +020018 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
20 labels:
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ .Release.Name }}
24 heritage: {{ .Release.Service }}
Mandeep Khinda4b881972017-08-30 14:24:02 +000025spec:
kj9bf27312018-03-19 15:07:44 +020026 replicas: {{ .Values.replicaCount }}
Mandeep Khinda4b881972017-08-30 14:24:02 +000027 selector:
28 matchLabels:
kj9bf27312018-03-19 15:07:44 +020029 app: {{ include "common.name" . }}
Mandeep Khinda4b881972017-08-30 14:24:02 +000030 template:
31 metadata:
32 labels:
kj9bf27312018-03-19 15:07:44 +020033 app: {{ include "common.name" . }}
34 release: {{ .Release.Name }}
35 name: {{ include "common.name" . }}
AdrianSlavkovsky03cc5892018-03-08 09:55:53 +010036 annotations:
37 msb.onap.org/service-info: '[
38 {
39 "serviceName": "_aai-generic-query",
40 "version": "v11",
41 "url": "/aai/v11/search/generic-query",
42 "protocol": "REST",
43 "port": "8446",
44 "enable_ssl": true,
45 "lb_policy":"ip_hash",
46 "visualRange": "1",
47 "path": "/aai/v11/search/generic-query"
48 },
49 {
50 "serviceName": "_aai-generic-query",
51 "version": "v12",
52 "url": "/aai/v12/search/generic-query",
53 "protocol": "REST",
54 "port": "8446",
55 "enable_ssl": true,
56 "lb_policy":"ip_hash",
57 "visualRange": "1",
58 "path": "/aai/v12/search/generic-query"
59 },
60 {
61 "serviceName": "_aai-generic-query",
62 "version": "v13",
63 "url": "/aai/v13/search/generic-query",
64 "protocol": "REST",
65 "port": "8446",
66 "enable_ssl": true,
67 "lb_policy":"ip_hash",
68 "visualRange": "1",
69 "path": "/aai/v13/search/generic-query"
70 },
71 {
72 "serviceName": "_aai-nodes-query",
73 "version": "v11",
74 "url": "/aai/v11/search/nodes-query",
75 "protocol": "REST",
76 "port": "8446",
77 "enable_ssl": true,
78 "lb_policy":"ip_hash",
79 "visualRange": "1",
80 "path": "/aai/v11/search/nodes-query"
81 },
82 {
83 "serviceName": "_aai-nodes-query",
84 "version": "v12",
85 "url": "/aai/v12/search/nodes-query",
86 "protocol": "REST",
87 "port": "8446",
88 "enable_ssl": true,
89 "lb_policy":"ip_hash",
90 "visualRange": "1",
91 "path": "/aai/v12/search/nodes-query"
92 },
93 {
94 "serviceName": "_aai-nodes-query",
95 "version": "v13",
96 "url": "/aai/v13/search/nodes-query",
97 "protocol": "REST",
98 "port": "8446",
99 "enable_ssl": true,
100 "lb_policy":"ip_hash",
101 "visualRange": "1",
102 "path": "/aai/v13/search/nodes-query"
103 },
104 {
105 "serviceName": "_aai-query",
106 "version": "v11",
107 "url": "/aai/v11/query",
108 "protocol": "REST",
109 "port": "8446",
110 "enable_ssl": true,
111 "lb_policy":"ip_hash",
112 "visualRange": "1",
113 "path": "/aai/v11/query"
114 },
115 {
116 "serviceName": "_aai-query",
117 "version": "v12",
118 "url": "/aai/v12/query",
119 "protocol": "REST",
120 "port": "8446",
121 "enable_ssl": true,
122 "lb_policy":"ip_hash",
123 "visualRange": "1",
124 "path": "/aai/v12/query"
125 },
126 {
127 "serviceName": "_aai-query",
128 "version": "v13",
129 "url": "/aai/v13/query",
130 "protocol": "REST",
131 "port": "8446",
132 "enable_ssl": true,
133 "lb_policy":"ip_hash",
134 "visualRange": "1",
135 "path": "/aai/v13/query"
136 },
137 {
138 "serviceName": "_aai-named-query",
139 "url": "/aai/search",
140 "protocol": "REST",
141 "port": "8446",
142 "enable_ssl": true,
143 "lb_policy":"ip_hash",
144 "visualRange": "1",
145 "path": "/aai/search"
146 },
147 {
148 "serviceName": "aai-generic-query",
149 "version": "v11",
150 "url": "/aai/v11/search/generic-query",
151 "protocol": "REST",
152 "port": "8446",
153 "enable_ssl": true,
154 "lb_policy":"ip_hash",
155 "visualRange": "1"
156 },
157 {
158 "serviceName": "aai-generic-query",
159 "version": "v12",
160 "url": "/aai/v12/search/generic-query",
161 "protocol": "REST",
162 "port": "8446",
163 "enable_ssl": true,
164 "lb_policy":"ip_hash",
165 "visualRange": "1"
166 },
167 {
168 "serviceName": "aai-generic-query",
169 "version": "v13",
170 "url": "/aai/v13/search/generic-query",
171 "protocol": "REST",
172 "port": "8446",
173 "enable_ssl": true,
174 "lb_policy":"ip_hash",
175 "visualRange": "1"
176 },
177 {
178 "serviceName": "aai-nodes-query",
179 "version": "v11",
180 "url": "/aai/v11/search/nodes-query",
181 "protocol": "REST",
182 "port": "8446",
183 "enable_ssl": true,
184 "lb_policy":"ip_hash",
185 "visualRange": "1"
186 },
187 {
188 "serviceName": "aai-nodes-query",
189 "version": "v12",
190 "url": "/aai/v12/search/nodes-query",
191 "protocol": "REST",
192 "port": "8446",
193 "enable_ssl": true,
194 "lb_policy":"ip_hash",
195 "visualRange": "1"
196 },
197 {
198 "serviceName": "aai-nodes-query",
199 "version": "v13",
200 "url": "/aai/v13/search/nodes-query",
201 "protocol": "REST",
202 "port": "8446",
203 "enable_ssl": true,
204 "lb_policy":"ip_hash",
205 "visualRange": "1"
206 },
207 {
208 "serviceName": "aai-query",
209 "version": "v11",
210 "url": "/aai/v11/query",
211 "protocol": "REST",
212 "port": "8446",
213 "enable_ssl": true,
214 "lb_policy":"ip_hash",
215 "visualRange": "1"
216 },
217 {
218 "serviceName": "aai-query",
219 "version": "v12",
220 "url": "/aai/v12/query",
221 "protocol": "REST",
222 "port": "8446",
223 "enable_ssl": true,
224 "lb_policy":"ip_hash",
225 "visualRange": "1"
226 },
227 {
228 "serviceName": "aai-query",
229 "version": "v13",
230 "url": "/aai/v13/query",
231 "protocol": "REST",
232 "port": "8446",
233 "enable_ssl": true,
234 "lb_policy":"ip_hash",
235 "visualRange": "1"
236 },
237 {
238 "serviceName": "aai-named-query",
239 "url": "/aai/search",
240 "protocol": "REST",
241 "port": "8446",
242 "enable_ssl": true,
243 "lb_policy":"ip_hash",
244 "visualRange": "1"
245 }
246 ]'
Mandeep Khinda4b881972017-08-30 14:24:02 +0000247 spec:
kiranya52a57832017-11-22 12:21:55 +0000248 initContainers:
249 - command:
250 - /root/ready.py
251 args:
252 - --container-name
kiranya52a57832017-11-22 12:21:55 +0000253 - aai-resources
254 env:
255 - name: NAMESPACE
256 valueFrom:
257 fieldRef:
258 apiVersion: v1
259 fieldPath: metadata.namespace
kj9bf27312018-03-19 15:07:44 +0200260 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
261 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
262 name: {{ include "common.name" . }}-readiness
Mandeep Khinda4b881972017-08-30 14:24:02 +0000263 containers:
kj9bf27312018-03-19 15:07:44 +0200264 - name: {{ include "common.name" . }}
265 image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
266 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Mandeep Khinda4b881972017-08-30 14:24:02 +0000267 env:
268 - name: CHEF_BRANCH
269 value: master
270 - name: AAI_CHEF_ENV
271 value: simpledemo
272 - name: AAI_CORE_VERSION
kj9bf27312018-03-19 15:07:44 +0200273 value: {{ .Values.config.aaicoreversion }}
Mandeep Khinda4b881972017-08-30 14:24:02 +0000274 - name: AAI_CHEF_LOC
275 value: /var/chef/aai-data/environments
276 - name: CHEF_GIT_URL
277 value: http://gerrit.onap.org/r/aai
Mike Elliott95b8c4a2017-09-22 11:31:54 -0400278 - name: RESOURCES_HOSTNAME
kj9bf27312018-03-19 15:07:44 +0200279 value: aai-resources.{{ include "common.namespace" . }}
Mandeep Khinda4b881972017-08-30 14:24:02 +0000280 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +0300281 - mountPath: /etc/localtime
282 name: localtime
283 readOnly: true
mayankg2703f313ba92018-02-05 09:01:02 +0000284 - mountPath: /var/chef/aai-data/chef-config/dev/.knife/solo.rb
285 subPath: solo.rb
286 name: aai-chef-config
287 - mountPath: /var/chef/aai-data/environments/
Mandeep Khinda4b881972017-08-30 14:24:02 +0000288 name: aai-data
BorislavGb2b99182017-10-03 15:40:55 +0300289 - mountPath: /var/log/onap
290 name: aai-traversal-logs
291 - mountPath: /opt/app/aai-traversal/bundleconfig/etc/logback.xml
292 name: aai-traversal-log-conf
293 subPath: logback.xml
Mandeep Khinda4b881972017-08-30 14:24:02 +0000294 ports:
kj9bf27312018-03-19 15:07:44 +0200295 - containerPort: {{ .Values.service.internalPort }}
296 - containerPort: {{ .Values.service.internalPort2 }}
297 # disable liveness probe when breakpoints set in debugger
298 # so K8s doesn't restart unresponsive container
299 {{ if .Values.liveness.enabled }}
300 livenessProbe:
301 tcpSocket:
302 port: {{ .Values.service.internalPort }}
303 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
304 periodSeconds: {{ .Values.liveness.periodSeconds }}
305 {{ end }}
Mandeep Khinda4b881972017-08-30 14:24:02 +0000306 readinessProbe:
307 tcpSocket:
kj9bf27312018-03-19 15:07:44 +0200308 port: {{ .Values.service.internalPort }}
309 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
310 periodSeconds: {{ .Values.readiness.periodSeconds }}
311 resources:
312{{ toYaml .Values.resources | indent 10 }}
313 {{- if .Values.nodeSelector }}
314 nodeSelector:
315{{ toYaml .Values.nodeSelector | indent 8 }}
316 {{- end -}}
317 {{- if .Values.affinity }}
318 affinity:
319{{ toYaml .Values.affinity | indent 8 }}
320 {{- end }}
321
322 # side car containers
323 - name: filebeat-onap
324 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
325 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
BorislavGb2b99182017-10-03 15:40:55 +0300326 volumeMounts:
327 - mountPath: /usr/share/filebeat/filebeat.yml
mayankg2703f313ba92018-02-05 09:01:02 +0000328 subPath: filebeat.yml
BorislavGb2b99182017-10-03 15:40:55 +0300329 name: filebeat-conf
330 - mountPath: /var/log/onap
331 name: aai-traversal-logs
332 - mountPath: /usr/share/filebeat/data
333 name: aai-traversal-filebeat
kj9bf27312018-03-19 15:07:44 +0200334
Mandeep Khinda4b881972017-08-30 14:24:02 +0000335 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300336 - name: localtime
337 hostPath:
338 path: /etc/localtime
mayankg2703f313ba92018-02-05 09:01:02 +0000339 - name: aai-chef-config
340 configMap:
kj9bf27312018-03-19 15:07:44 +0200341 name: aai-chef-config
Mandeep Khinda4b881972017-08-30 14:24:02 +0000342 - name: aai-data
mayankg2703f313ba92018-02-05 09:01:02 +0000343 configMap:
kj9bf27312018-03-19 15:07:44 +0200344 name: aai-resources-environments
BorislavGb2b99182017-10-03 15:40:55 +0300345 - name: filebeat-conf
mayankg2703f313ba92018-02-05 09:01:02 +0000346 configMap:
kj9bf27312018-03-19 15:07:44 +0200347 name: aai-filebeat
BorislavGb2b99182017-10-03 15:40:55 +0300348 - name: aai-traversal-logs
349 emptyDir: {}
350 - name: aai-traversal-filebeat
351 emptyDir: {}
352 - name: aai-traversal-log-conf
353 configMap:
kj9bf27312018-03-19 15:07:44 +0200354 name: {{ include "common.fullname" . }}-log
355 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
Mandeep Khinda4b881972017-08-30 14:24:02 +0000356 imagePullSecrets:
kj9bf27312018-03-19 15:07:44 +0200357 - name: "{{ include "common.namespace" . }}-docker-registry-key"