1 # Copyright © 2017 Amdocs, AT&T, Bell Canada
2 # Modifications Copyright © 2018 ZTE
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.
18 metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
20 selector: {{- include "common.selectors" . | nindent 4 }}
21 replicas: {{ .Values.replicaCount }}
23 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
25 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
26 - name: {{ include "common.name" . }}-readiness
37 fieldPath: metadata.namespace
38 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
39 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
47 - name: {{ include "common.name" . }}-job-completion
48 image: "{{ include "common.repository" . }}/{{ .Values.global.readinessImage }}"
49 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
54 - {{ include "common.release" . }}-sdc-onboarding-be-cassandra-init
60 fieldPath: metadata.namespace
68 {{- if .Values.global.aafEnabled }}
69 - name: {{ include "common.name" . }}-update-config
70 image: "{{ .Values.global.envsubstImage }}"
71 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
78 export KEYSTORE_PASS=$cadi_keystore_password_p12
79 export KEYMANAGER_PASS=$cadi_keystore_password_p12
80 export TRUSTSTORE_PASS=$cadi_truststore_password
81 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} /config-output
82 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} /config-output
84 for PFILE in `find . -not -type d | grep -v -F ..`
86 envsubst <${PFILE} >/config-output/${PFILE}
87 chmod 0755 /config-output/${PFILE}
96 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
97 - name: {{ include "common.fullname" . }}-environments
98 mountPath: /config-input/
99 - name: sdc-environments-output
100 mountPath: /config-output/
103 - name: {{ include "common.name" . }}
104 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
105 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
106 {{- if .Values.global.aafEnabled }}
112 sed -i '/trustStorePassword/d' ${JETTY_BASE}/startup.sh
113 ${JETTY_BASE}/startup.sh
115 ports: {{ include "common.containerPorts" . | nindent 10 }}
116 {{ if eq .Values.liveness.enabled true }}
119 path: /sdc2/rest/healthCheck
120 port: {{ .Values.liveness.port }}
121 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
122 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
123 periodSeconds: {{ .Values.liveness.periodSeconds }}
124 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
129 - "/var/lib/jetty/ready-probe.sh"
130 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
131 periodSeconds: {{ .Values.readiness.periodSeconds }}
132 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
133 resources: {{ include "common.resources" . | nindent 12 }}
136 value: {{ .Values.env.name }}
138 value: {{ .Values.config.javaOptions }}
139 - name: cassandra_ssl_enabled
140 value: {{ .Values.config.cassandraSslEnabled | quote }}
144 fieldPath: status.podIP
146 - name: sdc-environments-output
147 mountPath: /var/lib/jetty/chef-solo/environments/
148 - name: sdc-environments-output
149 mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.p12
150 subPath: org.onap.sdc.p12
151 - name: sdc-environments-output
152 mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.trust.jks
153 subPath: org.onap.sdc.trust.jks
154 - name: {{ include "common.fullname" . }}-localtime
155 mountPath: /etc/localtime
157 - name: {{ include "common.fullname" . }}-logs
158 mountPath: /var/log/onap
159 - name: {{ include "common.fullname" . }}-logback
160 mountPath: /tmp/logback.xml
165 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"]
166 # side car containers
167 - name: {{ include "common.name" . }}-filebeat-onap
168 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
169 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
171 - name: {{ include "common.fullname" . }}-filebeat-conf
172 mountPath: /usr/share/filebeat/filebeat.yml
173 subPath: filebeat.yml
174 - name: {{ include "common.fullname" . }}-logs
175 mountPath: /var/log/onap
176 - name: {{ include "common.fullname" . }}-data-filebeat
177 mountPath: /usr/share/filebeat/data
185 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
186 - name: {{ include "common.fullname" . }}-localtime
189 - name: {{ include "common.fullname" . }}-filebeat-conf
191 name: {{ include "common.release" . }}-sdc-filebeat-configmap
192 - name: {{ include "common.fullname" . }}-data-filebeat
194 - name: {{ include "common.fullname" . }}-logback
196 name : {{ include "common.fullname" . }}-logging-configmap
197 - name: {{ include "common.fullname" . }}-environments
199 name: {{ include "common.release" . }}-sdc-environments-configmap
201 - name: sdc-environments-output
202 emptyDir: { medium: "Memory" }
203 - name: {{ include "common.fullname" . }}-logs
206 - name: "{{ include "common.namespace" . }}-docker-registry-key"