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 }}
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-onboarding-be-cassandra-init
53 fieldPath: metadata.namespace
54 {{- if .Values.global.aafEnabled }}
55 - name: {{ include "common.name" . }}-update-config
56 image: "{{ .Values.global.envsubstImage }}"
57 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
63 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
64 export KEYSTORE_PASS=$cadi_keystore_password_p12
65 export KEYMANAGER_PASS=$cadi_keystore_password_p12
66 export TRUSTSTORE_PASS=$cadi_truststore_password
67 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} /config-output
68 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} /config-output
70 for PFILE in `find . -not -type d | grep -v -F ..`
72 envsubst <${PFILE} >/config-output/${PFILE}
73 chmod 0755 /config-output/${PFILE}
75 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
76 - name: {{ include "common.fullname" . }}-environments
77 mountPath: /config-input/
78 - name: sdc-environments-output
79 mountPath: /config-output/
82 - name: {{ include "common.name" . }}
83 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
84 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
85 {{- if .Values.global.aafEnabled }}
91 sed -i '/trustStorePassword/d' ${JETTY_BASE}/startup.sh
92 ${JETTY_BASE}/startup.sh
94 ports: {{ include "common.containerPorts" . | nindent 10 }}
95 {{ if eq .Values.liveness.enabled true }}
98 path: /sdc2/rest/healthCheck
99 port: {{ .Values.liveness.port }}
100 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
101 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
102 periodSeconds: {{ .Values.liveness.periodSeconds }}
103 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
108 - "/var/lib/jetty/ready-probe.sh"
109 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
110 periodSeconds: {{ .Values.readiness.periodSeconds }}
111 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
112 resources: {{ include "common.resources" . | nindent 12 }}
115 value: {{ .Values.env.name }}
117 value: {{ .Values.config.javaOptions }}
118 - name: cassandra_ssl_enabled
119 value: {{ .Values.config.cassandraSslEnabled | quote }}
123 fieldPath: status.podIP
125 - name: sdc-environments-output
126 mountPath: /var/lib/jetty/chef-solo/environments/
127 - name: sdc-environments-output
128 mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.p12
129 subPath: org.onap.sdc.p12
130 - name: sdc-environments-output
131 mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.trust.jks
132 subPath: org.onap.sdc.trust.jks
133 - name: {{ include "common.fullname" . }}-localtime
134 mountPath: /etc/localtime
136 - name: {{ include "common.fullname" . }}-logs
137 mountPath: /var/log/onap
138 - name: {{ include "common.fullname" . }}-logback
139 mountPath: /tmp/logback.xml
144 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"]
145 # side car containers
146 - name: {{ include "common.name" . }}-filebeat-onap
147 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
148 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
150 - name: {{ include "common.fullname" . }}-filebeat-conf
151 mountPath: /usr/share/filebeat/filebeat.yml
152 subPath: filebeat.yml
153 - name: {{ include "common.fullname" . }}-logs
154 mountPath: /var/log/onap
155 - name: {{ include "common.fullname" . }}-data-filebeat
156 mountPath: /usr/share/filebeat/data
157 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
158 - name: {{ include "common.fullname" . }}-localtime
161 - name: {{ include "common.fullname" . }}-filebeat-conf
163 name: {{ include "common.release" . }}-sdc-filebeat-configmap
164 - name: {{ include "common.fullname" . }}-data-filebeat
166 - name: {{ include "common.fullname" . }}-logback
168 name : {{ include "common.fullname" . }}-logging-configmap
169 - name: {{ include "common.fullname" . }}-environments
171 name: {{ include "common.release" . }}-sdc-environments-configmap
173 - name: sdc-environments-output
174 emptyDir: { medium: "Memory" }
175 - name: {{ include "common.fullname" . }}-logs
178 - name: "{{ include "common.namespace" . }}-docker-registry-key"