2 # Copyright (c) 2017 Amdocs, Bell Canada
3 # Modifications Copyright (c) 2018 AT&T
4 # Modifications Copyright (c) 2020 Nokia
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ include "common.release" . }}
28 heritage: {{ .Release.Service }}
30 replicas: {{ .Values.replicaCount }}
33 app: {{ include "common.name" . }}
37 app: {{ include "common.name" . }}
38 release: {{ include "common.release" . }}
39 name: {{ include "common.name" . }}
41 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
47 echo "*** retrieve Truststore and Keystore password"
48 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop \
50 echo "*** write them in portal part"
52 for PFILE in `ls -1 .`
54 envsubst <${PFILE} >/config/${PFILE}
56 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
57 - mountPath: /config-input
58 name: portal-config-input
61 image: {{ include "repositoryGenerator.image.envsubst" . }}
62 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 name: {{ include "common.name" . }}-update-config
74 fieldPath: metadata.namespace
75 image: {{ include "repositoryGenerator.image.readiness" . }}
76 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 name: {{ include "common.name" . }}-readiness
79 - name: {{ include "common.name" . }}
80 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
81 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
87 echo "*** retrieve Truststore and Keystore password"
88 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop \
90 echo "*** actual launch of AAI Sparky BE"
91 /opt/app/sparky/bin/start.sh
92 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
93 - mountPath: /etc/localtime
96 - mountPath: /opt/app/sparky/config/auth/csp-cookie-filter.properties
98 subPath: csp-cookie-filter.properties
99 - mountPath: /opt/app/sparky/config/portal/
101 - mountPath: /opt/app/sparky/config/portal/BOOT-INF/classes/
102 name: portal-config-props
103 - mountPath: /var/log/onap
105 - mountPath: /opt/app/sparky/config/application.properties
107 subPath: application.properties
108 - mountPath: /opt/app/sparky/config/application-resources.properties
110 subPath: application-resources.properties
111 - mountPath: /opt/app/sparky/config/application-ssl.properties
113 subPath: application-ssl.properties
114 - mountPath: /opt/app/sparky/config/application-oxm-default.properties
116 subPath: application-oxm-default.properties
117 - mountPath: /opt/app/sparky/config/application-oxm-override.properties
119 subPath: application-oxm-override.properties
120 - mountPath: /opt/app/sparky/config/application-oxm-schema-prod.properties
122 subPath: application-oxm-schema-prod.properties
123 - mountPath: /opt/app/sparky/config/roles.config
125 subPath: roles.config
126 - mountPath: /opt/app/sparky/config/users.config
128 subPath: users.config
129 - mountPath: /opt/app/sparky/config/logging/logback.xml
133 - containerPort: {{ .Values.service.internalPort }}
134 # disable liveness probe when breakpoints set in debugger
135 # so K8s doesn't restart unresponsive container
136 {{- if eq .Values.liveness.enabled true }}
139 port: {{ .Values.service.internalPort }}
140 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
141 periodSeconds: {{ .Values.liveness.periodSeconds }}
145 port: {{ .Values.service.internalPort }}
146 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
147 periodSeconds: {{ .Values.readiness.periodSeconds }}
149 {{ include "common.resources" . }}
150 {{- if .Values.nodeSelector }}
152 {{ toYaml .Values.nodeSelector | indent 8 }}
154 {{- if .Values.affinity }}
156 {{ toYaml .Values.affinity | indent 8 }}
159 # side car containers
160 - name: filebeat-onap
161 image: {{ include "repositoryGenerator.image.logging" . }}
162 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
164 - mountPath: /usr/share/filebeat/filebeat.yml
165 subPath: filebeat.yml
167 - mountPath: /var/log/onap
169 - mountPath: /usr/share/filebeat/data
170 name: aai-sparky-filebeat
172 {{ include "common.resources" . }}
174 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
180 name: {{ include "common.fullname" . }}
181 - name: portal-config
184 - name: portal-config-input
186 name: {{ include "common.fullname" . }}-portal
187 - name: portal-config-props
189 name: {{ include "common.fullname" . }}-portal-props
192 secretName: {{ include "common.fullname" . }}
193 - name: filebeat-conf
198 - name: aai-sparky-filebeat
202 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
204 - name: "{{ include "common.namespace" . }}-docker-registry-key"