1 # Copyright © 2017 Amdocs, Bell Canada
2 # Modifications Copyright © 2018 AT&T
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 apiVersion: extensions/v1beta1
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ .Release.Name }}
25 heritage: {{ .Release.Service }}
27 replicas: {{ .Values.replicaCount }}
30 app: {{ include "common.name" . }}
34 app: {{ include "common.name" . }}
35 release: {{ .Release.Name }}
36 name: {{ include "common.name" . }}
38 checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
39 msb.onap.org/service-info: '[
41 "serviceName": "_aai-generic-query",
43 "url": "/aai/v11/search/generic-query",
47 "lb_policy":"ip_hash",
49 "path": "/aai/v11/search/generic-query"
52 "serviceName": "_aai-generic-query",
54 "url": "/aai/v12/search/generic-query",
58 "lb_policy":"ip_hash",
60 "path": "/aai/v12/search/generic-query"
63 "serviceName": "_aai-generic-query",
65 "url": "/aai/v13/search/generic-query",
69 "lb_policy":"ip_hash",
71 "path": "/aai/v13/search/generic-query"
74 "serviceName": "_aai-nodes-query",
76 "url": "/aai/v11/search/nodes-query",
80 "lb_policy":"ip_hash",
82 "path": "/aai/v11/search/nodes-query"
85 "serviceName": "_aai-nodes-query",
87 "url": "/aai/v12/search/nodes-query",
91 "lb_policy":"ip_hash",
93 "path": "/aai/v12/search/nodes-query"
96 "serviceName": "_aai-nodes-query",
98 "url": "/aai/v13/search/nodes-query",
102 "lb_policy":"ip_hash",
104 "path": "/aai/v13/search/nodes-query"
107 "serviceName": "_aai-query",
109 "url": "/aai/v11/query",
113 "lb_policy":"ip_hash",
115 "path": "/aai/v11/query"
118 "serviceName": "_aai-query",
120 "url": "/aai/v12/query",
124 "lb_policy":"ip_hash",
126 "path": "/aai/v12/query"
129 "serviceName": "_aai-query",
131 "url": "/aai/v13/query",
135 "lb_policy":"ip_hash",
137 "path": "/aai/v13/query"
140 "serviceName": "_aai-named-query",
141 "url": "/aai/search",
145 "lb_policy":"ip_hash",
147 "path": "/aai/search"
150 "serviceName": "aai-generic-query",
152 "url": "/aai/v11/search/generic-query",
156 "lb_policy":"ip_hash",
160 "serviceName": "aai-generic-query",
162 "url": "/aai/v12/search/generic-query",
166 "lb_policy":"ip_hash",
170 "serviceName": "aai-generic-query",
172 "url": "/aai/v13/search/generic-query",
176 "lb_policy":"ip_hash",
180 "serviceName": "aai-nodes-query",
182 "url": "/aai/v11/search/nodes-query",
186 "lb_policy":"ip_hash",
190 "serviceName": "aai-nodes-query",
192 "url": "/aai/v12/search/nodes-query",
196 "lb_policy":"ip_hash",
200 "serviceName": "aai-nodes-query",
202 "url": "/aai/v13/search/nodes-query",
206 "lb_policy":"ip_hash",
210 "serviceName": "aai-query",
212 "url": "/aai/v11/query",
216 "lb_policy":"ip_hash",
220 "serviceName": "aai-query",
222 "url": "/aai/v12/query",
226 "lb_policy":"ip_hash",
230 "serviceName": "aai-query",
232 "url": "/aai/v13/query",
236 "lb_policy":"ip_hash",
240 "serviceName": "aai-named-query",
241 "url": "/aai/search",
245 "lb_policy":"ip_hash",
250 hostname: aai-traversal
251 {{ if .Values.global.initContainers.enabled }}
254 {{ if .Values.global.jobs.createSchema.enabled }}
255 - /root/job_complete.py
258 - {{ .Release.Name }}-aai-graphadmin-create-db-schema
270 fieldPath: metadata.namespace
271 image: "{{ .Values.global.readinessRepository }}/{{ .Values.global.readinessImage }}"
272 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
273 name: {{ include "common.name" . }}-readiness
276 - name: {{ include "common.name" . }}
277 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
278 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
280 - name: DISABLE_UPDATE_QUERY
281 value: {{ .Values.config.disableUpdateQuery | quote }}
282 - name: LOCAL_USER_ID
283 value: {{ .Values.global.config.userId | quote }}
284 - name: LOCAL_GROUP_ID
285 value: {{ .Values.global.config.groupId | quote }}
287 - mountPath: /etc/localtime
290 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties
291 name: {{ include "common.fullname" . }}-db-real-conf
292 subPath: janusgraph-realtime.properties
293 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties
294 name: {{ include "common.fullname" . }}-db-cached-conf
295 subPath: janusgraph-cached.properties
296 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties
297 name: {{ include "common.fullname" . }}-aaiconfig-conf
298 subPath: aaiconfig.properties
299 - mountPath: /opt/aai/logroot/AAI-GQ
300 name: {{ include "common.fullname" . }}-logs
301 - mountPath: /opt/app/aai-traversal/resources/logback.xml
302 name: {{ include "common.fullname" . }}-log-conf
304 - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml
305 name: {{ include "common.fullname" . }}-localhost-access-log-conf
306 subPath: localhost-access-logback.xml
307 - mountPath: /opt/app/aai-traversal/resources/aaf/org.onap.aai.keyfile
308 name: {{ include "common.fullname" . }}-aaf-certs
309 subPath: org.onap.aai.keyfile
310 - mountPath: /opt/app/aai-traversal/resources/aaf/org.onap.aai.props
311 name: {{ include "common.fullname" . }}-aaf-properties
312 subPath: org.onap.aai.props
313 - mountPath: /opt/app/aai-traversal/resources/aaf/org.osaaf.location.props
314 name: {{ include "common.fullname" . }}-aaf-properties
315 subPath: org.osaaf.location.props
316 - mountPath: /opt/app/aai-traversal/resources/aaf/permissions.properties
317 name: {{ include "common.fullname" . }}-aaf-properties
318 subPath: permissions.properties
319 - mountPath: /opt/app/aai-traversal/resources/cadi.properties
320 name: {{ include "common.fullname" . }}-aaf-properties
321 subPath: cadi.properties
322 - mountPath: /opt/app/aai-traversal/resources/aaf/org.onap.aai.p12
323 name: {{ include "common.fullname" . }}-aaf-certs
324 subPath: org.onap.aai.p12
325 - mountPath: /opt/app/aai-traversal/resources/aaf/truststoreONAPall.jks
326 name: {{ include "common.fullname" . }}-aaf-certs
327 subPath: truststoreONAPall.jks
328 - mountPath: /opt/app/aai-traversal/resources/application.properties
329 name: {{ include "common.fullname" . }}-springapp-conf
330 subPath: application.properties
332 {{ range $job := .Values.global.config.auth.files }}
333 - mountPath: /opt/app/aai-traversal/resources/etc/auth/{{ . }}
334 name: {{ include "common.fullname" $global }}-auth-truststore-sec
338 - containerPort: {{ .Values.service.internalPort }}
339 - containerPort: {{ .Values.service.internalPort2 }}
340 # disable liveness probe when breakpoints set in debugger
341 # so K8s doesn't restart unresponsive container
342 {{ if .Values.liveness.enabled }}
345 port: {{ .Values.service.internalPort }}
346 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
347 periodSeconds: {{ .Values.liveness.periodSeconds }}
351 port: {{ .Values.service.internalPort }}
352 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
353 periodSeconds: {{ .Values.readiness.periodSeconds }}
355 {{ toYaml (pluck .Values.flavor .Values.resources| first) | indent 12 }}
356 {{- if .Values.nodeSelector }}
358 {{ toYaml .Values.nodeSelector | indent 8 }}
360 {{- if .Values.affinity }}
362 {{ toYaml .Values.affinity | indent 8 }}
365 # side car containers
366 - name: filebeat-onap
367 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
368 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
370 - mountPath: /usr/share/filebeat/filebeat.yml
371 subPath: filebeat.yml
373 - mountPath: /var/log/onap
374 name: {{ include "common.fullname" . }}-logs
375 - mountPath: /usr/share/filebeat/data
376 name: {{ include "common.fullname" . }}-filebeat
381 - name: filebeat-conf
384 - name: {{ include "common.fullname" . }}-logs
386 - name: {{ include "common.fullname" . }}-filebeat
388 - name: {{ include "common.fullname" . }}-log-conf
390 name: {{ include "common.fullname" . }}-log
391 - name: {{ include "common.fullname" . }}-localhost-access-log-conf
393 name: {{ include "common.fullname" . }}-localhost-access-log-configmap
394 - name: {{ include "common.fullname" . }}-db-real-conf
396 name: {{ include "common.fullname" . }}-db-real-configmap
397 - name: {{ include "common.fullname" . }}-db-cached-conf
399 name: {{ include "common.fullname" . }}-db-cached-configmap
400 - name: {{ include "common.fullname" . }}-aaiconfig-conf
402 name: {{ include "common.fullname" . }}-aaiconfig-configmap
403 - name: {{ include "common.fullname" . }}-aaf-properties
405 name: {{ include "common.fullname" . }}-aaf-props
406 - name: {{ include "common.fullname" . }}-aaf-certs
408 secretName: {{ include "common.fullname" . }}-aaf-keys
409 - name: {{ include "common.fullname" . }}-springapp-conf
411 name: {{ include "common.fullname" . }}-springapp-configmap
412 - name: {{ include "common.fullname" . }}-realm-conf
414 name: {{ include "common.fullname" . }}-realm-configmap
415 - name: {{ include "common.fullname" . }}-auth-truststore-sec
417 secretName: aai-auth-truststore-secret
419 {{ range $job := .Values.global.config.auth.files }}
423 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
425 - name: "{{ include "common.namespace" . }}-docker-registry-key"