Upgrade AAI to use common shared Cassandra
[oom.git] / kubernetes / aai / charts / aai-resources / templates / deployment.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 # Modifications Copyright © 2018 AT&T
3 #
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
16 apiVersion: extensions/v1beta1
17 kind: Deployment
18 metadata:
19   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 }}
26 spec:
27   replicas: {{ .Values.replicaCount }}
28   selector:
29     matchLabels:
30       app: {{ include "common.name" . }}
31   template:
32     metadata:
33       labels:
34         app: {{ include "common.name" . }}
35         release: {{ .Release.Name }}
36       name: {{ include "common.name" . }}
37       annotations:
38         checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
39         msb.onap.org/service-info: '[
40           {
41               "serviceName": "_aai-cloudInfrastructure",
42               "version": "v11",
43               "url": "/aai/v11/cloud-infrastructure",
44               "protocol": "REST",
45               "port": "8447",
46               "enable_ssl": true,
47               "lb_policy":"ip_hash",
48               "visualRange": "1",
49               "path": "/aai/v11/cloud-infrastructure"
50           },
51           {
52               "serviceName": "_aai-cloudInfrastructure",
53               "version": "v12",
54               "url": "/aai/v12/cloud-infrastructure",
55               "protocol": "REST",
56               "port": "8447",
57               "enable_ssl": true,
58               "lb_policy":"ip_hash",
59               "visualRange": "1",
60               "path": "/aai/v12/cloud-infrastructure"
61           },
62           {
63               "serviceName": "_aai-cloudInfrastructure",
64               "version": "v13",
65               "url": "/aai/v13/cloud-infrastructure",
66               "protocol": "REST",
67               "port": "8447",
68               "enable_ssl": true,
69               "lb_policy":"ip_hash",
70               "visualRange": "1",
71               "path": "/aai/v13/cloud-infrastructure"
72           },
73           {
74               "serviceName": "_aai-cloudInfrastructure",
75               "version": "v14",
76               "url": "/aai/v14/cloud-infrastructure",
77               "protocol": "REST",
78               "port": "8447",
79               "enable_ssl": true,
80               "lb_policy":"ip_hash",
81               "visualRange": "1",
82               "path": "/aai/v14/cloud-infrastructure"
83           },
84           {
85               "serviceName": "_aai-cloudInfrastructure",
86               "version": "v15",
87               "url": "/aai/v15/cloud-infrastructure",
88               "protocol": "REST",
89               "port": "8447",
90               "enable_ssl": true,
91               "lb_policy":"ip_hash",
92               "visualRange": "1",
93               "path": "/aai/v15/cloud-infrastructure"
94           },
95           {
96               "serviceName": "_aai-cloudInfrastructure",
97               "version": "v16",
98               "url": "/aai/v16/cloud-infrastructure",
99               "protocol": "REST",
100               "port": "8447",
101               "enable_ssl": true,
102               "lb_policy":"ip_hash",
103               "visualRange": "1",
104               "path": "/aai/v16/cloud-infrastructure"
105           },
106           {
107               "serviceName": "_aai-business",
108               "version": "v11",
109               "url": "/aai/v11/business",
110               "protocol": "REST",
111               "port": "8447",
112               "enable_ssl": true,
113               "lb_policy":"ip_hash",
114               "visualRange": "1",
115               "path": "/aai/v11/business"
116           },
117           {
118               "serviceName": "_aai-business",
119               "version": "v12",
120               "url": "/aai/v12/business",
121               "protocol": "REST",
122               "port": "8447",
123               "enable_ssl": true,
124               "lb_policy":"ip_hash",
125               "visualRange": "1",
126               "path": "/aai/v12/business"
127           },
128           {
129               "serviceName": "_aai-business",
130               "version": "v13",
131               "url": "/aai/v13/business",
132               "protocol": "REST",
133               "port": "8447",
134               "enable_ssl": true,
135               "lb_policy":"ip_hash",
136               "visualRange": "1",
137               "path": "/aai/v13/business"
138           },
139           {
140               "serviceName": "_aai-business",
141               "version": "v14",
142               "url": "/aai/v14/business",
143               "protocol": "REST",
144               "port": "8447",
145               "enable_ssl": true,
146               "lb_policy":"ip_hash",
147               "visualRange": "1",
148               "path": "/aai/v14/business"
149           },
150           {
151               "serviceName": "_aai-business",
152               "version": "v15",
153               "url": "/aai/v15/business",
154               "protocol": "REST",
155               "port": "8447",
156               "enable_ssl": true,
157               "lb_policy":"ip_hash",
158               "visualRange": "1",
159               "path": "/aai/v15/business"
160           },
161           {
162               "serviceName": "_aai-business",
163               "version": "v16",
164               "url": "/aai/v16/business",
165               "protocol": "REST",
166               "port": "8447",
167               "enable_ssl": true,
168               "lb_policy":"ip_hash",
169               "visualRange": "1",
170               "path": "/aai/v16/business"
171           },
172           {
173               "serviceName": "_aai-actions",
174               "version": "v11",
175               "url": "/aai/v11/actions",
176               "protocol": "REST",
177               "port": "8447",
178               "enable_ssl": true,
179               "lb_policy":"ip_hash",
180               "visualRange": "1",
181               "path": "/aai/v11/actions"
182           },
183           {
184               "serviceName": "_aai-actions",
185               "version": "v12",
186               "url": "/aai/v12/actions",
187               "protocol": "REST",
188               "port": "8447",
189               "enable_ssl": true,
190               "lb_policy":"ip_hash",
191               "visualRange": "1",
192               "path": "/aai/v12/actions"
193           },
194           {
195               "serviceName": "_aai-actions",
196               "version": "v13",
197               "url": "/aai/v13/actions",
198               "protocol": "REST",
199               "port": "8447",
200               "enable_ssl": true,
201               "lb_policy":"ip_hash",
202               "visualRange": "1",
203               "path": "/aai/v13/actions"
204           },
205           {
206               "serviceName": "_aai-actions",
207               "version": "v14",
208               "url": "/aai/v14/actions",
209               "protocol": "REST",
210               "port": "8447",
211               "enable_ssl": true,
212               "lb_policy":"ip_hash",
213               "visualRange": "1",
214               "path": "/aai/v14/actions"
215           },
216           {
217               "serviceName": "_aai-actions",
218               "version": "v15",
219               "url": "/aai/v15/actions",
220               "protocol": "REST",
221               "port": "8447",
222               "enable_ssl": true,
223               "lb_policy":"ip_hash",
224               "visualRange": "1",
225               "path": "/aai/v15/actions"
226           },
227           {
228               "serviceName": "_aai-actions",
229               "version": "v16",
230               "url": "/aai/v16/actions",
231               "protocol": "REST",
232               "port": "8447",
233               "enable_ssl": true,
234               "lb_policy":"ip_hash",
235               "visualRange": "1",
236               "path": "/aai/v16/actions"
237           },
238           {
239               "serviceName": "_aai-service-design-and-creation",
240               "version": "v11",
241               "url": "/aai/v11/service-design-and-creation",
242               "protocol": "REST",
243               "port": "8447",
244               "enable_ssl": true,
245               "lb_policy":"ip_hash",
246               "visualRange": "1",
247               "path": "/aai/v11/service-design-and-creation"
248           },
249           {
250               "serviceName": "_aai-service-design-and-creation",
251               "version": "v12",
252               "url": "/aai/v12/service-design-and-creation",
253               "protocol": "REST",
254               "port": "8447",
255               "enable_ssl": true,
256               "lb_policy":"ip_hash",
257               "visualRange": "1",
258               "path": "/aai/v12/service-design-and-creation"
259           },
260           {
261               "serviceName": "_aai-service-design-and-creation",
262               "version": "v13",
263               "url": "/aai/v13/service-design-and-creation",
264               "protocol": "REST",
265               "port": "8447",
266               "enable_ssl": true,
267               "lb_policy":"ip_hash",
268               "visualRange": "1",
269               "path": "/aai/v13/service-design-and-creation"
270           },
271           {
272               "serviceName": "_aai-service-design-and-creation",
273               "version": "v14",
274               "url": "/aai/v14/service-design-and-creation",
275               "protocol": "REST",
276               "port": "8447",
277               "enable_ssl": true,
278               "lb_policy":"ip_hash",
279               "visualRange": "1",
280               "path": "/aai/v14/service-design-and-creation"
281           },
282            {
283               "serviceName": "_aai-service-design-and-creation",
284               "version": "v15",
285               "url": "/aai/v15/service-design-and-creation",
286               "protocol": "REST",
287               "port": "8447",
288               "enable_ssl": true,
289               "lb_policy":"ip_hash",
290               "visualRange": "1",
291               "path": "/aai/v15/service-design-and-creation"
292           },
293           {
294               "serviceName": "_aai-service-design-and-creation",
295               "version": "v16",
296               "url": "/aai/v16/service-design-and-creation",
297               "protocol": "REST",
298               "port": "8447",
299               "enable_ssl": true,
300               "lb_policy":"ip_hash",
301               "visualRange": "1",
302               "path": "/aai/v16/service-design-and-creation"
303           },
304           {
305               "serviceName": "_aai-network",
306               "version": "v11",
307               "url": "/aai/v11/network",
308               "protocol": "REST",
309               "port": "8447",
310               "enable_ssl": true,
311               "lb_policy":"ip_hash",
312               "visualRange": "1",
313               "path": "/aai/v11/network"
314           },
315           {
316               "serviceName": "_aai-network",
317               "version": "v12",
318               "url": "/aai/v12/network",
319               "protocol": "REST",
320               "port": "8447",
321               "enable_ssl": true,
322               "lb_policy":"ip_hash",
323               "visualRange": "1",
324               "path": "/aai/v12/network"
325           },
326           {
327               "serviceName": "_aai-network",
328               "version": "v13",
329               "url": "/aai/v13/network",
330               "protocol": "REST",
331               "port": "8447",
332               "enable_ssl": true,
333               "lb_policy":"ip_hash",
334               "visualRange": "1",
335               "path": "/aai/v13/network"
336           },
337           {
338               "serviceName": "_aai-network",
339               "version": "v14",
340               "url": "/aai/v14/network",
341               "protocol": "REST",
342               "port": "8447",
343               "enable_ssl": true,
344               "lb_policy":"ip_hash",
345               "visualRange": "1",
346               "path": "/aai/v14/network"
347           },
348           {
349               "serviceName": "_aai-network",
350               "version": "v15",
351               "url": "/aai/v15/network",
352               "protocol": "REST",
353               "port": "8447",
354               "enable_ssl": true,
355               "lb_policy":"ip_hash",
356               "visualRange": "1",
357               "path": "/aai/v15/network"
358           },
359           {
360               "serviceName": "_aai-network",
361               "version": "v16",
362               "url": "/aai/v16/network",
363               "protocol": "REST",
364               "port": "8447",
365               "enable_ssl": true,
366               "lb_policy":"ip_hash",
367               "visualRange": "1",
368               "path": "/aai/v16/network"
369           },
370           {
371               "serviceName": "_aai-externalSystem",
372               "version": "v11",
373               "url": "/aai/v11/external-system",
374               "protocol": "REST",
375               "port": "8447",
376               "enable_ssl": true,
377               "lb_policy":"ip_hash",
378               "visualRange": "1",
379               "path": "/aai/v11/external-system"
380           },
381           {
382               "serviceName": "_aai-externalSystem",
383               "version": "v12",
384               "url": "/aai/v12/external-system",
385               "protocol": "REST",
386               "port": "8447",
387               "enable_ssl": true,
388               "lb_policy":"ip_hash",
389               "visualRange": "1",
390               "path": "/aai/v12/external-system"
391           },
392           {
393               "serviceName": "_aai-externalSystem",
394               "version": "v13",
395               "url": "/aai/v13/external-system",
396               "protocol": "REST",
397               "port": "8447",
398               "enable_ssl": true,
399               "lb_policy":"ip_hash",
400               "visualRange": "1",
401               "path": "/aai/v13/external-system"
402           },
403           {
404               "serviceName": "_aai-externalSystem",
405               "version": "v14",
406               "url": "/aai/v14/external-system",
407               "protocol": "REST",
408               "port": "8447",
409               "enable_ssl": true,
410               "lb_policy":"ip_hash",
411               "visualRange": "1",
412               "path": "/aai/v14/external-system"
413           },
414           {
415               "serviceName": "_aai-externalSystem",
416               "version": "v15",
417               "url": "/aai/v15/external-system",
418               "protocol": "REST",
419               "port": "8447",
420               "enable_ssl": true,
421               "lb_policy":"ip_hash",
422               "visualRange": "1",
423               "path": "/aai/v15/external-system"
424           },
425           {
426               "serviceName": "_aai-externalSystem",
427               "version": "v16",
428               "url": "/aai/v16/external-system",
429               "protocol": "REST",
430               "port": "8447",
431               "enable_ssl": true,
432               "lb_policy":"ip_hash",
433               "visualRange": "1",
434               "path": "/aai/v16/external-system"
435           },
436           {
437               "serviceName": "aai-cloudInfrastructure",
438               "version": "v11",
439               "url": "/aai/v11/cloud-infrastructure",
440               "protocol": "REST",
441               "port": "8447",
442               "enable_ssl": true,
443               "lb_policy":"ip_hash",
444               "visualRange": "1"
445           },
446           {
447               "serviceName": "aai-cloudInfrastructure",
448               "version": "v12",
449               "url": "/aai/v12/cloud-infrastructure",
450               "protocol": "REST",
451               "port": "8447",
452               "enable_ssl": true,
453               "lb_policy":"ip_hash",
454               "visualRange": "1"
455           },
456           {
457               "serviceName": "aai-cloudInfrastructure",
458               "version": "v13",
459               "url": "/aai/v13/cloud-infrastructure",
460               "protocol": "REST",
461               "port": "8447",
462               "enable_ssl": true,
463               "lb_policy":"ip_hash",
464               "visualRange": "1"
465           },
466           {
467               "serviceName": "aai-cloudInfrastructure",
468               "version": "v14",
469               "url": "/aai/v14/cloud-infrastructure",
470               "protocol": "REST",
471               "port": "8447",
472               "enable_ssl": true,
473               "lb_policy":"ip_hash",
474               "visualRange": "1"
475           },
476           {
477               "serviceName": "aai-cloudInfrastructure",
478               "version": "v15",
479               "url": "/aai/v15/cloud-infrastructure",
480               "protocol": "REST",
481               "port": "8447",
482               "enable_ssl": true,
483               "lb_policy":"ip_hash",
484               "visualRange": "1"
485           },
486           {
487               "serviceName": "aai-cloudInfrastructure",
488               "version": "v16",
489               "url": "/aai/v16/cloud-infrastructure",
490               "protocol": "REST",
491               "port": "8447",
492               "enable_ssl": true,
493               "lb_policy":"ip_hash",
494               "visualRange": "1"
495           },
496           {
497               "serviceName": "aai-business",
498               "version": "v11",
499               "url": "/aai/v11/business",
500               "protocol": "REST",
501               "port": "8447",
502               "enable_ssl": true,
503               "lb_policy":"ip_hash",
504               "visualRange": "1"
505           },
506           {
507               "serviceName": "aai-business",
508               "version": "v12",
509               "url": "/aai/v12/business",
510               "protocol": "REST",
511               "port": "8447",
512               "enable_ssl": true,
513               "lb_policy":"ip_hash",
514               "visualRange": "1"
515           },
516           {
517               "serviceName": "aai-business",
518               "version": "v13",
519               "url": "/aai/v13/business",
520               "protocol": "REST",
521               "port": "8447",
522               "enable_ssl": true,
523               "lb_policy":"ip_hash",
524               "visualRange": "1"
525           },
526           {
527               "serviceName": "aai-business",
528               "version": "v14",
529               "url": "/aai/v14/business",
530               "protocol": "REST",
531               "port": "8447",
532               "enable_ssl": true,
533               "lb_policy":"ip_hash",
534               "visualRange": "1"
535           },
536           {
537               "serviceName": "aai-business",
538               "version": "v15",
539               "url": "/aai/v15/business",
540               "protocol": "REST",
541               "port": "8447",
542               "enable_ssl": true,
543               "lb_policy":"ip_hash",
544               "visualRange": "1"
545           },
546           {
547               "serviceName": "aai-business",
548               "version": "v16",
549               "url": "/aai/v16/business",
550               "protocol": "REST",
551               "port": "8447",
552               "enable_ssl": true,
553               "lb_policy":"ip_hash",
554               "visualRange": "1"
555           },
556           {
557               "serviceName": "aai-actions",
558               "version": "v11",
559               "url": "/aai/v11/actions",
560               "protocol": "REST",
561               "port": "8447",
562               "enable_ssl": true,
563               "lb_policy":"ip_hash",
564               "visualRange": "1"
565           },
566           {
567               "serviceName": "aai-actions",
568               "version": "v12",
569               "url": "/aai/v12/actions",
570               "protocol": "REST",
571               "port": "8447",
572               "enable_ssl": true,
573               "lb_policy":"ip_hash",
574               "visualRange": "1"
575           },
576           {
577               "serviceName": "aai-actions",
578               "version": "v13",
579               "url": "/aai/v13/actions",
580               "protocol": "REST",
581               "port": "8447",
582               "enable_ssl": true,
583               "lb_policy":"ip_hash",
584               "visualRange": "1"
585           },
586           {
587               "serviceName": "aai-actions",
588               "version": "v14",
589               "url": "/aai/v14/actions",
590               "protocol": "REST",
591               "port": "8447",
592               "enable_ssl": true,
593               "lb_policy":"ip_hash",
594               "visualRange": "1"
595           },
596           {
597               "serviceName": "aai-actions",
598               "version": "v15",
599               "url": "/aai/v15/actions",
600               "protocol": "REST",
601               "port": "8447",
602               "enable_ssl": true,
603               "lb_policy":"ip_hash",
604               "visualRange": "1"
605           },
606           {
607               "serviceName": "aai-actions",
608               "version": "v16",
609               "url": "/aai/v16/actions",
610               "protocol": "REST",
611               "port": "8447",
612               "enable_ssl": true,
613               "lb_policy":"ip_hash",
614               "visualRange": "1"
615           },
616           {
617               "serviceName": "aai-service-design-and-creation",
618               "version": "v11",
619               "url": "/aai/v11/service-design-and-creation",
620               "protocol": "REST",
621               "port": "8447",
622               "enable_ssl": true,
623               "lb_policy":"ip_hash",
624               "visualRange": "1"
625           },
626           {
627               "serviceName": "aai-service-design-and-creation",
628               "version": "v12",
629               "url": "/aai/v12/service-design-and-creation",
630               "protocol": "REST",
631               "port": "8447",
632               "enable_ssl": true,
633               "lb_policy":"ip_hash",
634               "visualRange": "1"
635           },
636           {
637               "serviceName": "aai-service-design-and-creation",
638               "version": "v13",
639               "url": "/aai/v13/service-design-and-creation",
640               "protocol": "REST",
641               "port": "8447",
642               "enable_ssl": true,
643               "lb_policy":"ip_hash",
644               "visualRange": "1"
645           },
646           {
647               "serviceName": "aai-service-design-and-creation",
648               "version": "v14",
649               "url": "/aai/v14/service-design-and-creation",
650               "protocol": "REST",
651               "port": "8447",
652               "enable_ssl": true,
653               "lb_policy":"ip_hash",
654               "visualRange": "1"
655           },
656           {
657               "serviceName": "aai-service-design-and-creation",
658               "version": "v15",
659               "url": "/aai/v15/service-design-and-creation",
660               "protocol": "REST",
661               "port": "8447",
662               "enable_ssl": true,
663               "lb_policy":"ip_hash",
664               "visualRange": "1"
665           },
666           {
667               "serviceName": "aai-service-design-and-creation",
668               "version": "v16",
669               "url": "/aai/v16/service-design-and-creation",
670               "protocol": "REST",
671               "port": "8447",
672               "enable_ssl": true,
673               "lb_policy":"ip_hash",
674               "visualRange": "1"
675           },
676           {
677               "serviceName": "aai-network",
678               "version": "v11",
679               "url": "/aai/v11/network",
680               "protocol": "REST",
681               "port": "8447",
682               "enable_ssl": true,
683               "lb_policy":"ip_hash",
684               "visualRange": "1"
685           },
686           {
687               "serviceName": "aai-network",
688               "version": "v12",
689               "url": "/aai/v12/network",
690               "protocol": "REST",
691               "port": "8447",
692               "enable_ssl": true,
693               "lb_policy":"ip_hash",
694               "visualRange": "1"
695           },
696           {
697               "serviceName": "aai-network",
698               "version": "v13",
699               "url": "/aai/v13/network",
700               "protocol": "REST",
701               "port": "8447",
702               "enable_ssl": true,
703               "lb_policy":"ip_hash",
704               "visualRange": "1"
705           },
706           {
707               "serviceName": "aai-network",
708               "version": "v14",
709               "url": "/aai/v14/network",
710               "protocol": "REST",
711               "port": "8447",
712               "enable_ssl": true,
713               "lb_policy":"ip_hash",
714               "visualRange": "1"
715           },
716           {
717               "serviceName": "aai-network",
718               "version": "v15",
719               "url": "/aai/v15/network",
720               "protocol": "REST",
721               "port": "8447",
722               "enable_ssl": true,
723               "lb_policy":"ip_hash",
724               "visualRange": "1"
725           },
726           {
727               "serviceName": "aai-network",
728               "version": "v16",
729               "url": "/aai/v16/network",
730               "protocol": "REST",
731               "port": "8447",
732               "enable_ssl": true,
733               "lb_policy":"ip_hash",
734               "visualRange": "1"
735           },
736           {
737               "serviceName": "aai-externalSystem",
738               "version": "v11",
739               "url": "/aai/v11/external-system",
740               "protocol": "REST",
741               "port": "8447",
742               "enable_ssl": true,
743               "lb_policy":"ip_hash",
744               "visualRange": "1"
745           },
746           {
747               "serviceName": "aai-externalSystem",
748               "version": "v12",
749               "url": "/aai/v12/external-system",
750               "protocol": "REST",
751               "port": "8447",
752               "enable_ssl": true,
753               "lb_policy":"ip_hash",
754               "visualRange": "1"
755           },
756           {
757               "serviceName": "aai-externalSystem",
758               "version": "v13",
759               "url": "/aai/v13/external-system",
760               "protocol": "REST",
761               "port": "8447",
762               "enable_ssl": true,
763               "lb_policy":"ip_hash",
764               "visualRange": "1"
765           },
766           {
767               "serviceName": "aai-externalSystem",
768               "version": "v14",
769               "url": "/aai/v14/external-system",
770               "protocol": "REST",
771               "port": "8447",
772               "enable_ssl": true,
773               "lb_policy":"ip_hash",
774               "visualRange": "1"
775           },
776           {
777               "serviceName": "aai-externalSystem",
778               "version": "v15",
779               "url": "/aai/v15/external-system",
780               "protocol": "REST",
781               "port": "8447",
782               "enable_ssl": true,
783               "lb_policy":"ip_hash",
784               "visualRange": "1"
785           },
786           {
787               "serviceName": "aai-externalSystem",
788               "version": "v16",
789               "url": "/aai/v16/external-system",
790               "protocol": "REST",
791               "port": "8447",
792               "enable_ssl": true,
793               "lb_policy":"ip_hash",
794               "visualRange": "1"
795           }
796           ]'
797     spec:
798       hostname: aai-resources
799     {{ if .Values.global.initContainers.enabled }}
800       {{ if .Values.global.installSidecarSecurity }}
801       hostAliases:
802       - ip: {{ .Values.global.aaf.serverIp }}
803         hostnames:
804         - {{ .Values.global.aaf.serverHostname }}
805       {{ end }}
806       initContainers:
807       - command:
808       {{  if .Values.global.jobs.createSchema.enabled  }}
809         - /root/job_complete.py
810         args:
811         - --job-name
812         - {{ .Release.Name }}-aai-graphadmin-create-db-schema
813       {{  else }}
814         - /root/ready.py
815         args:
816         - --container-name
817         {{- if .Values.global.cassandra.localCluster }}
818         - aai-cassandra
819         {{- else }}
820         - cassandra
821         {{- end }}
822         - --container-name
823         - aai-schema-service
824       {{  end  }}
825         env:
826         - name: NAMESPACE
827           valueFrom:
828             fieldRef:
829               apiVersion: v1
830               fieldPath: metadata.namespace
831         image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
832         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
833         name: {{ include "common.name" . }}-readiness
834       {{ if .Values.global.installSidecarSecurity }}
835       - name: {{ .Values.global.tproxyConfig.name }}
836         image: "{{ include "common.repository" . }}/{{ .Values.global.tproxyConfig.image }}"
837         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
838         securityContext:
839           privileged: true
840       {{ end }}
841     {{ end }}
842       containers:
843       - name: {{ include "common.name" . }}
844         image: "{{ include "common.repository" . }}/{{ .Values.image }}"
845         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
846         env:
847         - name: LOCAL_USER_ID
848           value: {{ .Values.global.config.userId | quote }}
849         - name: LOCAL_GROUP_ID
850           value: {{ .Values.global.config.groupId | quote }}
851         volumeMounts:
852         - mountPath: /etc/localtime
853           name: localtime
854           readOnly: true
855         - mountPath: /opt/app/aai-resources/resources/etc/appprops/janusgraph-realtime.properties
856           name: {{ include "common.fullname" . }}-db-real-conf
857           subPath: janusgraph-realtime.properties
858         - mountPath: /opt/app/aai-resources/resources/etc/appprops/janusgraph-cached.properties
859           name: {{ include "common.fullname" . }}-db-cached-conf
860           subPath: janusgraph-cached.properties
861         - mountPath: /opt/app/aai-resources/resources/etc/appprops/aaiconfig.properties
862           name: {{ include "common.fullname" . }}-aaiconfig-conf
863           subPath: aaiconfig.properties
864         - mountPath: /opt/aai/logroot/AAI-RES
865           name: {{ include "common.fullname" . }}-logs
866         - mountPath: /opt/app/aai-resources/resources/logback.xml
867           name: {{ include "common.fullname" . }}-log-conf
868           subPath: logback.xml
869         - mountPath: /opt/app/aai-resources/resources/localhost-access-logback.xml
870           name: {{ include "common.fullname" . }}-localhost-access-log-conf
871           subPath: localhost-access-logback.xml
872         - mountPath: /opt/app/aai-resources/resources/etc/auth/realm.properties
873           name: {{ include "common.fullname" . }}-realm-conf
874           subPath: realm.properties
875         {{ if .Values.global.installSidecarSecurity }}
876         - mountPath: /opt/app/aai-resources/resources/etc/auth/aai_policy.json
877           name: {{ include "common.fullname" . }}-aai-policy
878           subPath: aai_policy.json
879         {{ end }}
880         - mountPath: /opt/app/aai-resources/resources/aaf/org.onap.aai.keyfile
881           name: {{ include "common.fullname" . }}-aaf-certs
882           subPath: org.onap.aai.keyfile
883         - mountPath: /opt/app/aai-resources/resources/aaf/bath_config.csv
884           name: {{ include "common.fullname" . }}-aaf-certs
885           subPath: bath_config.csv
886         - mountPath: /opt/app/aai-resources/resources/aaf/org.onap.aai.props
887           name: {{ include "common.fullname" . }}-aaf-properties
888           subPath: org.onap.aai.props
889         - mountPath: /opt/app/aai-resources/resources/aaf/org.osaaf.location.props
890           name: {{ include "common.fullname" . }}-aaf-properties
891           subPath: org.osaaf.location.props
892         - mountPath: /opt/app/aai-resources/resources/aaf/permissions.properties
893           name: {{ include "common.fullname" . }}-aaf-properties
894           subPath: permissions.properties
895         - mountPath: /opt/app/aai-resources/resources/cadi.properties
896           name: {{ include "common.fullname" . }}-aaf-properties
897           subPath: cadi.properties
898         - mountPath: /opt/app/aai-resources/resources/aaf/org.onap.aai.p12
899           name: {{ include "common.fullname" . }}-aaf-certs
900           subPath: org.onap.aai.p12
901         - mountPath: /opt/app/aai-resources/resources/aaf/truststoreONAPall.jks
902           name: aai-common-aai-auth-mount
903           subPath: truststoreONAPall.jks
904         - mountPath: /opt/app/aai-resources/resources/application.properties
905           name: {{ include "common.fullname" . }}-springapp-conf
906           subPath: application.properties
907           {{ $global := . }}
908           {{ range $job := .Values.global.config.auth.files }}
909         - mountPath: /opt/app/aai-resources/resources/etc/auth/{{ . }}
910           name: {{ include "common.fullname" $global }}-auth-truststore-sec
911           subPath: {{ . }}
912           {{ end }}
913         ports:
914         - containerPort: {{ .Values.service.internalPort }}
915         - containerPort: {{ .Values.service.internalPort2 }}
916         # disable liveness probe when breakpoints set in debugger
917         # so K8s doesn't restart unresponsive container
918         {{ if .Values.liveness.enabled }}
919         livenessProbe:
920           tcpSocket:
921             port: {{ .Values.service.internalPort }}
922           initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
923           periodSeconds: {{ .Values.liveness.periodSeconds }}
924         {{ end }}
925         readinessProbe:
926           tcpSocket:
927             port: {{ .Values.service.internalPort }}
928           initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
929           periodSeconds: {{ .Values.readiness.periodSeconds }}
930         resources:
931 {{ include "common.resources" . }}
932       {{- if .Values.nodeSelector }}
933       nodeSelector:
934 {{ toYaml .Values.nodeSelector | indent 8 }}
935       {{- end -}}
936       {{- if .Values.affinity }}
937       affinity:
938 {{ toYaml .Values.affinity | indent 8 }}
939       {{- end }}
940
941       # side car containers
942       - name: filebeat-onap
943         image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
944         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
945         volumeMounts:
946         - mountPath: /usr/share/filebeat/filebeat.yml
947           subPath: filebeat.yml
948           name: filebeat-conf
949         - mountPath: /var/log/onap
950           name: {{ include "common.fullname" . }}-logs
951         - mountPath: /usr/share/filebeat/data
952           name: {{ include "common.fullname" . }}-filebeat
953         resources:
954 {{ include "common.resources" . }}
955     {{ if .Values.global.installSidecarSecurity }}
956       - name: {{ .Values.global.rproxy.name }}
957         image: "{{ include "common.repository" . }}/{{ .Values.global.rproxy.image }}"
958         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
959         env:
960         - name: CONFIG_HOME
961           value: "/opt/app/rproxy/config"
962         - name: KEY_STORE_PASSWORD
963           value: {{ .Values.sidecar.keyStorePassword }}
964         - name: spring_profiles_active
965           value: {{ .Values.global.rproxy.activeSpringProfiles }}
966         volumeMounts:
967         - name: {{ include "common.fullname" . }}-rproxy-config
968           mountPath: /opt/app/rproxy/config/forward-proxy.properties
969           subPath: forward-proxy.properties
970         - name: {{ include "common.fullname" . }}-rproxy-config
971           mountPath: /opt/app/rproxy/config/primary-service.properties
972           subPath: primary-service.properties
973         - name: {{ include "common.fullname" . }}-rproxy-config
974           mountPath: /opt/app/rproxy/config/reverse-proxy.properties
975           subPath: reverse-proxy.properties
976         - name: {{ include "common.fullname" . }}-rproxy-config
977           mountPath: /opt/app/rproxy/config/cadi.properties
978           subPath: cadi.properties
979         - name: {{ include "common.fullname" . }}-rproxy-log-config
980           mountPath: /opt/app/rproxy/config/logback-spring.xml
981           subPath: logback-spring.xml
982         - name: {{ include "common.fullname" . }}-rproxy-uri-auth-config
983           mountPath: /opt/app/rproxy/config/auth/uri-authorization.json
984           subPath: uri-authorization.json
985         - name: {{ include "common.fullname" . }}-rproxy-auth-config
986           mountPath: /opt/app/rproxy/config/auth/tomcat_keystore
987           subPath: tomcat_keystore
988         - name: {{ include "common.fullname" . }}-rproxy-auth-config
989           mountPath: /opt/app/rproxy/config/auth/client-cert.p12
990           subPath: client-cert.p12
991         - name: {{ include "common.fullname" . }}-rproxy-auth-config
992           mountPath: /opt/app/rproxy/config/auth/aaf_truststore.jks
993           subPath: aaf_truststore.jks
994         - name: {{ include "common.fullname" . }}-rproxy-security-config
995           mountPath: /opt/app/rproxy/config/security/keyfile
996           subPath: keyfile
997         - name: {{ include "common.fullname" . }}-rproxy-auth-config
998           mountPath: /opt/app/rproxy/config/auth/org.onap.aai.p12
999           subPath: org.onap.aai.p12
1000         ports:
1001         - containerPort: {{ .Values.global.rproxy.port }}
1002
1003       - name: {{ .Values.global.fproxy.name }}
1004         image: "{{ include "common.repository" . }}/{{ .Values.global.fproxy.image }}"
1005         imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
1006         env:
1007         - name: CONFIG_HOME
1008           value: "/opt/app/fproxy/config"
1009         - name: KEY_STORE_PASSWORD
1010           value: {{ .Values.sidecar.keyStorePassword }}
1011         - name: TRUST_STORE_PASSWORD
1012           value: {{ .Values.sidecar.trustStorePassword }}
1013         - name: spring_profiles_active
1014           value: {{ .Values.global.fproxy.activeSpringProfiles }}
1015         volumeMounts:
1016         - name: {{ include "common.fullname" . }}-fproxy-config
1017           mountPath: /opt/app/fproxy/config/fproxy.properties
1018           subPath: fproxy.properties
1019         - name: {{ include "common.fullname" . }}-fproxy-log-config
1020           mountPath: /opt/app/fproxy/config/logback-spring.xml
1021           subPath: logback-spring.xml
1022         - name: {{ include "common.fullname" . }}-fproxy-auth-config
1023           mountPath: /opt/app/fproxy/config/auth/fproxy_truststore
1024           subPath: fproxy_truststore
1025         - name: {{ include "common.fullname" . }}-fproxy-auth-config
1026           mountPath: /opt/app/fproxy/config/auth/tomcat_keystore
1027           subPath: tomcat_keystore
1028         - name: {{ include "common.fullname" . }}-fproxy-auth-config
1029           mountPath: /opt/app/fproxy/config/auth/client-cert.p12
1030           subPath: client-cert.p12
1031         ports:
1032         - containerPort: {{ .Values.global.fproxy.port }}
1033     {{ end }}
1034
1035       volumes:
1036       - name: aai-common-aai-auth-mount
1037         secret:
1038           secretName: aai-common-aai-auth
1039       - name: localtime
1040         hostPath:
1041           path: /etc/localtime
1042       - name: filebeat-conf
1043         configMap:
1044           name: aai-filebeat
1045       - name: {{ include "common.fullname" . }}-logs
1046         emptyDir: {}
1047       - name: {{ include "common.fullname" . }}-filebeat
1048         emptyDir: {}
1049       - name: {{ include "common.fullname" . }}-log-conf
1050         configMap:
1051          name: {{ include "common.fullname" . }}-log
1052       - name: {{ include "common.fullname" . }}-localhost-access-log-conf
1053         configMap:
1054          name: {{ include "common.fullname" . }}-localhost-access-log-configmap
1055       - name: {{ include "common.fullname" . }}-db-real-conf
1056         configMap:
1057          name: {{ include "common.fullname" . }}-db-real-configmap
1058       - name: {{ include "common.fullname" . }}-db-cached-conf
1059         configMap:
1060          name: {{ include "common.fullname" . }}-db-cached-configmap
1061       - name: {{ include "common.fullname" . }}-aaiconfig-conf
1062         configMap:
1063          name: {{ include "common.fullname" . }}-aaiconfig-configmap
1064       - name: {{ include "common.fullname" . }}-aaf-properties
1065         configMap:
1066          name: {{ include "common.fullname" . }}-aaf-props
1067       - name: {{ include "common.fullname" . }}-aaf-certs
1068         secret:
1069          secretName: {{ include "common.fullname" . }}-aaf-keys
1070       - name: {{ include "common.fullname" . }}-springapp-conf
1071         configMap:
1072          name: {{ include "common.fullname" . }}-springapp-configmap
1073       - name: {{ include "common.fullname" . }}-realm-conf
1074         configMap:
1075          name: {{ include "common.fullname" . }}-realm-configmap
1076       - name: {{ include "common.fullname" . }}-auth-truststore-sec
1077         secret:
1078          secretName: aai-common-truststore
1079          items:
1080           {{ range $job := .Values.global.config.auth.files }}
1081            - key: {{ . }}
1082              path: {{ . }}
1083           {{ end }}
1084     {{ if .Values.global.installSidecarSecurity }}
1085       - name: {{ include "common.fullname" . }}-aai-policy
1086         configMap:
1087          name: {{ include "common.fullname" . }}-aai-policy-configmap
1088       - name: {{ include "common.fullname" . }}-rproxy-config
1089         configMap:
1090          name: {{ include "common.fullname" . }}-rproxy-config
1091       - name: {{ include "common.fullname" . }}-rproxy-log-config
1092         configMap:
1093          name: {{ include "common.fullname" . }}-rproxy-log-config
1094       - name: {{ include "common.fullname" . }}-rproxy-uri-auth-config
1095         configMap:
1096          name: {{ include "common.fullname" . }}-rproxy-uri-auth-config
1097       - name: {{ include "common.fullname" . }}-rproxy-auth-config
1098         secret:
1099          secretName: {{ include "common.fullname" . }}-rproxy-auth-config
1100       - name: {{ include "common.fullname" . }}-rproxy-security-config
1101         secret:
1102          secretName: {{ include "common.fullname" . }}-rproxy-security-config
1103       - name: {{ include "common.fullname" . }}-fproxy-config
1104         configMap:
1105          name: {{ include "common.fullname" . }}-fproxy-config
1106       - name: {{ include "common.fullname" . }}-fproxy-log-config
1107         configMap:
1108          name: {{ include "common.fullname" . }}-fproxy-log-config
1109       - name: {{ include "common.fullname" . }}-fproxy-auth-config
1110         secret:
1111          secretName: {{ include "common.fullname" . }}-fproxy-auth-config
1112     {{ end }}
1113       restartPolicy: {{ .Values.restartPolicy }}
1114       imagePullSecrets:
1115       - name: "{{ include "common.namespace" . }}-docker-registry-key"