2 # Copyright © 2017 Amdocs, Bell Canada
3 # Modifications Copyright © 2018 AT&T
4 # Modifications Copyright © 2020 Orange
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 }}
32 type: {{ .Values.updateStrategy.type }}
33 {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }}
35 maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
36 maxSurge: {{ .Values.updateStrategy.maxSurge }}
40 app: {{ include "common.name" . }}
44 app: {{ include "common.name" . }}
45 release: {{ include "common.release" . }}
46 name: {{ include "common.name" . }}
48 checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
50 {{- if .Values.global.aafEnabled }}
51 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
57 echo "*** retrieve Truststore and Keystore password"
58 export $(cat {{ .Values.certInitializer.appMountPath }}/local/mycreds.prop | xargs -0)
59 echo "*** obfuscate them "
60 export KEYSTORE_PLAIN_PASSWORD=${KEYSTORE_PLAIN_PASSWORD}
61 export TRUSTSTORE_PLAIN_PASSWORD=${TRUSTSTORE_PLAIN_PASSWORD}
62 export JETTY_UTIL_JAR=$(find /usr/local/jetty/lib/ -regextype sed -regex ".*jetty-util-[0-9].*.jar")
63 export KEYSTORE_PASSWORD=`java -cp ${JETTY_UTIL_JAR} org.eclipse.jetty.util.security.Password ${KEYSTORE_PLAIN_PASSWORD} 2>&1 | grep "OBF:"`
64 export TRUSTSTORE_PASSWORD=`java -cp ${JETTY_UTIL_JAR} org.eclipse.jetty.util.security.Password ${TRUSTSTORE_PLAIN_PASSWORD} 2>&1 | grep "OBF:"`
65 echo "KEYSTORE_PASSWORD=${KEYSTORE_PASSWORD}" >> {{ .Values.certInitializer.appMountPath }}/local/mycreds.prop
66 echo "TRUSTSTORE_PASSWORD=${TRUSTSTORE_PASSWORD}" >> {{ .Values.certInitializer.appMountPath }}/local/mycreds.prop
67 image: {{ include "repositoryGenerator.image.jetty" . }}
68 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
69 name: {{ include "common.name" . }}-obfuscate
70 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
72 runAsUser: {{ .Values.securityContext.user_id }}
75 - name: {{ include "common.name" . }}
76 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
77 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 {{- if .Values.global.aafEnabled }}
84 echo "*** retrieve Truststore and Keystore password"
85 export $(cat {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
86 echo "*** actual launch of AAI Schema Service"
87 /bin/bash /opt/app/aai-schema-service/docker-entrypoint.sh
91 value: {{ .Values.securityContext.user_id | quote }}
92 - name: LOCAL_GROUP_ID
93 value: {{ .Values.securityContext.group_id | quote }}
94 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
95 - mountPath: /etc/localtime
98 - mountPath: /opt/app/aai-schema-service/resources/etc/appprops/aaiconfig.properties
100 subPath: aaiconfig.properties
101 - mountPath: /opt/aai/logroot/AAI-SS
103 - mountPath: /opt/app/aai-schema-service/resources/logback.xml
106 - mountPath: /opt/app/aai-schema-service/resources/localhost-access-logback.xml
107 name: localhost-access-log-conf
108 subPath: localhost-access-logback.xml
109 - mountPath: /opt/app/aai-schema-service/resources/etc/auth/realm.properties
111 subPath: realm.properties
112 - mountPath: /opt/app/aai-schema-service/resources/application.properties
114 subPath: application.properties
116 - containerPort: {{ .Values.service.internalPort }}
117 - containerPort: {{ .Values.service.internalPort2 }}
118 # disable liveness probe when breakpoints set in debugger
119 # so K8s doesn't restart unresponsive container
120 {{ if .Values.liveness.enabled }}
123 port: {{ .Values.service.internalPort }}
124 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
125 periodSeconds: {{ .Values.liveness.periodSeconds }}
129 port: {{ .Values.service.internalPort }}
130 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
131 periodSeconds: {{ .Values.readiness.periodSeconds }}
133 {{ include "common.resources" . | indent 12 }}
134 {{- if .Values.nodeSelector }}
136 {{ toYaml .Values.nodeSelector | indent 8 }}
138 {{- if .Values.affinity }}
140 {{ toYaml .Values.affinity | indent 8 }}
143 # side car containers
144 {{ include "common.log.sidecar" . | nindent 6 }}
145 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
146 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
147 - name: aai-common-aai-auth-mount
149 secretName: aai-common-aai-auth
155 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
158 name: {{ include "common.fullname" . }}-log
159 - name: localhost-access-log-conf
161 name: {{ include "common.fullname" . }}-localhost-access-log
162 - name: springapp-conf
164 name: {{ include "common.fullname" . }}-springapp
165 - name: aaiconfig-conf
167 name: {{ include "common.fullname" . }}-aaiconfig
170 name: {{ include "common.fullname" . }}-realm
171 restartPolicy: {{ .Values.restartPolicy }}
173 - name: "{{ include "common.namespace" . }}-docker-registry-key"