blob: 25cd3a953712da944d64178317e40f7039f4f135 [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:
Harish V Kajur8e7cbd22018-05-07 14:02:46 +000037 checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
AdrianSlavkovsky03cc5892018-03-08 09:55:53 +010038 msb.onap.org/service-info: '[
39 {
40 "serviceName": "_aai-generic-query",
41 "version": "v11",
42 "url": "/aai/v11/search/generic-query",
43 "protocol": "REST",
44 "port": "8446",
45 "enable_ssl": true,
46 "lb_policy":"ip_hash",
47 "visualRange": "1",
48 "path": "/aai/v11/search/generic-query"
49 },
50 {
51 "serviceName": "_aai-generic-query",
52 "version": "v12",
53 "url": "/aai/v12/search/generic-query",
54 "protocol": "REST",
55 "port": "8446",
56 "enable_ssl": true,
57 "lb_policy":"ip_hash",
58 "visualRange": "1",
59 "path": "/aai/v12/search/generic-query"
60 },
61 {
62 "serviceName": "_aai-generic-query",
63 "version": "v13",
64 "url": "/aai/v13/search/generic-query",
65 "protocol": "REST",
66 "port": "8446",
67 "enable_ssl": true,
68 "lb_policy":"ip_hash",
69 "visualRange": "1",
70 "path": "/aai/v13/search/generic-query"
71 },
72 {
73 "serviceName": "_aai-nodes-query",
74 "version": "v11",
75 "url": "/aai/v11/search/nodes-query",
76 "protocol": "REST",
77 "port": "8446",
78 "enable_ssl": true,
79 "lb_policy":"ip_hash",
80 "visualRange": "1",
81 "path": "/aai/v11/search/nodes-query"
82 },
83 {
84 "serviceName": "_aai-nodes-query",
85 "version": "v12",
86 "url": "/aai/v12/search/nodes-query",
87 "protocol": "REST",
88 "port": "8446",
89 "enable_ssl": true,
90 "lb_policy":"ip_hash",
91 "visualRange": "1",
92 "path": "/aai/v12/search/nodes-query"
93 },
94 {
95 "serviceName": "_aai-nodes-query",
96 "version": "v13",
97 "url": "/aai/v13/search/nodes-query",
98 "protocol": "REST",
99 "port": "8446",
100 "enable_ssl": true,
101 "lb_policy":"ip_hash",
102 "visualRange": "1",
103 "path": "/aai/v13/search/nodes-query"
104 },
105 {
106 "serviceName": "_aai-query",
107 "version": "v11",
108 "url": "/aai/v11/query",
109 "protocol": "REST",
110 "port": "8446",
111 "enable_ssl": true,
112 "lb_policy":"ip_hash",
113 "visualRange": "1",
114 "path": "/aai/v11/query"
115 },
116 {
117 "serviceName": "_aai-query",
118 "version": "v12",
119 "url": "/aai/v12/query",
120 "protocol": "REST",
121 "port": "8446",
122 "enable_ssl": true,
123 "lb_policy":"ip_hash",
124 "visualRange": "1",
125 "path": "/aai/v12/query"
126 },
127 {
128 "serviceName": "_aai-query",
129 "version": "v13",
130 "url": "/aai/v13/query",
131 "protocol": "REST",
132 "port": "8446",
133 "enable_ssl": true,
134 "lb_policy":"ip_hash",
135 "visualRange": "1",
136 "path": "/aai/v13/query"
137 },
138 {
139 "serviceName": "_aai-named-query",
140 "url": "/aai/search",
141 "protocol": "REST",
142 "port": "8446",
143 "enable_ssl": true,
144 "lb_policy":"ip_hash",
145 "visualRange": "1",
146 "path": "/aai/search"
147 },
148 {
149 "serviceName": "aai-generic-query",
150 "version": "v11",
151 "url": "/aai/v11/search/generic-query",
152 "protocol": "REST",
153 "port": "8446",
154 "enable_ssl": true,
155 "lb_policy":"ip_hash",
156 "visualRange": "1"
157 },
158 {
159 "serviceName": "aai-generic-query",
160 "version": "v12",
161 "url": "/aai/v12/search/generic-query",
162 "protocol": "REST",
163 "port": "8446",
164 "enable_ssl": true,
165 "lb_policy":"ip_hash",
166 "visualRange": "1"
167 },
168 {
169 "serviceName": "aai-generic-query",
170 "version": "v13",
171 "url": "/aai/v13/search/generic-query",
172 "protocol": "REST",
173 "port": "8446",
174 "enable_ssl": true,
175 "lb_policy":"ip_hash",
176 "visualRange": "1"
177 },
178 {
179 "serviceName": "aai-nodes-query",
180 "version": "v11",
181 "url": "/aai/v11/search/nodes-query",
182 "protocol": "REST",
183 "port": "8446",
184 "enable_ssl": true,
185 "lb_policy":"ip_hash",
186 "visualRange": "1"
187 },
188 {
189 "serviceName": "aai-nodes-query",
190 "version": "v12",
191 "url": "/aai/v12/search/nodes-query",
192 "protocol": "REST",
193 "port": "8446",
194 "enable_ssl": true,
195 "lb_policy":"ip_hash",
196 "visualRange": "1"
197 },
198 {
199 "serviceName": "aai-nodes-query",
200 "version": "v13",
201 "url": "/aai/v13/search/nodes-query",
202 "protocol": "REST",
203 "port": "8446",
204 "enable_ssl": true,
205 "lb_policy":"ip_hash",
206 "visualRange": "1"
207 },
208 {
209 "serviceName": "aai-query",
210 "version": "v11",
211 "url": "/aai/v11/query",
212 "protocol": "REST",
213 "port": "8446",
214 "enable_ssl": true,
215 "lb_policy":"ip_hash",
216 "visualRange": "1"
217 },
218 {
219 "serviceName": "aai-query",
220 "version": "v12",
221 "url": "/aai/v12/query",
222 "protocol": "REST",
223 "port": "8446",
224 "enable_ssl": true,
225 "lb_policy":"ip_hash",
226 "visualRange": "1"
227 },
228 {
229 "serviceName": "aai-query",
230 "version": "v13",
231 "url": "/aai/v13/query",
232 "protocol": "REST",
233 "port": "8446",
234 "enable_ssl": true,
235 "lb_policy":"ip_hash",
236 "visualRange": "1"
237 },
238 {
239 "serviceName": "aai-named-query",
240 "url": "/aai/search",
241 "protocol": "REST",
242 "port": "8446",
243 "enable_ssl": true,
244 "lb_policy":"ip_hash",
245 "visualRange": "1"
246 }
247 ]'
Mandeep Khinda4b881972017-08-30 14:24:02 +0000248 spec:
vagrant1a3a3552018-03-10 23:56:32 +0000249 hostname: aai-traversal
kiranya52a57832017-11-22 12:21:55 +0000250 initContainers:
251 - command:
252 - /root/ready.py
253 args:
254 - --container-name
vagrant1a3a3552018-03-10 23:56:32 +0000255 - aai-cassandra
256 - --container-name
kiranya52a57832017-11-22 12:21:55 +0000257 - aai-resources
258 env:
259 - name: NAMESPACE
260 valueFrom:
261 fieldRef:
262 apiVersion: v1
263 fieldPath: metadata.namespace
kj9bf27312018-03-19 15:07:44 +0200264 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
265 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
266 name: {{ include "common.name" . }}-readiness
Mandeep Khinda4b881972017-08-30 14:24:02 +0000267 containers:
kj9bf27312018-03-19 15:07:44 +0200268 - name: {{ include "common.name" . }}
BorislavGdf11cd52018-05-06 12:55:20 +0000269 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
kj9bf27312018-03-19 15:07:44 +0200270 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Mandeep Khinda4b881972017-08-30 14:24:02 +0000271 env:
vagrant1a3a3552018-03-10 23:56:32 +0000272 - name: DISABLE_UPDATE_QUERY
273 value: {{ .Values.config.disableUpdateQuery | quote }}
274 - name: LOCAL_USER_ID
275 value: {{ .Values.config.userId | quote }}
276 - name: LOCAL_GROUP_ID
277 value: {{ .Values.config.groupId | quote }}
Mandeep Khinda4b881972017-08-30 14:24:02 +0000278 volumeMounts:
yuryn8b3bc5a2017-09-13 19:21:03 +0300279 - mountPath: /etc/localtime
280 name: localtime
281 readOnly: true
vagrant1a3a3552018-03-10 23:56:32 +0000282 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties
283 name: {{ include "common.fullname" . }}-db-real-conf
284 subPath: janusgraph-realtime.properties
285 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties
286 name: {{ include "common.fullname" . }}-db-cached-conf
287 subPath: janusgraph-cached.properties
288 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties
289 name: {{ include "common.fullname" . }}-aaiconfig-conf
290 subPath: aaiconfig.properties
Harish V Kajur8e7cbd22018-05-07 14:02:46 +0000291 - mountPath: /opt/aai/logroot/AAI-GQ
vagrant1a3a3552018-03-10 23:56:32 +0000292 name: {{ include "common.fullname" . }}-logs
293 - mountPath: /opt/app/aai-traversal/resources/logback.xml
294 name: {{ include "common.fullname" . }}-log-conf
BorislavGb2b99182017-10-03 15:40:55 +0300295 subPath: logback.xml
vagrant1a3a3552018-03-10 23:56:32 +0000296 - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml
297 name: {{ include "common.fullname" . }}-localhost-access-log-conf
298 subPath: localhost-access-logback.xml
299 - mountPath: /opt/app/aai-traversal/resources/application.properties
300 name: {{ include "common.fullname" . }}-springapp-conf
301 subPath: application.properties
302 - mountPath: /opt/app/aai-traversal/resources/etc/auth/aai_keystore
303 name: {{ include "common.fullname" . }}-auth-sec
304 subPath: aai_keystore
Mandeep Khinda4b881972017-08-30 14:24:02 +0000305 ports:
kj9bf27312018-03-19 15:07:44 +0200306 - containerPort: {{ .Values.service.internalPort }}
307 - containerPort: {{ .Values.service.internalPort2 }}
308 # disable liveness probe when breakpoints set in debugger
309 # so K8s doesn't restart unresponsive container
310 {{ if .Values.liveness.enabled }}
311 livenessProbe:
312 tcpSocket:
313 port: {{ .Values.service.internalPort }}
314 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
315 periodSeconds: {{ .Values.liveness.periodSeconds }}
316 {{ end }}
Mandeep Khinda4b881972017-08-30 14:24:02 +0000317 readinessProbe:
318 tcpSocket:
kj9bf27312018-03-19 15:07:44 +0200319 port: {{ .Values.service.internalPort }}
320 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
321 periodSeconds: {{ .Values.readiness.periodSeconds }}
322 resources:
323{{ toYaml .Values.resources | indent 10 }}
324 {{- if .Values.nodeSelector }}
325 nodeSelector:
326{{ toYaml .Values.nodeSelector | indent 8 }}
327 {{- end -}}
328 {{- if .Values.affinity }}
329 affinity:
330{{ toYaml .Values.affinity | indent 8 }}
331 {{- end }}
332
333 # side car containers
334 - name: filebeat-onap
335 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
336 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
BorislavGb2b99182017-10-03 15:40:55 +0300337 volumeMounts:
338 - mountPath: /usr/share/filebeat/filebeat.yml
mayankg2703f313ba92018-02-05 09:01:02 +0000339 subPath: filebeat.yml
BorislavGb2b99182017-10-03 15:40:55 +0300340 name: filebeat-conf
341 - mountPath: /var/log/onap
vagrant1a3a3552018-03-10 23:56:32 +0000342 name: {{ include "common.fullname" . }}-logs
BorislavGb2b99182017-10-03 15:40:55 +0300343 - mountPath: /usr/share/filebeat/data
vagrant1a3a3552018-03-10 23:56:32 +0000344 name: {{ include "common.fullname" . }}-filebeat
Mandeep Khinda4b881972017-08-30 14:24:02 +0000345 volumes:
yuryn8b3bc5a2017-09-13 19:21:03 +0300346 - name: localtime
347 hostPath:
348 path: /etc/localtime
BorislavGb2b99182017-10-03 15:40:55 +0300349 - name: filebeat-conf
mayankg2703f313ba92018-02-05 09:01:02 +0000350 configMap:
kj9bf27312018-03-19 15:07:44 +0200351 name: aai-filebeat
vagrant1a3a3552018-03-10 23:56:32 +0000352 - name: {{ include "common.fullname" . }}-logs
BorislavGb2b99182017-10-03 15:40:55 +0300353 emptyDir: {}
vagrant1a3a3552018-03-10 23:56:32 +0000354 - name: {{ include "common.fullname" . }}-filebeat
BorislavGb2b99182017-10-03 15:40:55 +0300355 emptyDir: {}
vagrant1a3a3552018-03-10 23:56:32 +0000356 - name: {{ include "common.fullname" . }}-log-conf
BorislavGb2b99182017-10-03 15:40:55 +0300357 configMap:
kj9bf27312018-03-19 15:07:44 +0200358 name: {{ include "common.fullname" . }}-log
vagrant1a3a3552018-03-10 23:56:32 +0000359 - name: {{ include "common.fullname" . }}-localhost-access-log-conf
360 configMap:
361 name: {{ include "common.fullname" . }}-localhost-access-log-configmap
362 - name: {{ include "common.fullname" . }}-db-real-conf
363 configMap:
364 name: {{ include "common.fullname" . }}-db-real-configmap
365 - name: {{ include "common.fullname" . }}-db-cached-conf
366 configMap:
367 name: {{ include "common.fullname" . }}-db-cached-configmap
368 - name: {{ include "common.fullname" . }}-aaiconfig-conf
369 configMap:
370 name: {{ include "common.fullname" . }}-aaiconfig-configmap
371 - name: {{ include "common.fullname" . }}-springapp-conf
372 configMap:
373 name: {{ include "common.fullname" . }}-springapp-configmap
374 - name: {{ include "common.fullname" . }}-realm-conf
375 configMap:
376 name: {{ include "common.fullname" . }}-realm-configmap
377 - name: {{ include "common.fullname" . }}-auth-sec
378 secret:
Kajur, Harish (vk250x)450e3632018-04-26 11:26:45 -0400379 secretName: aai-auth-secret
kj9bf27312018-03-19 15:07:44 +0200380 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
Mandeep Khinda4b881972017-08-30 14:24:02 +0000381 imagePullSecrets:
kj9bf27312018-03-19 15:07:44 +0200382 - name: "{{ include "common.namespace" . }}-docker-registry-key"