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
34 {{- if not .Values.global.kafka.useKafka }}
43 fieldPath: metadata.namespace
44 image: {{ include "repositoryGenerator.image.readiness" . }}
45 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
53 - name: {{ include "common.name" . }}-job-completion
54 image: {{ include "repositoryGenerator.image.readiness" . }}
55 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
60 - {{ include "common.release" . }}-sdc-onboarding-be-cassandra-init
66 fieldPath: metadata.namespace
74 {{- if .Values.global.aafEnabled }}
75 - name: {{ include "common.name" . }}-update-config
76 image: {{ include "repositoryGenerator.image.envsubst" . }}
77 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
83 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
84 export KEYSTORE_PASS=$cadi_keystore_password_p12
85 export KEYMANAGER_PASS=$cadi_keystore_password_p12
86 export TRUSTSTORE_PASS=$cadi_truststore_password
87 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} /config-output
88 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} /config-output
90 for PFILE in `find . -not -type d | grep -v -F ..`
92 envsubst <${PFILE} >/config-output/${PFILE}
93 chmod 0755 /config-output/${PFILE}
102 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
103 - name: sdc-environments-input
104 mountPath: /config-input/
105 - name: sdc-environments
106 mountPath: /config-output/
109 - name: {{ include "common.name" . }}
110 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
111 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
112 {{- if .Values.global.aafEnabled }}
118 sed -i '/trustStorePassword/d' ${JETTY_BASE}/startup.sh
119 ${JETTY_BASE}/startup.sh
121 ports: {{ include "common.containerPorts" . | nindent 10 }}
122 {{ if eq .Values.liveness.enabled true }}
125 path: /sdc2/rest/healthCheck
126 port: {{ .Values.service.internalPort }}
127 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
128 periodSeconds: {{ .Values.liveness.periodSeconds }}
129 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
130 successThreshold: {{ .Values.liveness.successThreshold }}
131 failureThreshold: {{ .Values.liveness.failureThreshold }}
135 path: /sdc2/rest/healthCheck
136 port: {{ .Values.service.internalPort }}
137 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
138 periodSeconds: {{ .Values.readiness.periodSeconds }}
139 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
140 successThreshold: {{ .Values.readiness.successThreshold }}
141 failureThreshold: {{ .Values.readiness.failureThreshold }}
142 resources: {{ include "common.resources" . | nindent 12 }}
145 path: /sdc2/rest/healthCheck
146 port: {{ .Values.service.internalPort }}
147 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
148 periodSeconds: {{ .Values.startup.periodSeconds }}
149 timeoutSeconds: {{ .Values.startup.timeoutSeconds }}
150 successThreshold: {{ .Values.startup.successThreshold }}
151 failureThreshold: {{ .Values.startup.failureThreshold }}
152 resources: {{ include "common.resources" . | nindent 12 }}
155 value: {{ .Values.env.name }}
157 value: {{ .Values.config.javaOptions }}
158 - name: cassandra_ssl_enabled
159 value: {{ .Values.config.cassandraSslEnabled | quote }}
163 fieldPath: status.podIP
164 {{- if .Values.global.kafka.useKafka }}
165 - name: SASL_JAAS_CONFIG
166 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "sdc-be-kafka-secret" "key" "sasl.jaas.config") | indent 12 }}
168 value: {{ .Values.global.kafka.useKafka | quote }}
171 - name: sdc-environments
172 mountPath: /app/jetty/chef-solo/environments/
173 {{- if .Values.global.aafEnabled }}
174 - name: sdc-environments
175 mountPath: /app/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.p12
176 subPath: org.onap.sdc.p12
177 - name: sdc-environments
178 mountPath: /app/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.trust.jks
179 subPath: org.onap.sdc.trust.jks
182 mountPath: /etc/localtime
185 mountPath: /var/log/onap
187 mountPath: /tmp/logback.xml
192 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/app/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"]
193 # side car containers
194 {{ include "common.log.sidecar" . | nindent 8 }}
195 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
196 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
200 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
203 name : {{ include "common.fullname" . }}-logging-configmap
204 - name: sdc-environments
205 {{- if .Values.global.aafEnabled }}
206 emptyDir: { medium: "Memory" }
207 - name: sdc-environments-input
210 name: {{ include "common.release" . }}-sdc-environments-configmap
215 - name: "{{ include "common.namespace" . }}-docker-registry-key"