blob: a571e42b3d0b4b90084e61c05c71b1dcf6262120 [file] [log] [blame]
vaibhav_16dec0e58a662018-03-22 09:07:12 +00001# Copyright © 2017 Amdocs, Bell Canada
toshrajbhardwaj84d73b12018-08-06 07:35:14 +00002# Modifications Copyright © 2018 AT&T
vaibhav_16dec0e58a662018-03-22 09:07:12 +00003#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
Mandeep Khindafc068432017-08-30 14:24:02 +000016apiVersion: extensions/v1beta1
17kind: Deployment
18metadata:
kj6a8ce802018-03-19 15:07:44 +020019 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
21 labels:
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
Mandeep Khindafc068432017-08-30 14:24:02 +000026spec:
kj6a8ce802018-03-19 15:07:44 +020027 replicas: {{ .Values.replicaCount }}
Mandeep Khindafc068432017-08-30 14:24:02 +000028 selector:
29 matchLabels:
kj6a8ce802018-03-19 15:07:44 +020030 app: {{ include "common.name" . }}
Mandeep Khindafc068432017-08-30 14:24:02 +000031 template:
32 metadata:
33 labels:
kj6a8ce802018-03-19 15:07:44 +020034 app: {{ include "common.name" . }}
35 release: {{ .Release.Name }}
36 name: {{ include "common.name" . }}
AdrianSlavkovskyc7c7b472018-03-08 09:55:53 +010037 annotations:
Harish V Kajurcef61522018-05-07 14:02:46 +000038 checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
AdrianSlavkovskyc7c7b472018-03-08 09:55:53 +010039 msb.onap.org/service-info: '[
40 {
41 "serviceName": "_aai-generic-query",
42 "version": "v11",
43 "url": "/aai/v11/search/generic-query",
44 "protocol": "REST",
45 "port": "8446",
46 "enable_ssl": true,
47 "lb_policy":"ip_hash",
48 "visualRange": "1",
49 "path": "/aai/v11/search/generic-query"
50 },
51 {
52 "serviceName": "_aai-generic-query",
53 "version": "v12",
54 "url": "/aai/v12/search/generic-query",
55 "protocol": "REST",
56 "port": "8446",
57 "enable_ssl": true,
58 "lb_policy":"ip_hash",
59 "visualRange": "1",
60 "path": "/aai/v12/search/generic-query"
61 },
62 {
63 "serviceName": "_aai-generic-query",
64 "version": "v13",
65 "url": "/aai/v13/search/generic-query",
66 "protocol": "REST",
67 "port": "8446",
68 "enable_ssl": true,
69 "lb_policy":"ip_hash",
70 "visualRange": "1",
71 "path": "/aai/v13/search/generic-query"
72 },
73 {
74 "serviceName": "_aai-nodes-query",
75 "version": "v11",
76 "url": "/aai/v11/search/nodes-query",
77 "protocol": "REST",
78 "port": "8446",
79 "enable_ssl": true,
80 "lb_policy":"ip_hash",
81 "visualRange": "1",
82 "path": "/aai/v11/search/nodes-query"
83 },
84 {
85 "serviceName": "_aai-nodes-query",
86 "version": "v12",
87 "url": "/aai/v12/search/nodes-query",
88 "protocol": "REST",
89 "port": "8446",
90 "enable_ssl": true,
91 "lb_policy":"ip_hash",
92 "visualRange": "1",
93 "path": "/aai/v12/search/nodes-query"
94 },
95 {
96 "serviceName": "_aai-nodes-query",
97 "version": "v13",
98 "url": "/aai/v13/search/nodes-query",
99 "protocol": "REST",
100 "port": "8446",
101 "enable_ssl": true,
102 "lb_policy":"ip_hash",
103 "visualRange": "1",
104 "path": "/aai/v13/search/nodes-query"
105 },
106 {
107 "serviceName": "_aai-query",
108 "version": "v11",
109 "url": "/aai/v11/query",
110 "protocol": "REST",
111 "port": "8446",
112 "enable_ssl": true,
113 "lb_policy":"ip_hash",
114 "visualRange": "1",
115 "path": "/aai/v11/query"
116 },
117 {
118 "serviceName": "_aai-query",
119 "version": "v12",
120 "url": "/aai/v12/query",
121 "protocol": "REST",
122 "port": "8446",
123 "enable_ssl": true,
124 "lb_policy":"ip_hash",
125 "visualRange": "1",
126 "path": "/aai/v12/query"
127 },
128 {
129 "serviceName": "_aai-query",
130 "version": "v13",
131 "url": "/aai/v13/query",
132 "protocol": "REST",
133 "port": "8446",
134 "enable_ssl": true,
135 "lb_policy":"ip_hash",
136 "visualRange": "1",
137 "path": "/aai/v13/query"
138 },
139 {
140 "serviceName": "_aai-named-query",
141 "url": "/aai/search",
142 "protocol": "REST",
143 "port": "8446",
144 "enable_ssl": true,
145 "lb_policy":"ip_hash",
146 "visualRange": "1",
147 "path": "/aai/search"
148 },
149 {
150 "serviceName": "aai-generic-query",
151 "version": "v11",
152 "url": "/aai/v11/search/generic-query",
153 "protocol": "REST",
154 "port": "8446",
155 "enable_ssl": true,
156 "lb_policy":"ip_hash",
157 "visualRange": "1"
158 },
159 {
160 "serviceName": "aai-generic-query",
161 "version": "v12",
162 "url": "/aai/v12/search/generic-query",
163 "protocol": "REST",
164 "port": "8446",
165 "enable_ssl": true,
166 "lb_policy":"ip_hash",
167 "visualRange": "1"
168 },
169 {
170 "serviceName": "aai-generic-query",
171 "version": "v13",
172 "url": "/aai/v13/search/generic-query",
173 "protocol": "REST",
174 "port": "8446",
175 "enable_ssl": true,
176 "lb_policy":"ip_hash",
177 "visualRange": "1"
178 },
179 {
180 "serviceName": "aai-nodes-query",
181 "version": "v11",
182 "url": "/aai/v11/search/nodes-query",
183 "protocol": "REST",
184 "port": "8446",
185 "enable_ssl": true,
186 "lb_policy":"ip_hash",
187 "visualRange": "1"
188 },
189 {
190 "serviceName": "aai-nodes-query",
191 "version": "v12",
192 "url": "/aai/v12/search/nodes-query",
193 "protocol": "REST",
194 "port": "8446",
195 "enable_ssl": true,
196 "lb_policy":"ip_hash",
197 "visualRange": "1"
198 },
199 {
200 "serviceName": "aai-nodes-query",
201 "version": "v13",
202 "url": "/aai/v13/search/nodes-query",
203 "protocol": "REST",
204 "port": "8446",
205 "enable_ssl": true,
206 "lb_policy":"ip_hash",
207 "visualRange": "1"
208 },
209 {
210 "serviceName": "aai-query",
211 "version": "v11",
212 "url": "/aai/v11/query",
213 "protocol": "REST",
214 "port": "8446",
215 "enable_ssl": true,
216 "lb_policy":"ip_hash",
217 "visualRange": "1"
218 },
219 {
220 "serviceName": "aai-query",
221 "version": "v12",
222 "url": "/aai/v12/query",
223 "protocol": "REST",
224 "port": "8446",
225 "enable_ssl": true,
226 "lb_policy":"ip_hash",
227 "visualRange": "1"
228 },
229 {
230 "serviceName": "aai-query",
231 "version": "v13",
232 "url": "/aai/v13/query",
233 "protocol": "REST",
234 "port": "8446",
235 "enable_ssl": true,
236 "lb_policy":"ip_hash",
237 "visualRange": "1"
238 },
239 {
240 "serviceName": "aai-named-query",
241 "url": "/aai/search",
242 "protocol": "REST",
243 "port": "8446",
244 "enable_ssl": true,
245 "lb_policy":"ip_hash",
246 "visualRange": "1"
247 }
248 ]'
Mandeep Khindafc068432017-08-30 14:24:02 +0000249 spec:
vagrant62ddc7d2018-03-10 23:56:32 +0000250 hostname: aai-traversal
kiranya6eea4802017-11-22 12:21:55 +0000251 initContainers:
252 - command:
253 - /root/ready.py
254 args:
255 - --container-name
vagrant62ddc7d2018-03-10 23:56:32 +0000256 - aai-cassandra
257 - --container-name
kiranya6eea4802017-11-22 12:21:55 +0000258 - aai-resources
259 env:
260 - name: NAMESPACE
261 valueFrom:
262 fieldRef:
263 apiVersion: v1
264 fieldPath: metadata.namespace
kj6a8ce802018-03-19 15:07:44 +0200265 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
266 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
267 name: {{ include "common.name" . }}-readiness
Mandeep Khindafc068432017-08-30 14:24:02 +0000268 containers:
kj6a8ce802018-03-19 15:07:44 +0200269 - name: {{ include "common.name" . }}
BorislavG809b1d72018-05-06 12:55:20 +0000270 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
kj6a8ce802018-03-19 15:07:44 +0200271 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Mandeep Khindafc068432017-08-30 14:24:02 +0000272 env:
vagrant62ddc7d2018-03-10 23:56:32 +0000273 - name: DISABLE_UPDATE_QUERY
274 value: {{ .Values.config.disableUpdateQuery | quote }}
275 - name: LOCAL_USER_ID
276 value: {{ .Values.config.userId | quote }}
277 - name: LOCAL_GROUP_ID
278 value: {{ .Values.config.groupId | quote }}
Mandeep Khindafc068432017-08-30 14:24:02 +0000279 volumeMounts:
yurync400bf52017-09-13 19:21:03 +0300280 - mountPath: /etc/localtime
281 name: localtime
282 readOnly: true
vagrant62ddc7d2018-03-10 23:56:32 +0000283 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties
284 name: {{ include "common.fullname" . }}-db-real-conf
285 subPath: janusgraph-realtime.properties
286 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties
287 name: {{ include "common.fullname" . }}-db-cached-conf
288 subPath: janusgraph-cached.properties
289 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties
290 name: {{ include "common.fullname" . }}-aaiconfig-conf
291 subPath: aaiconfig.properties
Harish V Kajurcef61522018-05-07 14:02:46 +0000292 - mountPath: /opt/aai/logroot/AAI-GQ
vagrant62ddc7d2018-03-10 23:56:32 +0000293 name: {{ include "common.fullname" . }}-logs
294 - mountPath: /opt/app/aai-traversal/resources/logback.xml
295 name: {{ include "common.fullname" . }}-log-conf
BorislavGc4bafe12017-10-03 15:40:55 +0300296 subPath: logback.xml
vagrant62ddc7d2018-03-10 23:56:32 +0000297 - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml
298 name: {{ include "common.fullname" . }}-localhost-access-log-conf
299 subPath: localhost-access-logback.xml
300 - mountPath: /opt/app/aai-traversal/resources/application.properties
301 name: {{ include "common.fullname" . }}-springapp-conf
302 subPath: application.properties
303 - mountPath: /opt/app/aai-traversal/resources/etc/auth/aai_keystore
304 name: {{ include "common.fullname" . }}-auth-sec
305 subPath: aai_keystore
Mandeep Khindafc068432017-08-30 14:24:02 +0000306 ports:
kj6a8ce802018-03-19 15:07:44 +0200307 - containerPort: {{ .Values.service.internalPort }}
308 - containerPort: {{ .Values.service.internalPort2 }}
309 # disable liveness probe when breakpoints set in debugger
310 # so K8s doesn't restart unresponsive container
311 {{ if .Values.liveness.enabled }}
312 livenessProbe:
313 tcpSocket:
314 port: {{ .Values.service.internalPort }}
315 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
316 periodSeconds: {{ .Values.liveness.periodSeconds }}
317 {{ end }}
Mandeep Khindafc068432017-08-30 14:24:02 +0000318 readinessProbe:
319 tcpSocket:
kj6a8ce802018-03-19 15:07:44 +0200320 port: {{ .Values.service.internalPort }}
321 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
322 periodSeconds: {{ .Values.readiness.periodSeconds }}
323 resources:
324{{ toYaml .Values.resources | indent 10 }}
325 {{- if .Values.nodeSelector }}
326 nodeSelector:
327{{ toYaml .Values.nodeSelector | indent 8 }}
328 {{- end -}}
329 {{- if .Values.affinity }}
330 affinity:
331{{ toYaml .Values.affinity | indent 8 }}
332 {{- end }}
333
334 # side car containers
335 - name: filebeat-onap
336 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
337 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
BorislavGc4bafe12017-10-03 15:40:55 +0300338 volumeMounts:
339 - mountPath: /usr/share/filebeat/filebeat.yml
mayankg27032eb57a22018-02-05 09:01:02 +0000340 subPath: filebeat.yml
BorislavGc4bafe12017-10-03 15:40:55 +0300341 name: filebeat-conf
342 - mountPath: /var/log/onap
vagrant62ddc7d2018-03-10 23:56:32 +0000343 name: {{ include "common.fullname" . }}-logs
BorislavGc4bafe12017-10-03 15:40:55 +0300344 - mountPath: /usr/share/filebeat/data
vagrant62ddc7d2018-03-10 23:56:32 +0000345 name: {{ include "common.fullname" . }}-filebeat
Mandeep Khindafc068432017-08-30 14:24:02 +0000346 volumes:
yurync400bf52017-09-13 19:21:03 +0300347 - name: localtime
348 hostPath:
349 path: /etc/localtime
BorislavGc4bafe12017-10-03 15:40:55 +0300350 - name: filebeat-conf
mayankg27032eb57a22018-02-05 09:01:02 +0000351 configMap:
kj6a8ce802018-03-19 15:07:44 +0200352 name: aai-filebeat
vagrant62ddc7d2018-03-10 23:56:32 +0000353 - name: {{ include "common.fullname" . }}-logs
BorislavGc4bafe12017-10-03 15:40:55 +0300354 emptyDir: {}
vagrant62ddc7d2018-03-10 23:56:32 +0000355 - name: {{ include "common.fullname" . }}-filebeat
BorislavGc4bafe12017-10-03 15:40:55 +0300356 emptyDir: {}
vagrant62ddc7d2018-03-10 23:56:32 +0000357 - name: {{ include "common.fullname" . }}-log-conf
BorislavGc4bafe12017-10-03 15:40:55 +0300358 configMap:
kj6a8ce802018-03-19 15:07:44 +0200359 name: {{ include "common.fullname" . }}-log
vagrant62ddc7d2018-03-10 23:56:32 +0000360 - name: {{ include "common.fullname" . }}-localhost-access-log-conf
361 configMap:
362 name: {{ include "common.fullname" . }}-localhost-access-log-configmap
363 - name: {{ include "common.fullname" . }}-db-real-conf
364 configMap:
365 name: {{ include "common.fullname" . }}-db-real-configmap
366 - name: {{ include "common.fullname" . }}-db-cached-conf
367 configMap:
368 name: {{ include "common.fullname" . }}-db-cached-configmap
369 - name: {{ include "common.fullname" . }}-aaiconfig-conf
370 configMap:
371 name: {{ include "common.fullname" . }}-aaiconfig-configmap
372 - name: {{ include "common.fullname" . }}-springapp-conf
373 configMap:
374 name: {{ include "common.fullname" . }}-springapp-configmap
375 - name: {{ include "common.fullname" . }}-realm-conf
376 configMap:
377 name: {{ include "common.fullname" . }}-realm-configmap
378 - name: {{ include "common.fullname" . }}-auth-sec
379 secret:
Kajur, Harish (vk250x)66fa0dc2018-04-26 11:26:45 -0400380 secretName: aai-auth-secret
kj6a8ce802018-03-19 15:07:44 +0200381 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
Mandeep Khindafc068432017-08-30 14:24:02 +0000382 imagePullSecrets:
kj6a8ce802018-03-19 15:07:44 +0200383 - name: "{{ include "common.namespace" . }}-docker-registry-key"