4dbcd7479a9319a240137f4844577ba9a18527c6
[oom.git] / kubernetes / aai / templates / aai-traversal-deployment.yaml
1 #{{ if not .Values.disableAaiAaiTraversal }}
2 apiVersion: extensions/v1beta1
3 kind: Deployment
4 metadata:
5   name: aai-traversal
6   namespace: "{{ .Values.nsPrefix }}"
7 spec:
8   replicas: {{ .Values.aaiTraversalReplicas }}
9   selector:
10     matchLabels:
11       app: aai-traversal
12   template:
13     metadata:
14       labels:
15         app: aai-traversal
16       name: aai-traversal
17       annotations:
18         msb.onap.org/service-info: '[
19           {
20               "serviceName": "_aai-generic-query",
21               "version": "v11",
22               "url": "/aai/v11/search/generic-query",
23               "protocol": "REST",
24               "port": "8446",
25               "enable_ssl": true,
26               "lb_policy":"ip_hash",
27               "visualRange": "1",
28               "path": "/aai/v11/search/generic-query"
29           },
30           {
31               "serviceName": "_aai-generic-query",
32               "version": "v12",
33               "url": "/aai/v12/search/generic-query",
34               "protocol": "REST",
35               "port": "8446",
36               "enable_ssl": true,
37               "lb_policy":"ip_hash",
38               "visualRange": "1",
39               "path": "/aai/v12/search/generic-query"
40           },
41           {
42               "serviceName": "_aai-generic-query",
43               "version": "v13",
44               "url": "/aai/v13/search/generic-query",
45               "protocol": "REST",
46               "port": "8446",
47               "enable_ssl": true,
48               "lb_policy":"ip_hash",
49               "visualRange": "1",
50               "path": "/aai/v13/search/generic-query"
51           },
52           {
53               "serviceName": "_aai-nodes-query",
54               "version": "v11",
55               "url": "/aai/v11/search/nodes-query",
56               "protocol": "REST",
57               "port": "8446",
58               "enable_ssl": true,
59               "lb_policy":"ip_hash",
60               "visualRange": "1",
61               "path": "/aai/v11/search/nodes-query"
62           },
63           {
64               "serviceName": "_aai-nodes-query",
65               "version": "v12",
66               "url": "/aai/v12/search/nodes-query",
67               "protocol": "REST",
68               "port": "8446",
69               "enable_ssl": true,
70               "lb_policy":"ip_hash",
71               "visualRange": "1",
72               "path": "/aai/v12/search/nodes-query"
73           },
74           {
75               "serviceName": "_aai-nodes-query",
76               "version": "v13",
77               "url": "/aai/v13/search/nodes-query",
78               "protocol": "REST",
79               "port": "8446",
80               "enable_ssl": true,
81               "lb_policy":"ip_hash",
82               "visualRange": "1",
83               "path": "/aai/v13/search/nodes-query"
84           },
85           {
86               "serviceName": "_aai-query",
87               "version": "v11",
88               "url": "/aai/v11/query",
89               "protocol": "REST",
90               "port": "8446",
91               "enable_ssl": true,
92               "lb_policy":"ip_hash",
93               "visualRange": "1",
94               "path": "/aai/v11/query"
95           },
96           {
97               "serviceName": "_aai-query",
98               "version": "v12",
99               "url": "/aai/v12/query",
100               "protocol": "REST",
101               "port": "8446",
102               "enable_ssl": true,
103               "lb_policy":"ip_hash",
104               "visualRange": "1",
105               "path": "/aai/v12/query"
106           },
107           {
108               "serviceName": "_aai-query",
109               "version": "v13",
110               "url": "/aai/v13/query",
111               "protocol": "REST",
112               "port": "8446",
113               "enable_ssl": true,
114               "lb_policy":"ip_hash",
115               "visualRange": "1",
116               "path": "/aai/v13/query"
117           },
118           {
119               "serviceName": "_aai-named-query",
120               "url": "/aai/search",
121               "protocol": "REST",
122               "port": "8446",
123               "enable_ssl": true,
124               "lb_policy":"ip_hash",
125               "visualRange": "1",
126               "path": "/aai/search"
127           },
128           {
129               "serviceName": "aai-generic-query",
130               "version": "v11",
131               "url": "/aai/v11/search/generic-query",
132               "protocol": "REST",
133               "port": "8446",
134               "enable_ssl": true,
135               "lb_policy":"ip_hash",
136               "visualRange": "1"
137           },
138           {
139               "serviceName": "aai-generic-query",
140               "version": "v12",
141               "url": "/aai/v12/search/generic-query",
142               "protocol": "REST",
143               "port": "8446",
144               "enable_ssl": true,
145               "lb_policy":"ip_hash",
146               "visualRange": "1"
147           },
148           {
149               "serviceName": "aai-generic-query",
150               "version": "v13",
151               "url": "/aai/v13/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-nodes-query",
160               "version": "v11",
161               "url": "/aai/v11/search/nodes-query",
162               "protocol": "REST",
163               "port": "8446",
164               "enable_ssl": true,
165               "lb_policy":"ip_hash",
166               "visualRange": "1"
167           },
168           {
169               "serviceName": "aai-nodes-query",
170               "version": "v12",
171               "url": "/aai/v12/search/nodes-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": "v13",
181               "url": "/aai/v13/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-query",
190               "version": "v11",
191               "url": "/aai/v11/query",
192               "protocol": "REST",
193               "port": "8446",
194               "enable_ssl": true,
195               "lb_policy":"ip_hash",
196               "visualRange": "1"
197           },
198           {
199               "serviceName": "aai-query",
200               "version": "v12",
201               "url": "/aai/v12/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": "v13",
211               "url": "/aai/v13/query",
212               "protocol": "REST",
213               "port": "8446",
214               "enable_ssl": true,
215               "lb_policy":"ip_hash",
216               "visualRange": "1"
217           },
218           {
219               "serviceName": "aai-named-query",
220               "url": "/aai/search",
221               "protocol": "REST",
222               "port": "8446",
223               "enable_ssl": true,
224               "lb_policy":"ip_hash",
225               "visualRange": "1"
226           }
227           ]'
228     spec:
229       initContainers:
230       - command:
231         - /root/ready.py
232         args:
233         - --container-name
234         - hbase
235         - --container-name
236         - aai-resources
237         env:
238         - name: NAMESPACE
239           valueFrom:
240             fieldRef:
241               apiVersion: v1
242               fieldPath: metadata.namespace
243         image: {{ .Values.image.readiness }}
244         imagePullPolicy: {{ .Values.pullPolicy }}
245         name: aai-traversal-readiness
246       containers:
247       - name: aai-traversal
248         image: "{{ .Values.image.aaiTraversalImage }}:{{ .Values.image.aaiTraversalVersion }}"
249         imagePullPolicy: {{ .Values.pullPolicy }}
250         env:
251         - name: CHEF_BRANCH
252           value: master
253         - name: AAI_CHEF_ENV
254           value: simpledemo
255         - name: AAI_CORE_VERSION
256           value: 1.1.0-SNAPSHOT
257         - name: AAI_CHEF_LOC
258           value: /var/chef/aai-data/environments
259         - name: CHEF_GIT_URL
260           value: http://gerrit.onap.org/r/aai
261         - name: RESOURCES_HOSTNAME
262           value: aai-resources.{{ .Values.nsPrefix }}
263         volumeMounts:
264         - mountPath: /etc/localtime
265           name: localtime
266           readOnly: true
267         - mountPath: /var/chef/aai-data/chef-config/dev/.knife/solo.rb
268           subPath: solo.rb
269           name: aai-chef-config
270         - mountPath: /var/chef/aai-data/environments/
271           name: aai-data
272         - mountPath: /var/log/onap
273           name: aai-traversal-logs
274         - mountPath: /opt/app/aai-traversal/bundleconfig/etc/logback.xml
275           name: aai-traversal-log-conf
276           subPath: logback.xml
277         ports:
278         - containerPort: 8446
279         readinessProbe:
280           tcpSocket:
281             port: 8446
282           initialDelaySeconds: 5
283           periodSeconds: 10
284       - name: filebeat-onap-aai-traversal
285         image: {{ .Values.image.filebeat }}
286         imagePullPolicy: {{ .Values.pullPolicy }}
287         volumeMounts:
288         - mountPath: /usr/share/filebeat/filebeat.yml
289           subPath: filebeat.yml
290           name: filebeat-conf
291         - mountPath: /var/log/onap
292           name: aai-traversal-logs
293         - mountPath: /usr/share/filebeat/data
294           name: aai-traversal-filebeat
295       volumes:
296       - name: localtime
297         hostPath:
298           path: /etc/localtime
299       - name: aai-chef-config
300         configMap:
301           name: aai-chef-config-configmap
302       - name: aai-data
303         configMap:
304           name: aai-resources-environments-configmap
305       - name: filebeat-conf
306         configMap:
307           name: aai-filebeat-configmap
308       - name: aai-traversal-logs
309         emptyDir: {}
310       - name: aai-traversal-filebeat
311         emptyDir: {}
312       - name: aai-traversal-log-conf
313         configMap:
314          name: aai-traversal-log-configmap
315       restartPolicy: Always
316       imagePullSecrets:
317       - name: "{{ .Values.nsPrefix }}-docker-registry-key"
318 #{{ end }}