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 sidecar.istio.io/rewriteAppHTTPProbers: "false"
39 app: {{ include "common.name" . }}
40 release: {{ include "common.release" . }}
41 name: {{ include "common.name" . }}
43 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
44 {{- if ( include "common.needTLS" .) }}
50 echo "*** retrieve Truststore and Keystore password"
51 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop \
53 if [ -z "$KEYSTORE_PASSWORD" ]
55 echo " /!\ certificates retrieval failed"
58 echo "*** write them in portal part"
60 for PFILE in `ls -1 .`
62 envsubst <${PFILE} >/config/${PFILE}
64 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
65 - mountPath: /config-input
66 name: portal-config-input
69 image: {{ include "repositoryGenerator.image.envsubst" . }}
70 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
71 name: {{ include "common.name" . }}-update-config
83 fieldPath: metadata.namespace
84 image: {{ include "repositoryGenerator.image.readiness" . }}
85 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
86 name: {{ include "common.name" . }}-readiness
88 - name: {{ include "common.name" . }}
89 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
90 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
96 echo "*** retrieve Truststore and Keystore password"
97 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop \
99 echo "*** actual launch of AAI Sparky BE"
100 /opt/app/sparky/bin/start.sh
101 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
102 - mountPath: /etc/localtime
105 - mountPath: /opt/app/sparky/config/auth/csp-cookie-filter.properties
107 subPath: csp-cookie-filter.properties
108 - mountPath: /opt/app/sparky/config/portal/
110 - mountPath: /opt/app/sparky/config/portal/BOOT-INF/classes/
111 name: portal-config-props
112 - mountPath: {{ .Values.log.path }}
114 - mountPath: /opt/app/sparky/config/application.properties
116 subPath: application.properties
117 - mountPath: /opt/app/sparky/config/application-resources.properties
119 subPath: application-resources.properties
120 - mountPath: /opt/app/sparky/config/application-ssl.properties
122 subPath: application-ssl.properties
123 - mountPath: /opt/app/sparky/config/application-oxm-default.properties
125 subPath: application-oxm-default.properties
126 - mountPath: /opt/app/sparky/config/application-oxm-override.properties
128 subPath: application-oxm-override.properties
129 - mountPath: /opt/app/sparky/config/application-oxm-schema-prod.properties
131 subPath: application-oxm-schema-prod.properties
132 - mountPath: /opt/app/sparky/config/roles.config
134 subPath: roles.config
135 - mountPath: /opt/app/sparky/config/users.config
137 subPath: users.config
138 - mountPath: /opt/app/sparky/config/logging/logback.xml
142 - containerPort: {{ .Values.service.internalPort }}
143 # disable liveness probe when breakpoints set in debugger
144 # so K8s doesn't restart unresponsive container
145 {{- if eq .Values.liveness.enabled true }}
148 port: {{ .Values.service.internalPort }}
149 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
150 periodSeconds: {{ .Values.liveness.periodSeconds }}
154 port: {{ .Values.service.internalPort }}
155 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
156 periodSeconds: {{ .Values.readiness.periodSeconds }}
158 {{ include "common.resources" . }}
159 {{- if .Values.nodeSelector }}
161 {{ toYaml .Values.nodeSelector | indent 8 }}
163 {{- if .Values.affinity }}
165 {{ toYaml .Values.affinity | indent 8 }}
168 # side car containers
169 {{ include "common.log.sidecar" . | nindent 6 }}
170 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
171 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
177 name: {{ include "common.fullname" . }}
178 - name: portal-config
179 {{- if .Values.global.aafEnabled }}
182 - name: portal-config-input
185 name: {{ include "common.fullname" . }}-portal
186 - name: portal-config-props
188 name: {{ include "common.fullname" . }}-portal-props
191 secretName: {{ include "common.fullname" . }}
194 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
197 restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
199 - name: "{{ include "common.namespace" . }}-docker-registry-key"