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.
21 name: {{ include "common.fullname" . }}
22 namespace: {{ include "common.namespace" . }}
24 app: {{ include "common.name" . }}
25 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
26 release: {{ include "common.release" . }}
27 heritage: {{ .Release.Service }}
31 app: {{ include "common.name" . }}
32 replicas: {{ .Values.replicaCount }}
36 app: {{ include "common.name" . }}
37 release: {{ include "common.release" . }}
39 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
40 - name: {{ include "common.name" . }}-job-completion
41 image: {{ include "repositoryGenerator.image.readiness" . }}
42 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
47 - {{ include "common.release" . }}-sdc-onboarding-be-cassandra-init
53 fieldPath: metadata.namespace
61 {{- if .Values.global.aafEnabled }}
62 - name: {{ include "common.name" . }}-update-config
63 image: {{ include "repositoryGenerator.image.envsubst" . }}
64 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
70 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
71 export KEYSTORE_PASS=$cadi_keystore_password_p12
72 export KEYMANAGER_PASS=$cadi_keystore_password_p12
73 export TRUSTSTORE_PASS=$cadi_truststore_password
74 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} /config-output
75 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} /config-output
77 for PFILE in `find . -not -type d | grep -v -F ..`
79 envsubst <${PFILE} >/config-output/${PFILE}
80 chmod 0755 /config-output/${PFILE}
82 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
83 - name: {{ include "common.fullname" . }}-environments
84 mountPath: /config-input/
85 - name: sdc-environments-output
86 mountPath: /config-output/
95 - name: volume-permissions
96 image: {{ include "repositoryGenerator.image.busybox" . }}
97 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
103 chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} //onboard/cert
107 - name: {{ include "common.fullname" . }}-cert-storage
108 mountPath: "/onboard/cert"
117 - name: {{ include "common.name" . }}
118 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
119 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
121 - containerPort: {{ .Values.service.internalPort }}
122 - containerPort: {{ .Values.service.internalPort2 }}
123 {{ if eq .Values.liveness.enabled true }}
126 path: /onboarding-api/v1.0/healthcheck
127 port: {{ .Values.service.internalPort2 }}
128 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
129 periodSeconds: {{ .Values.liveness.periodSeconds }}
130 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
131 successThreshold: {{ .Values.liveness.successThreshold }}
132 failureThreshold: {{ .Values.liveness.failureThreshold }}
136 path: /onboarding-api/v1.0/healthcheck
137 port: {{ .Values.service.internalPort2 }}
138 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
139 periodSeconds: {{ .Values.readiness.periodSeconds }}
140 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
141 successThreshold: {{ .Values.readiness.successThreshold }}
142 failureThreshold: {{ .Values.readiness.failureThreshold }}
145 path: /onboarding-api/v1.0/healthcheck
146 port: {{ .Values.service.internalPort2 }}
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: SDC_CLUSTER_NAME
159 value: "SDC-CS-{{ .Values.env.name }}"
160 - name: cassandra_ssl_enabled
161 value: {{ .Values.config.cassandraSslEnabled | quote }}
165 fieldPath: status.podIP
168 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_user}
171 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_password}
173 value: {{ .Values.cert.certDir }}
175 - name: sdc-environments-output
176 mountPath: /app/jetty/chef-solo/environments/
177 - name: sdc-environments-output
178 mountPath: /app/jetty/chef-solo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.p12
179 subPath: org.onap.sdc.p12
180 - name: sdc-environments-output
181 mountPath: /app/jetty/chef-solo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.trust.jks
182 subPath: org.onap.sdc.trust.jks
183 - name: {{ include "common.fullname" . }}-localtime
184 mountPath: /etc/localtime
187 mountPath: /var/log/onap
188 - name: {{ include "common.fullname" . }}-cert-storage
189 mountPath: "{{ .Values.cert.certDir }}"
190 - name: {{ include "common.fullname" . }}-logback
191 mountPath: /tmp/logback.xml
196 command: ["/bin/sh", "-c", "export LOG=wait_logback.log; touch $LOG; export SRC=/tmp/logback.xml; export DST=/app/jetty/config/onboarding-be/; while [ ! -e $DST ]; do echo 'Waiting for $DST...' >> $LOG; sleep 5; done; sleep 2; /bin/cp -f $SRC $DST; echo 'Done' >> $LOG"]
197 # side car containers
198 {{ include "common.log.sidecar" . | nindent 8 }}
199 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
200 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
201 - name: {{ include "common.fullname" . }}-localtime
204 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
205 - name: {{ include "common.fullname" . }}-logback
207 name : {{ include "common.fullname" . }}-logging-configmap
208 - name: {{ include "common.fullname" . }}-environments
210 name: {{ include "common.release" . }}-sdc-environments-configmap
212 - name: sdc-environments-output
213 emptyDir: { medium: "Memory" }
216 - name: {{ include "common.fullname" . }}-cert-storage
217 persistentVolumeClaim:
218 claimName: {{ include "common.fullname" . }}-cert
220 - name: "{{ include "common.namespace" . }}-docker-registry-key"