2 # Copyright © 2017 Amdocs, Bell Canada
3 # Modifications Copyright © 2018,2020 AT&T
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ include "common.release" . }}
27 heritage: {{ .Release.Service }}
31 app: {{ include "common.name" . }}
32 replicas: {{ .Values.replicaCount }}
36 app: {{ include "common.name" . }}
37 release: {{ include "common.release" . }}
40 - name: {{ include "common.name" . }}-readiness
41 image: {{ include "repositoryGenerator.image.readiness" . }}
42 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 fieldPath: metadata.namespace
54 - name: {{ include "common.name" . }}-portalsdk-config
55 image: {{ include "repositoryGenerator.image.envsubst" . }}
56 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 for PFILE in `ls -1 *.xml`
66 chmod 0755 /config/${PFILE}
69 for PFILE in `ls -1 *.properties`
71 envsubst <${PFILE} >/config/${PFILE}
72 chmod 0755 /config/${PFILE}
76 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-cass" "key" "login") | indent 12 }}
77 - name: CASSA_PASSWORD
78 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-cass" "key" "password") | indent 12 }}
79 - name: CIPHER_ENC_KEY
80 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cipher-enc-key" "key" "password") | indent 12 }}
81 - name: PORTAL_DB_USER
82 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-backend-db" "key" "login") | indent 12 }}
83 - name: PORTAL_DB_PASSWORD
84 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-backend-db" "key" "password") | indent 12 }}
86 - mountPath: /config-input
87 name: properties-onapportalsdk-scrubbed
89 name: properties-onapportalsdk
90 {{ include "common.certInitializer.initContainer" . | indent 6 }}
92 - name: {{ include "common.name" . }}
93 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
94 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
95 command: ["bash","-c"]
96 {{- if .Values.global.aafEnabled }}
97 args: ["export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0);\
98 export _JAVA_OPTIONS=\"-Djavax.net.ssl.trustStorePassword=$cadi_truststore_password \
99 -Djavax.net.ssl.keyStorePassword=$cadi_keystore_password_p12\";\
100 /start-apache-tomcat.sh -b {{ .Values.global.env.tomcatDir }}"]
102 - name: CATALINA_OPTS
104 -Djavax.net.ssl.keyStore="{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }}"
105 -Djavax.net.ssl.trustStore="{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }}"
107 args: ["/start-apache-tomcat.sh -b {{ .Values.global.env.tomcatDir }}"]
110 - containerPort: {{ .Values.service.internalPort }}
111 {{- if eq .Values.liveness.enabled true }}
114 port: {{ .Values.service.internalPort }}
115 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
116 periodSeconds: {{ .Values.liveness.periodSeconds }}
120 port: {{ .Values.service.internalPort }}
121 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
122 periodSeconds: {{ .Values.readiness.periodSeconds }}
124 {{ include "common.certInitializer.volumeMount" . | indent 8 }}
125 - name: properties-onapportalsdk
126 mountPath: "{{ .Values.global.env.tomcatDir }}/conf/server.xml"
128 - mountPath: /etc/localtime
131 - name: properties-onapportalsdk
132 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties"
133 subPath: fusion.properties
134 - name: properties-onapportalsdk
135 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/conf/system.properties"
136 subPath: system.properties
137 - name: properties-onapportalsdk
138 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/classes/portal.properties"
139 subPath: portal.properties
140 - name: properties-onapportalsdk
141 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/classes/key.properties"
142 subPath: key.properties
143 - name: properties-onapportalsdk
144 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/classes/music.properties"
145 subPath: music.properties
146 - name: properties-onapportalsdk
147 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/classes/logback.xml"
149 - name: portal-tomcat-logs
150 mountPath: "{{ .Values.global.env.tomcatDir }}/logs"
152 mountPath: "{{ .Values.log.path }}"
154 {{ include "common.resources" . }}
155 {{- if .Values.nodeSelector }}
157 {{ toYaml .Values.nodeSelector | indent 10 }}
159 {{- if .Values.affinity }}
161 {{ toYaml .Values.affinity | indent 10 }}
163 {{ include "common.log.sidecar" . | nindent 6 }}
164 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
169 - name: properties-onapportalsdk
172 - name: properties-onapportalsdk-scrubbed
174 name: {{ include "common.fullname" . }}-onapportalsdk
176 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 8 }}
179 - name: portal-tomcat-logs
181 {{ include "common.certInitializer.volumes" . | indent 8 }}
183 - name: "{{ include "common.namespace" . }}-docker-registry-key"