1 # Copyright © 2017 Amdocs, Bell Canada
2 # Modifications Copyright © 2018,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" . }}-readiness
39 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
40 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 fieldPath: metadata.namespace
52 - name: {{ include "common.name" . }}-portalsdk-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-onapportalsdk-scrubbed
87 name: properties-onapportalsdk
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 -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 -b {{ .Values.global.env.tomcatDir }}"]
108 - containerPort: {{ .Values.service.internalPort }}
109 {{- if eq .Values.liveness.enabled true }}
112 port: {{ .Values.service.internalPort }}
113 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
114 periodSeconds: {{ .Values.liveness.periodSeconds }}
118 port: {{ .Values.service.internalPort }}
119 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
120 periodSeconds: {{ .Values.readiness.periodSeconds }}
122 {{ include "common.certInitializer.volumeMount" . | indent 8 }}
123 - name: properties-onapportalsdk
124 mountPath: "{{ .Values.global.env.tomcatDir }}/conf/server.xml"
126 - mountPath: /etc/localtime
129 - name: properties-onapportalsdk
130 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties"
131 subPath: fusion.properties
132 - name: properties-onapportalsdk
133 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/conf/system.properties"
134 subPath: system.properties
135 - name: properties-onapportalsdk
136 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/classes/portal.properties"
137 subPath: portal.properties
138 - name: properties-onapportalsdk
139 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/classes/key.properties"
140 subPath: key.properties
141 - name: properties-onapportalsdk
142 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/classes/music.properties"
143 subPath: music.properties
144 - name: properties-onapportalsdk
145 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/classes/logback.xml"
147 - name: portal-tomcat-logs
148 mountPath: "{{ .Values.global.env.tomcatDir }}/logs"
150 mountPath: /var/log/onap
152 {{ include "common.resources" . }}
153 {{- if .Values.nodeSelector }}
155 {{ toYaml .Values.nodeSelector | indent 10 }}
157 {{- if .Values.affinity }}
159 {{ toYaml .Values.affinity | indent 10 }}
161 - name: filebeat-onap
162 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
163 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
165 - mountPath: /usr/share/filebeat/filebeat.yml
167 subPath: filebeat.yml
168 - name: portal-data-filebeat
169 mountPath: /usr/share/filebeat/data
171 mountPath: /var/log/onap
176 - name: properties-onapportalsdk
179 - name: properties-onapportalsdk-scrubbed
181 name: {{ include "common.fullname" . }}-onapportalsdk
183 - name: filebeat-conf
185 name: portal-filebeat
188 - name: portal-data-filebeat
190 - name: portal-tomcat-logs
192 {{ include "common.certInitializer.volumes" . | indent 8 }}
194 - name: "{{ include "common.namespace" . }}-docker-registry-key"