2 # Copyright © 2017 Amdocs, Bell Canada
3 # Modifications Copyright © 2018 AT&T, ZTE
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" . }}
39 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
40 - name: {{ include "common.name" . }}-job-completion
41 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
42 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
47 - {{ include "common.release" . }}-sdc-be-config-backend
55 fieldPath: metadata.namespace
63 {{- if .Values.global.aafEnabled }}
64 - name: {{ include "common.name" . }}-update-config
65 image: "{{ .Values.global.envsubstImage }}"
66 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
72 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
73 export KEYSTORE_PASS=$cadi_keystore_password_p12
74 export KEYMANAGER_PASS=$cadi_keystore_password_p12
75 export TRUSTSTORE_PASS=$cadi_truststore_password
76 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} /config-output
77 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} /config-output
79 for PFILE in `find . -not -type d | grep -v -F ..`
81 envsubst <${PFILE} >/config-output/${PFILE}
82 chmod 0755 /config-output/${PFILE}
84 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
85 - name: {{ include "common.fullname" . }}-environments
86 mountPath: /config-input/
87 - name: sdc-environments-output
88 mountPath: /config-output/
98 - name: {{ include "common.name" . }}
99 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
100 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
101 {{- if .Values.global.aafEnabled }}
107 sed -i '/trustStorePassword/d' ${JETTY_BASE}/startup.sh
108 ${JETTY_BASE}/startup.sh
111 - containerPort: {{ .Values.service.internalPort }}
112 - containerPort: {{ .Values.service.internalPort2 }}
113 {{ if eq .Values.liveness.enabled true }}
116 port: {{ .Values.service.internalPort2 }}
117 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
118 periodSeconds: {{ .Values.liveness.periodSeconds }}
119 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
123 port: {{ .Values.service.internalPort2 }}
124 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
125 periodSeconds: {{ .Values.readiness.periodSeconds }}
126 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
127 resources: {{ include "common.resources" . | nindent 12 }}
130 value: {{ .Values.env.name }}
134 fieldPath: status.podIP
136 value: {{ .Values.config.javaOptions }}
138 - name: sdc-environments-output
139 mountPath: /var/lib/jetty/chef-solo/environments/
140 - name: sdc-environments-output
141 mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-fe/files/default/org.onap.sdc.p12
142 subPath: org.onap.sdc.p12
143 - name: sdc-environments-output
144 mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-fe/files/default/org.onap.sdc.trust.jks
145 subPath: org.onap.sdc.trust.jks
146 - name: {{ include "common.fullname" . }}-localtime
147 mountPath: /etc/localtime
149 - name: {{ include "common.fullname" . }}-logs
150 mountPath: /var/log/onap
151 - name: {{ include "common.fullname" . }}-configs
152 mountPath: /var/lib/jetty/config/catalog-fe/plugins-configuration.yaml
153 subPath: plugins-configuration.yaml
154 - name: {{ include "common.fullname" . }}-logback
155 mountPath: /tmp/logback.xml
160 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
161 # side car containers
162 - name: {{ include "common.name" . }}-filebeat-onap
163 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
164 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
166 - name: {{ include "common.fullname" . }}-filebeat-conf
167 mountPath: /usr/share/filebeat/filebeat.yml
168 subPath: filebeat.yml
169 - name: {{ include "common.fullname" . }}-logs
170 mountPath: /var/log/onap
171 - name: {{ include "common.fullname" . }}-data-filebeat
172 mountPath: /usr/share/filebeat/data
180 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
181 - name: {{ include "common.fullname" . }}-localtime
184 - name: {{ include "common.fullname" . }}-filebeat-conf
186 name: {{ include "common.release" . }}-sdc-filebeat-configmap
187 - name: {{ include "common.fullname" . }}-data-filebeat
189 - name: {{ include "common.fullname" . }}-configs
191 name : {{ include "common.fullname" . }}-plugins-configmap
193 - name: {{ include "common.fullname" . }}-logback
195 name : {{ include "common.fullname" . }}-logging-configmap
196 - name: {{ include "common.fullname" . }}-environments
198 name: {{ include "common.release" . }}-sdc-environments-configmap
200 - name: sdc-environments-output
201 emptyDir: { medium: "Memory" }
202 - name: {{ include "common.fullname" . }}-logs
205 - name: "{{ include "common.namespace" . }}-docker-registry-key"