1 # Copyright © 2017 Amdocs, Bell Canada
2 # Modifications Copyright © 2020 AT&T
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
19 name: {{ include "common.fullname" . }}
20 namespace: {{ include "common.namespace" . }}
22 app: {{ include "common.name" . }}
23 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
24 release: {{ include "common.release" . }}
25 heritage: {{ .Release.Service }}
29 app: {{ include "common.name" . }}
30 replicas: {{ .Values.replicaCount }}
34 app: {{ include "common.name" . }}
35 release: {{ include "common.release" . }}
38 - name: {{ include "common.name" . }}-job-completion
39 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
40 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
45 - {{ include "common.release" . }}-portal-db-config
51 fieldPath: metadata.namespace
52 - name: {{ include "common.name" . }}-portal-config
53 image: "{{ .Values.global.envsubstImage }}"
54 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
61 for PFILE in `ls -1 *.xml`
64 chmod 0755 /config/${PFILE}
67 for PFILE in `ls -1 *.properties`
69 envsubst <${PFILE} >/config/${PFILE}
70 chmod 0755 /config/${PFILE}
74 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-cass" "key" "login") | indent 12 }}
75 - name: CASSA_PASSWORD
76 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-cass" "key" "password") | indent 12 }}
77 - name: CIPHER_ENC_KEY
78 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cipher-enc-key" "key" "password") | indent 12 }}
79 - name: PORTAL_DB_USER
80 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-backend-db" "key" "login") | indent 12 }}
81 - name: PORTAL_DB_PASSWORD
82 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-backend-db" "key" "password") | indent 12 }}
84 - mountPath: /config-input
85 name: properties-onapportal-scrubbed
87 name: properties-onapportal
88 {{ include "common.certInitializer.initContainer" . | indent 6 }}
90 - name: {{ include "common.name" . }}
91 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
92 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
93 command: ["bash","-c"]
94 {{- if .Values.global.aafEnabled }}
95 args: ["export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0);\
96 export _JAVA_OPTIONS=\"-Djavax.net.ssl.trustStorePassword=$cadi_truststore_password \
97 -Djavax.net.ssl.keyStorePassword=$cadi_keystore_password_p12\";\
98 /start-apache-tomcat.sh -i \"\" -n \"\" -b {{ .Values.global.env.tomcatDir }}"]
100 - name: CATALINA_OPTS
102 -Djavax.net.ssl.keyStore="{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }}"
103 -Djavax.net.ssl.trustStore="{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }}"
105 args: ["/start-apache-tomcat.sh -i "" -n "" -b {{ .Values.global.env.tomcatDir }}"]
108 - containerPort: {{ .Values.service.internalPort }}
109 - containerPort: {{ .Values.service.internalPort2 }}
110 - containerPort: {{ .Values.service.internalPort3 }}
111 - containerPort: {{ .Values.service.internalPort4 }}
112 {{- if eq .Values.liveness.enabled true }}
115 port: {{ .Values.service.internalPort }}
116 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
117 periodSeconds: {{ .Values.liveness.periodSeconds }}
121 port: {{ .Values.service.internalPort }}
122 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
123 periodSeconds: {{ .Values.readiness.periodSeconds }}
125 {{ include "common.certInitializer.volumeMount" . | indent 8 }}
126 - mountPath: /etc/localtime
129 - name: properties-onapportal
130 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/fusion/conf/fusion.properties"
131 subPath: fusion.properties
132 - name: properties-onapportal
133 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/classes/openid-connect.properties"
134 subPath: openid-connect.properties
135 - name: properties-onapportal
136 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/conf/system.properties"
137 subPath: system.properties
138 - name: properties-onapportal
139 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/classes/portal.properties"
140 subPath: portal.properties
141 - name: properties-onapportal
142 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/classes/key.properties"
143 subPath: key.properties
144 - name: properties-onapportal
145 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/classes/music.properties"
146 subPath: music.properties
147 - name: properties-onapportal
148 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/classes/logback.xml"
150 - name: properties-onapportal
151 mountPath: "{{ .Values.global.env.tomcatDir }}/conf/server.xml"
153 - name: properties-onapportal
154 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/web.xml"
156 - name: properties-onapportal
157 mountPath: "{{ .Values.global.env.tomcatDir }}/temp"
159 mountPath: /var/log/onap
161 {{ include "common.resources" . }}
162 {{- if .Values.nodeSelector }}
164 {{ toYaml .Values.nodeSelector | indent 10 }}
166 {{- if .Values.affinity }}
168 {{ toYaml .Values.affinity | indent 10 }}
170 - name: filebeat-onap
171 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
172 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
174 - mountPath: /usr/share/filebeat/filebeat.yml
176 subPath: filebeat.yml
177 - name: portal-data-filebeat
178 mountPath: /usr/share/filebeat/data
180 mountPath: /var/log/onap
182 {{ include "common.certInitializer.volumes" . | indent 8 }}
186 - name: properties-onapportal
189 - name: properties-onapportal-scrubbed
191 name: {{ include "common.fullname" . }}-onapportal
193 - name: filebeat-conf
195 name: portal-filebeat
198 - name: portal-data-filebeat
200 - name: portal-tomcat-logs
203 - name: "{{ include "common.namespace" . }}-docker-registry-key"