2 # Copyright © 2017 Amdocs, AT&T, Bell Canada
3 # Modifications Copyright © 2018 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.
20 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
22 selector: {{- include "common.selectors" . | nindent 4 }}
23 replicas: {{ .Values.replicaCount }}
25 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
27 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
28 - name: {{ include "common.name" . }}-readiness
39 fieldPath: metadata.namespace
40 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
41 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
49 - name: {{ include "common.name" . }}-job-completion
50 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
51 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
56 - {{ include "common.release" . }}-sdc-onboarding-be-cassandra-init
62 fieldPath: metadata.namespace
70 {{- if .Values.global.aafEnabled }}
71 - name: {{ include "common.name" . }}-update-config
72 image: "{{ .Values.global.envsubstImage }}"
73 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
79 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
80 export KEYSTORE_PASS=$cadi_keystore_password_p12
81 export KEYMANAGER_PASS=$cadi_keystore_password_p12
82 export TRUSTSTORE_PASS=$cadi_truststore_password
83 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} /config-output
84 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} /config-output
86 for PFILE in `find . -not -type d | grep -v -F ..`
88 envsubst <${PFILE} >/config-output/${PFILE}
89 chmod 0755 /config-output/${PFILE}
98 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
99 - name: {{ include "common.fullname" . }}-environments
100 mountPath: /config-input/
101 - name: sdc-environments-output
102 mountPath: /config-output/
105 - name: {{ include "common.name" . }}
106 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
107 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
108 {{- if .Values.global.aafEnabled }}
114 sed -i '/trustStorePassword/d' ${JETTY_BASE}/startup.sh
115 ${JETTY_BASE}/startup.sh
117 ports: {{ include "common.containerPorts" . | nindent 10 }}
118 {{ if eq .Values.liveness.enabled true }}
121 path: /sdc2/rest/healthCheck
122 port: {{ .Values.liveness.port }}
123 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
124 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
125 periodSeconds: {{ .Values.liveness.periodSeconds }}
126 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
131 - "/var/lib/jetty/ready-probe.sh"
132 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
133 periodSeconds: {{ .Values.readiness.periodSeconds }}
134 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
135 resources: {{ include "common.resources" . | nindent 12 }}
138 value: {{ .Values.env.name }}
140 value: {{ .Values.config.javaOptions }}
141 - name: cassandra_ssl_enabled
142 value: {{ .Values.config.cassandraSslEnabled | quote }}
146 fieldPath: status.podIP
148 - name: sdc-environments-output
149 mountPath: /var/lib/jetty/chef-solo/environments/
150 - name: sdc-environments-output
151 mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.p12
152 subPath: org.onap.sdc.p12
153 - name: sdc-environments-output
154 mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.trust.jks
155 subPath: org.onap.sdc.trust.jks
156 - name: {{ include "common.fullname" . }}-localtime
157 mountPath: /etc/localtime
159 - name: {{ include "common.fullname" . }}-logs
160 mountPath: /var/log/onap
161 - name: {{ include "common.fullname" . }}-logback
162 mountPath: /tmp/logback.xml
167 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/var/lib/jetty/config/catalog-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
168 # side car containers
169 - name: {{ include "common.name" . }}-filebeat-onap
170 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
171 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
173 - name: {{ include "common.fullname" . }}-filebeat-conf
174 mountPath: /usr/share/filebeat/filebeat.yml
175 subPath: filebeat.yml
176 - name: {{ include "common.fullname" . }}-logs
177 mountPath: /var/log/onap
178 - name: {{ include "common.fullname" . }}-data-filebeat
179 mountPath: /usr/share/filebeat/data
187 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
188 - name: {{ include "common.fullname" . }}-localtime
191 - name: {{ include "common.fullname" . }}-filebeat-conf
193 name: {{ include "common.release" . }}-sdc-filebeat-configmap
194 - name: {{ include "common.fullname" . }}-data-filebeat
196 - name: {{ include "common.fullname" . }}-logback
198 name : {{ include "common.fullname" . }}-logging-configmap
199 - name: {{ include "common.fullname" . }}-environments
201 name: {{ include "common.release" . }}-sdc-environments-configmap
203 - name: sdc-environments-output
204 emptyDir: { medium: "Memory" }
205 - name: {{ include "common.fullname" . }}-logs
208 - name: "{{ include "common.namespace" . }}-docker-registry-key"