blob: bda80a0483ab1b1dae5dc0f978d9564634e3d50b [file] [log] [blame]
vaibhav_16dec0e58a662018-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 Khindafc068432017-08-30 14:24:02 +000015apiVersion: extensions/v1beta1
16kind: Deployment
17metadata:
kj6a8ce802018-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 Khindafc068432017-08-30 14:24:02 +000025spec:
kj6a8ce802018-03-19 15:07:44 +020026 replicas: {{ .Values.replicaCount }}
Mandeep Khindafc068432017-08-30 14:24:02 +000027 selector:
28 matchLabels:
kj6a8ce802018-03-19 15:07:44 +020029 app: {{ include "common.name" . }}
Mandeep Khindafc068432017-08-30 14:24:02 +000030 template:
31 metadata:
32 labels:
kj6a8ce802018-03-19 15:07:44 +020033 app: {{ include "common.name" . }}
34 release: {{ .Release.Name }}
35 name: {{ include "common.name" . }}
AdrianSlavkovskyc7c7b472018-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 Khindafc068432017-08-30 14:24:02 +0000247 spec:
vagrant62ddc7d2018-03-10 23:56:32 +0000248 hostname: aai-traversal
kiranya6eea4802017-11-22 12:21:55 +0000249 initContainers:
250 - command:
251 - /root/ready.py
252 args:
253 - --container-name
vagrant62ddc7d2018-03-10 23:56:32 +0000254 - aai-cassandra
255 - --container-name
kiranya6eea4802017-11-22 12:21:55 +0000256 - aai-resources
257 env:
258 - name: NAMESPACE
259 valueFrom:
260 fieldRef:
261 apiVersion: v1
262 fieldPath: metadata.namespace
kj6a8ce802018-03-19 15:07:44 +0200263 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
264 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
265 name: {{ include "common.name" . }}-readiness
Mandeep Khindafc068432017-08-30 14:24:02 +0000266 containers:
kj6a8ce802018-03-19 15:07:44 +0200267 - name: {{ include "common.name" . }}
268 image: "{{ .Values.global.repository | default .Values.repository }}/{{ .Values.image }}"
269 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Mandeep Khindafc068432017-08-30 14:24:02 +0000270 env:
vagrant62ddc7d2018-03-10 23:56:32 +0000271 - name: DISABLE_UPDATE_QUERY
272 value: {{ .Values.config.disableUpdateQuery | quote }}
273 - name: LOCAL_USER_ID
274 value: {{ .Values.config.userId | quote }}
275 - name: LOCAL_GROUP_ID
276 value: {{ .Values.config.groupId | quote }}
Mandeep Khindafc068432017-08-30 14:24:02 +0000277 volumeMounts:
yurync400bf52017-09-13 19:21:03 +0300278 - mountPath: /etc/localtime
279 name: localtime
280 readOnly: true
vagrant62ddc7d2018-03-10 23:56:32 +0000281 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties
282 name: {{ include "common.fullname" . }}-db-real-conf
283 subPath: janusgraph-realtime.properties
284 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties
285 name: {{ include "common.fullname" . }}-db-cached-conf
286 subPath: janusgraph-cached.properties
287 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties
288 name: {{ include "common.fullname" . }}-aaiconfig-conf
289 subPath: aaiconfig.properties
BorislavGc4bafe12017-10-03 15:40:55 +0300290 - mountPath: /var/log/onap
vagrant62ddc7d2018-03-10 23:56:32 +0000291 name: {{ include "common.fullname" . }}-logs
292 - mountPath: /opt/app/aai-traversal/resources/logback.xml
293 name: {{ include "common.fullname" . }}-log-conf
BorislavGc4bafe12017-10-03 15:40:55 +0300294 subPath: logback.xml
vagrant62ddc7d2018-03-10 23:56:32 +0000295 - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml
296 name: {{ include "common.fullname" . }}-localhost-access-log-conf
297 subPath: localhost-access-logback.xml
298 - mountPath: /opt/app/aai-traversal/resources/application.properties
299 name: {{ include "common.fullname" . }}-springapp-conf
300 subPath: application.properties
301 - mountPath: /opt/app/aai-traversal/resources/etc/auth/aai_keystore
302 name: {{ include "common.fullname" . }}-auth-sec
303 subPath: aai_keystore
Mandeep Khindafc068432017-08-30 14:24:02 +0000304 ports:
kj6a8ce802018-03-19 15:07:44 +0200305 - containerPort: {{ .Values.service.internalPort }}
306 - containerPort: {{ .Values.service.internalPort2 }}
307 # disable liveness probe when breakpoints set in debugger
308 # so K8s doesn't restart unresponsive container
309 {{ if .Values.liveness.enabled }}
310 livenessProbe:
311 tcpSocket:
312 port: {{ .Values.service.internalPort }}
313 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
314 periodSeconds: {{ .Values.liveness.periodSeconds }}
315 {{ end }}
Mandeep Khindafc068432017-08-30 14:24:02 +0000316 readinessProbe:
317 tcpSocket:
kj6a8ce802018-03-19 15:07:44 +0200318 port: {{ .Values.service.internalPort }}
319 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
320 periodSeconds: {{ .Values.readiness.periodSeconds }}
321 resources:
322{{ toYaml .Values.resources | indent 10 }}
323 {{- if .Values.nodeSelector }}
324 nodeSelector:
325{{ toYaml .Values.nodeSelector | indent 8 }}
326 {{- end -}}
327 {{- if .Values.affinity }}
328 affinity:
329{{ toYaml .Values.affinity | indent 8 }}
330 {{- end }}
331
332 # side car containers
333 - name: filebeat-onap
334 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
335 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
BorislavGc4bafe12017-10-03 15:40:55 +0300336 volumeMounts:
337 - mountPath: /usr/share/filebeat/filebeat.yml
mayankg27032eb57a22018-02-05 09:01:02 +0000338 subPath: filebeat.yml
BorislavGc4bafe12017-10-03 15:40:55 +0300339 name: filebeat-conf
340 - mountPath: /var/log/onap
vagrant62ddc7d2018-03-10 23:56:32 +0000341 name: {{ include "common.fullname" . }}-logs
BorislavGc4bafe12017-10-03 15:40:55 +0300342 - mountPath: /usr/share/filebeat/data
vagrant62ddc7d2018-03-10 23:56:32 +0000343 name: {{ include "common.fullname" . }}-filebeat
Mandeep Khindafc068432017-08-30 14:24:02 +0000344 volumes:
yurync400bf52017-09-13 19:21:03 +0300345 - name: localtime
346 hostPath:
347 path: /etc/localtime
BorislavGc4bafe12017-10-03 15:40:55 +0300348 - name: filebeat-conf
mayankg27032eb57a22018-02-05 09:01:02 +0000349 configMap:
kj6a8ce802018-03-19 15:07:44 +0200350 name: aai-filebeat
vagrant62ddc7d2018-03-10 23:56:32 +0000351 - name: {{ include "common.fullname" . }}-logs
BorislavGc4bafe12017-10-03 15:40:55 +0300352 emptyDir: {}
vagrant62ddc7d2018-03-10 23:56:32 +0000353 - name: {{ include "common.fullname" . }}-filebeat
BorislavGc4bafe12017-10-03 15:40:55 +0300354 emptyDir: {}
vagrant62ddc7d2018-03-10 23:56:32 +0000355 - name: {{ include "common.fullname" . }}-log-conf
BorislavGc4bafe12017-10-03 15:40:55 +0300356 configMap:
kj6a8ce802018-03-19 15:07:44 +0200357 name: {{ include "common.fullname" . }}-log
vagrant62ddc7d2018-03-10 23:56:32 +0000358 - name: {{ include "common.fullname" . }}-localhost-access-log-conf
359 configMap:
360 name: {{ include "common.fullname" . }}-localhost-access-log-configmap
361 - name: {{ include "common.fullname" . }}-db-real-conf
362 configMap:
363 name: {{ include "common.fullname" . }}-db-real-configmap
364 - name: {{ include "common.fullname" . }}-db-cached-conf
365 configMap:
366 name: {{ include "common.fullname" . }}-db-cached-configmap
367 - name: {{ include "common.fullname" . }}-aaiconfig-conf
368 configMap:
369 name: {{ include "common.fullname" . }}-aaiconfig-configmap
370 - name: {{ include "common.fullname" . }}-springapp-conf
371 configMap:
372 name: {{ include "common.fullname" . }}-springapp-configmap
373 - name: {{ include "common.fullname" . }}-realm-conf
374 configMap:
375 name: {{ include "common.fullname" . }}-realm-configmap
376 - name: {{ include "common.fullname" . }}-auth-sec
377 secret:
378 secretName: {{ include "common.fullname" . }}-auth-secret
kj6a8ce802018-03-19 15:07:44 +0200379 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
Mandeep Khindafc068432017-08-30 14:24:02 +0000380 imagePullSecrets:
kj6a8ce802018-03-19 15:07:44 +0200381 - name: "{{ include "common.namespace" . }}-docker-registry-key"