2 # Copyright (c) 2017 Amdocs, Bell Canada
3 # Modifications Copyright (c) 2018 AT&T
4 # Modifications Copyright (c) 2020 Nokia, Orange
5 # Modifications Copyright (c) 2021 Orange
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
23 name: {{ include "common.fullname" . }}
24 namespace: {{ include "common.namespace" . }}
26 app: {{ include "common.name" . }}
27 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
28 release: {{ include "common.release" . }}
29 heritage: {{ .Release.Service }}
31 replicas: {{ .Values.replicaCount }}
34 app: {{ include "common.name" . }}
38 app: {{ include "common.name" . }}
39 release: {{ include "common.release" . }}
40 name: {{ include "common.name" . }}
42 checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
43 {{- if .Values.global.msbEnabled }}
44 {{ $values := .Values }}
45 msb.onap.org/service-info: '[
46 {{- range $api_endpoint := $values.aai_enpoints -}}
47 {{- range $api_version := $values.api_list }}
49 "serviceName": "_{{ $api_endpoint.name }}",
50 "version": "v{{ $api_version }}",
51 "url": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}",
55 "lb_policy":"ip_hash",
57 "path": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}"
60 "serviceName": "{{ $api_endpoint.name }}",
61 "version": "v{{ $api_version }}",
62 "url": "/aai/v{{ $api_version }}/{{ $api_endpoint.url }}",
66 "lb_policy":"ip_hash",
72 "serviceName": "_aai-named-query",
77 "lb_policy":"ip_hash",
82 "serviceName": "aai-named-query",
87 "lb_policy":"ip_hash",
93 hostname: aai-traversal
94 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
98 {{- if .Values.global.jobs.migration.enabled }}
100 - {{ include "common.release" . }}-aai-graphadmin-migration
102 {{- if .Values.global.jobs.createSchema.enabled }}
104 - {{ include "common.release" . }}-aai-graphadmin-create-db-schema
107 {{- if .Values.global.cassandra.localCluster }}
121 fieldPath: metadata.namespace
122 image: {{ include "repositoryGenerator.image.readiness" . }}
123 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
124 name: {{ include "common.name" . }}-readiness
126 - name: {{ include "common.name" . }}
127 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
128 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
134 echo "*** retrieve Truststore and Keystore password"
135 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
136 echo "*** actual launch of AAI Resources"
137 /bin/bash /opt/app/aai-traversal/docker-entrypoint.sh
139 - name: TRUSTORE_ALL_PASSWORD
140 value: {{ .Values.certInitializer.truststorePassword }}
141 - name: DISABLE_UPDATE_QUERY
142 value: {{ .Values.config.disableUpdateQuery | quote }}
143 - name: LOCAL_USER_ID
144 value: {{ .Values.global.config.userId | quote }}
145 - name: LOCAL_GROUP_ID
146 value: {{ .Values.global.config.groupId | quote }}
147 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
148 - mountPath: /etc/localtime
151 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties
152 name: {{ include "common.fullname" . }}-config
153 subPath: janusgraph-realtime.properties
154 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-cached.properties
155 name: {{ include "common.fullname" . }}-config
156 subPath: janusgraph-cached.properties
157 - mountPath: /opt/app/aai-traversal/resources/etc/appprops/aaiconfig.properties
158 name: {{ include "common.fullname" . }}-config
159 subPath: aaiconfig.properties
160 - mountPath: /opt/aai/logroot/AAI-GQ
161 name: {{ include "common.fullname" . }}-logs
162 - mountPath: /opt/aai/logroot/AAI-GQ/misc
163 name: {{ include "common.fullname" . }}-logs-misc
164 - mountPath: /opt/app/aai-traversal/resources/logback.xml
165 name: {{ include "common.fullname" . }}-config
167 - mountPath: /opt/app/aai-traversal/resources/localhost-access-logback.xml
168 name: {{ include "common.fullname" . }}-config
169 subPath: localhost-access-logback.xml
170 - mountPath: /opt/app/aai-traversal/resources/etc/auth/realm.properties
171 name: {{ include "common.fullname" . }}-config
172 subPath: realm.properties
173 - mountPath: /opt/app/aai-traversal/resources/aaf/bath_config.csv
174 name: {{ include "common.fullname" . }}-aaf-certs
175 subPath: bath_config.csv
176 - mountPath: /opt/app/aai-traversal/resources/aaf/org.onap.aai.props
177 name: {{ include "common.fullname" . }}-aaf-properties
178 subPath: org.onap.aai.props
179 - mountPath: /opt/app/aai-traversal/resources/aaf/org.osaaf.location.props
180 name: {{ include "common.fullname" . }}-aaf-properties
181 subPath: org.osaaf.location.props
182 - mountPath: /opt/app/aai-traversal/resources/aaf/permissions.properties
183 name: {{ include "common.fullname" . }}-aaf-properties
184 subPath: permissions.properties
185 - mountPath: /opt/app/aai-traversal/resources/cadi.properties
186 name: {{ include "common.fullname" . }}-aaf-properties
187 subPath: cadi.properties
188 - mountPath: /opt/app/aai-traversal/resources/application.properties
189 name: {{ include "common.fullname" . }}-config
190 subPath: application.properties
191 - mountPath: /opt/app/aai-traversal/resources/application-keycloak.properties
192 name: {{ include "common.fullname" . }}-config
193 subPath: application-keycloak.properties
195 - containerPort: {{ .Values.service.internalPort }}
196 - containerPort: {{ .Values.service.internalPort2 }}
197 # disable liveness probe when breakpoints set in debugger
198 # so K8s doesn't restart unresponsive container
199 {{ if .Values.liveness.enabled }}
202 port: {{ .Values.service.internalPort }}
203 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
204 periodSeconds: {{ .Values.liveness.periodSeconds }}
208 port: {{ .Values.service.internalPort }}
209 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
210 periodSeconds: {{ .Values.readiness.periodSeconds }}
212 {{ include "common.resources" . }}
213 {{- if .Values.nodeSelector }}
215 {{ toYaml .Values.nodeSelector | indent 8 }}
217 {{- if .Values.affinity }}
219 {{ toYaml .Values.affinity | indent 8 }}
222 # side car containers
223 - name: filebeat-onap
224 image: {{ include "repositoryGenerator.image.logging" . }}
225 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
227 - mountPath: /usr/share/filebeat/filebeat.yml
228 subPath: filebeat.yml
230 - mountPath: /var/log/onap
231 name: {{ include "common.fullname" . }}-logs
232 - mountPath: /usr/share/filebeat/data
233 name: {{ include "common.fullname" . }}-filebeat
235 {{ include "common.resources" . }}
236 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
237 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
241 - name: filebeat-conf
244 - name: {{ include "common.fullname" . }}-logs
246 - name: {{ include "common.fullname" . }}-logs-misc
248 - name: {{ include "common.fullname" . }}-filebeat
250 - name: {{ include "common.fullname" . }}-config
252 name: {{ include "common.fullname" . }}
253 - name: {{ include "common.fullname" . }}-aaf-properties
255 name: {{ include "common.fullname" . }}-aaf-props
256 - name: {{ include "common.fullname" . }}-aaf-certs
258 secretName: {{ include "common.fullname" . }}-aaf
259 - name: aai-common-aai-auth-mount
261 secretName: aai-common-aai-auth
262 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
264 - name: "{{ include "common.namespace" . }}-docker-registry-key"