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-dcae-be-tools
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 }}
97 - containerPort: {{ .Values.service.internalPort }}
98 {{ if eq .Values.liveness.enabled true }}
101 port: {{ .Values.service.internalPort }}
102 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
103 periodSeconds: {{ .Values.liveness.periodSeconds }}
107 path: /dcaed/healthCheck
108 port: {{ .Values.service.internalPort }}
110 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
111 periodSeconds: {{ .Values.readiness.periodSeconds }}
114 value: {{ .Values.env.name }}
116 value: {{ .Values.config.javaOptions }}
120 fieldPath: status.podIP
122 - name: sdc-environments-output
123 mountPath: /var/lib/jetty/chef-solo/environments/
124 - name: sdc-environments-output
125 mountPath: /var/lib/jetty/chef-solo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.p12
126 subPath: org.onap.sdc.p12
127 - name: sdc-environments-output
128 mountPath: /var/lib/jetty/chef-solo/cookbooks/Deploy-DCAE/files/default/org.onap.sdc.trust.jks
129 subPath: org.onap.sdc.trust.jks
130 - name: {{ include "common.fullname" . }}-localtime
131 mountPath: /etc/localtime
133 - name: {{ include "common.fullname" . }}-logs
134 mountPath: /var/lib/jetty/logs
135 - name: {{ include "common.fullname" . }}-logback
136 mountPath: /tmp/logback.xml
141 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/dcae-fe/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
143 {{ include "common.resources" . | indent 12 }}
144 {{- if .Values.nodeSelector }}
146 {{ toYaml .Values.nodeSelector | indent 10 }}
148 {{- if .Values.affinity }}
150 {{ toYaml .Values.affinity | indent 10 }}
153 # side car containers
154 - name: {{ include "common.name" . }}-filebeat-onap
155 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
156 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
158 - name: {{ include "common.fullname" . }}-filebeat-conf
159 mountPath: /usr/share/filebeat/filebeat.yml
160 subPath: filebeat.yml
161 - name: {{ include "common.fullname" . }}-logs
162 mountPath: /var/log/onap
163 - name: {{ include "common.fullname" . }}-data-filebeat
164 mountPath: /usr/share/filebeat/data
165 volumes: {{ include "common.certInitializer.volumes" . | nindent 8 }}
166 - name: {{ include "common.fullname" . }}-localtime
169 - name: {{ include "common.fullname" . }}-filebeat-conf
171 name: {{ include "common.release" . }}-sdc-filebeat-configmap
172 - name: {{ include "common.fullname" . }}-data-filebeat
174 - name: {{ include "common.fullname" . }}-logback
176 name : {{ include "common.fullname" . }}-logging-configmap
177 - name: {{ include "common.fullname" . }}-environments
179 name: {{ include "common.release" . }}-sdc-environments-configmap
181 - name: sdc-environments-output
182 emptyDir: { medium: "Memory" }
183 - name: {{ include "common.fullname" . }}-logs
186 - name: "{{ include "common.namespace" . }}-docker-registry-key"