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 }}
56 args: [ "-c", "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"]
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-cass" "key" "login") | indent 12 }}
60 - name: CASSA_PASSWORD
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-cass" "key" "password") | indent 12 }}
62 - name: CIPHER_ENC_KEY
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cipher-enc-key" "key" "password") | indent 12 }}
64 - name: PORTAL_DB_USER
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-backend-db" "key" "login") | indent 12 }}
66 - name: PORTAL_DB_PASSWORD
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "portal-backend-db" "key" "password") | indent 12 }}
69 - mountPath: /config-input
70 name: properties-onapportalsdk-scrubbed
72 name: properties-onapportalsdk
73 {{ include "common.certInitializer.initContainer" . | indent 6 }}
75 - name: {{ include "common.name" . }}
76 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
77 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
78 command: ["bash","-c"]
79 {{- if .Values.global.aafEnabled }}
80 args: ["export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0);\
81 export _JAVA_OPTIONS=\"-Djavax.net.ssl.trustStorePassword=$cadi_truststore_password \
82 -Djavax.net.ssl.keyStorePassword=$cadi_keystore_password_p12\";\
83 /start-apache-tomcat.sh -b {{ .Values.global.env.tomcatDir }}"]
87 -Djavax.net.ssl.keyStore="{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }}"
88 -Djavax.net.ssl.trustStore="{{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }}"
90 args: ["/start-apache-tomcat.sh -b {{ .Values.global.env.tomcatDir }}"]
93 - containerPort: {{ .Values.service.internalPort }}
94 {{- if eq .Values.liveness.enabled true }}
97 port: {{ .Values.service.internalPort }}
98 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
99 periodSeconds: {{ .Values.liveness.periodSeconds }}
103 port: {{ .Values.service.internalPort }}
104 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
105 periodSeconds: {{ .Values.readiness.periodSeconds }}
107 {{ include "common.certInitializer.volumeMount" . | indent 8 }}
108 - name: properties-onapportalsdk
109 mountPath: "{{ .Values.global.env.tomcatDir }}/conf/server.xml"
111 - mountPath: /etc/localtime
114 - name: properties-onapportalsdk
115 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/fusion/conf/fusion.properties"
116 subPath: fusion.properties
117 - name: properties-onapportalsdk
118 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/conf/system.properties"
119 subPath: system.properties
120 - name: properties-onapportalsdk
121 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/classes/portal.properties"
122 subPath: portal.properties
123 - name: properties-onapportalsdk
124 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTAL/WEB-INF/classes/key.properties"
125 subPath: key.properties
126 - name: properties-onapportalsdk
127 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/classes/music.properties"
128 subPath: music.properties
129 - name: properties-onapportalsdk
130 mountPath: "{{ .Values.global.env.tomcatDir }}/webapps/ONAPPORTALSDK/WEB-INF/classes/logback.xml"
132 - name: portal-tomcat-logs
133 mountPath: "{{ .Values.global.env.tomcatDir }}/logs"
135 mountPath: /var/log/onap
137 {{ include "common.resources" . }}
138 {{- if .Values.nodeSelector }}
140 {{ toYaml .Values.nodeSelector | indent 10 }}
142 {{- if .Values.affinity }}
144 {{ toYaml .Values.affinity | indent 10 }}
146 - name: filebeat-onap
147 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
148 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
150 - mountPath: /usr/share/filebeat/filebeat.yml
152 subPath: filebeat.yml
153 - name: portal-data-filebeat
154 mountPath: /usr/share/filebeat/data
156 mountPath: /var/log/onap
161 - name: properties-onapportalsdk
164 - name: properties-onapportalsdk-scrubbed
166 name: {{ include "common.fullname" . }}-onapportalsdk
168 - name: filebeat-conf
170 name: portal-filebeat
173 - name: portal-data-filebeat
175 - name: portal-tomcat-logs
177 {{ include "common.certInitializer.volumes" . | indent 8 }}
179 - name: "{{ include "common.namespace" . }}-docker-registry-key"