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 if [ -z "$KEYSTORE_PASSWORD" ]
52 echo " /!\ certificates retrieval failed"
55 echo "*** write them in portal part"
57 for PFILE in `ls -1 .`
59 envsubst <${PFILE} >/config/${PFILE}
61 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
62 - mountPath: /config-input
63 name: portal-config-input
66 image: {{ include "repositoryGenerator.image.envsubst" . }}
67 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
68 name: {{ include "common.name" . }}-update-config
79 fieldPath: metadata.namespace
80 image: {{ include "repositoryGenerator.image.readiness" . }}
81 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
82 name: {{ include "common.name" . }}-readiness
84 - name: {{ include "common.name" . }}
85 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
86 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
92 echo "*** retrieve Truststore and Keystore password"
93 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop \
95 echo "*** actual launch of AAI Sparky BE"
96 /opt/app/sparky/bin/start.sh
97 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
98 - mountPath: /etc/localtime
101 - mountPath: /opt/app/sparky/config/auth/csp-cookie-filter.properties
103 subPath: csp-cookie-filter.properties
104 - mountPath: /opt/app/sparky/config/portal/
106 - mountPath: /opt/app/sparky/config/portal/BOOT-INF/classes/
107 name: portal-config-props
108 - mountPath: /var/log/onap
110 - mountPath: /opt/app/sparky/config/application.properties
112 subPath: application.properties
113 - mountPath: /opt/app/sparky/config/application-resources.properties
115 subPath: application-resources.properties
116 - mountPath: /opt/app/sparky/config/application-ssl.properties
118 subPath: application-ssl.properties
119 - mountPath: /opt/app/sparky/config/application-oxm-default.properties
121 subPath: application-oxm-default.properties
122 - mountPath: /opt/app/sparky/config/application-oxm-override.properties
124 subPath: application-oxm-override.properties
125 - mountPath: /opt/app/sparky/config/application-oxm-schema-prod.properties
127 subPath: application-oxm-schema-prod.properties
128 - mountPath: /opt/app/sparky/config/roles.config
130 subPath: roles.config
131 - mountPath: /opt/app/sparky/config/users.config
133 subPath: users.config
134 - mountPath: /opt/app/sparky/config/logging/logback.xml
138 - containerPort: {{ .Values.service.internalPort }}
139 # disable liveness probe when breakpoints set in debugger
140 # so K8s doesn't restart unresponsive container
141 {{- if eq .Values.liveness.enabled true }}
144 port: {{ .Values.service.internalPort }}
145 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
146 periodSeconds: {{ .Values.liveness.periodSeconds }}
150 port: {{ .Values.service.internalPort }}
151 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
152 periodSeconds: {{ .Values.readiness.periodSeconds }}
154 {{ include "common.resources" . }}
155 {{- if .Values.nodeSelector }}
157 {{ toYaml .Values.nodeSelector | indent 8 }}
159 {{- if .Values.affinity }}
161 {{ toYaml .Values.affinity | indent 8 }}
164 # side car containers
165 - name: filebeat-onap
166 image: {{ include "repositoryGenerator.image.logging" . }}
167 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
169 - mountPath: /usr/share/filebeat/filebeat.yml
170 subPath: filebeat.yml
172 - mountPath: /var/log/onap
174 - mountPath: /usr/share/filebeat/data
175 name: aai-sparky-filebeat
177 {{ include "common.resources" . }}
179 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
185 name: {{ include "common.fullname" . }}
186 - name: portal-config
189 - name: portal-config-input
191 name: {{ include "common.fullname" . }}-portal
192 - name: portal-config-props
194 name: {{ include "common.fullname" . }}-portal-props
197 secretName: {{ include "common.fullname" . }}
198 - name: filebeat-conf
203 - name: aai-sparky-filebeat
207 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
209 - name: "{{ include "common.namespace" . }}-docker-registry-key"