1 # Copyright © 2018 Amdocs, AT&T, Bell Canada
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
18 name: {{ include "common.fullname" . }}
19 namespace: {{ include "common.namespace" . }}
21 app: {{ include "common.name" . }}
22 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
23 release: {{ include "common.release" . }}
24 heritage: {{ .Release.Service }}
28 app: {{ include "common.name" . }}
29 replicas: {{ .Values.replicaCount }}
33 app: {{ include "common.name" . }}
34 release: {{ include "common.release" . }}
36 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
37 - name: {{ include "common.name" . }}-readiness
48 fieldPath: metadata.namespace
49 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
50 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 - name: {{ include "common.name" . }}-job-completion
52 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
53 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
58 - {{ include "common.release" . }}-sdc-be-config-backend
64 fieldPath: metadata.namespace
65 {{- if .Values.global.aafEnabled }}
66 - name: {{ include "common.name" . }}-update-config
67 image: "{{ .Values.global.envsubstImage }}"
68 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
74 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
75 export KEYSTORE_PASS=$cadi_keystore_password_p12
76 export KEYMANAGER_PASS=$cadi_keystore_password_p12
77 export TRUSTSTORE_PASS=$cadi_truststore_password
78 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} /config-output
79 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} /config-output
81 for PFILE in `find . -not -type d | grep -v -F ..`
83 envsubst <${PFILE} >/config-output/${PFILE}
84 chmod 0755 /config-output/${PFILE}
86 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
87 - name: {{ include "common.fullname" . }}-environments
88 mountPath: /config-input/
89 - name: sdc-environments-output
90 mountPath: /config-output/
93 - name: {{ include "common.name" . }}
94 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
95 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
96 {{- if .Values.global.aafEnabled }}
102 sed -i '/trustStorePassword/d' ${JETTY_BASE}/startup.sh
103 ${JETTY_BASE}/startup.sh
106 - containerPort: {{ .Values.service.internalPort }}
107 - containerPort: {{ .Values.service.internalPort2 }}
108 {{ if eq .Values.liveness.enabled true }}
111 port: {{ .Values.service.internalPort2 }}
112 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
113 periodSeconds: {{ .Values.liveness.periodSeconds }}
117 path: /dcae/conf/composition
118 port: {{ .Values.service.internalPort2 }}
120 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
121 periodSeconds: {{ .Values.readiness.periodSeconds }}
124 value: {{ .Values.env.name }}
126 value: {{ .Values.config.javaOptions }}
130 fieldPath: status.podIP
132 - name: sdc-environments-output
133 mountPath: /var/lib/jetty/chef-solo/environments/
134 - name: sdc-environments-output
135 mountPath: /var/lib/jetty/chef-solo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.p12
136 subPath: org.onap.sdc.p12
137 - name: sdc-environments-output
138 mountPath: /var/lib/jetty/chef-solo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.trust.jks
139 subPath: org.onap.sdc.trust.jks
140 - name: {{ include "common.fullname" . }}-localtime
141 mountPath: /etc/localtime
143 - name: {{ include "common.fullname" . }}-logs
144 mountPath: /var/lib/jetty/logs
145 - name: {{ include "common.fullname" . }}-logback
146 mountPath: /tmp/logback.xml
151 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/dcae-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
153 {{ include "common.resources" . | indent 12 }}
154 {{- if .Values.nodeSelector }}
156 {{ toYaml .Values.nodeSelector | indent 10 }}
158 {{- if .Values.affinity }}
160 {{ toYaml .Values.affinity | indent 10 }}
163 # side car containers
164 - name: {{ include "common.name" . }}-filebeat-onap
165 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
166 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
168 - name: {{ include "common.fullname" . }}-filebeat-conf
169 mountPath: /usr/share/filebeat/filebeat.yml
170 subPath: filebeat.yml
171 - name: {{ include "common.fullname" . }}-logs
172 mountPath: /var/log/onap
173 - name: {{ include "common.fullname" . }}-data-filebeat
174 mountPath: /usr/share/filebeat/data
175 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
176 - name: {{ include "common.fullname" . }}-localtime
179 - name: {{ include "common.fullname" . }}-filebeat-conf
181 name: {{ include "common.release" . }}-sdc-filebeat-configmap
182 - name: {{ include "common.fullname" . }}-data-filebeat
184 - name: {{ include "common.fullname" . }}-logback
186 name : {{ include "common.fullname" . }}-logging-configmap
187 - name: {{ include "common.fullname" . }}-environments
189 name: {{ include "common.release" . }}-sdc-environments-configmap
191 - name: sdc-environments-output
192 emptyDir: { medium: "Memory" }
193 - name: {{ include "common.fullname" . }}-logs
196 - name: "{{ include "common.namespace" . }}-docker-registry-key"