2 # Copyright © 2017 Amdocs, AT&T, Bell Canada
3 # Modifications Copyright © 2018 ZTE
4 # Modifications Copyright © 2021 Orange
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
22 name: {{ include "common.fullname" . }}
23 namespace: {{ include "common.namespace" . }}
25 app: {{ include "common.name" . }}
26 chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
27 release: {{ include "common.release" . }}
28 heritage: {{ .Release.Service }}
32 app: {{ include "common.name" . }}
33 replicas: {{ .Values.replicaCount }}
37 app: {{ include "common.name" . }}
38 release: {{ include "common.release" . }}
40 initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
41 - name: {{ include "common.name" . }}-job-completion
42 image: {{ include "repositoryGenerator.image.readiness" . }}
43 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
48 - {{ include "common.release" . }}-sdc-onboarding-be-cassandra-init
54 fieldPath: metadata.namespace
62 {{- if .Values.global.aafEnabled }}
63 - name: {{ include "common.name" . }}-update-config
64 image: {{ include "repositoryGenerator.image.envsubst" . }}
65 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
71 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
72 export KEYSTORE_PASS=$cadi_keystore_password_p12
73 export KEYMANAGER_PASS=$cadi_keystore_password_p12
74 export TRUSTSTORE_PASS=$cadi_truststore_password
75 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} /config-output
76 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} /config-output
78 for PFILE in `find . -not -type d | grep -v -F ..`
80 envsubst <${PFILE} >/config-output/${PFILE}
81 chmod 0755 /config-output/${PFILE}
83 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 10 }}
84 - name: sdc-environments-input
85 mountPath: /config-input/
86 - name: sdc-environments
87 mountPath: /config-output/
96 - name: volume-permissions
97 image: {{ include "repositoryGenerator.image.busybox" . }}
98 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
104 chown -R {{ .Values.securityContext.runAsUser }}:{{ .Values.securityContext.fsGroup }} //onboard/cert
109 mountPath: "/onboard/cert"
118 - name: {{ include "common.name" . }}
119 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
120 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
122 - containerPort: {{ .Values.service.internalPort }}
123 - containerPort: {{ .Values.service.internalPort2 }}
124 {{ if eq .Values.liveness.enabled true }}
127 path: /onboarding-api/v1.0/healthcheck
128 port: {{ .Values.service.internalPort2 }}
129 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
130 periodSeconds: {{ .Values.liveness.periodSeconds }}
131 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
132 successThreshold: {{ .Values.liveness.successThreshold }}
133 failureThreshold: {{ .Values.liveness.failureThreshold }}
137 path: /onboarding-api/v1.0/healthcheck
138 port: {{ .Values.service.internalPort2 }}
139 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
140 periodSeconds: {{ .Values.readiness.periodSeconds }}
141 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
142 successThreshold: {{ .Values.readiness.successThreshold }}
143 failureThreshold: {{ .Values.readiness.failureThreshold }}
146 path: /onboarding-api/v1.0/healthcheck
147 port: {{ .Values.service.internalPort2 }}
148 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
149 periodSeconds: {{ .Values.startup.periodSeconds }}
150 timeoutSeconds: {{ .Values.startup.timeoutSeconds }}
151 successThreshold: {{ .Values.startup.successThreshold }}
152 failureThreshold: {{ .Values.startup.failureThreshold }}
153 resources: {{ include "common.resources" . | nindent 12 }}
156 value: {{ .Values.env.name }}
158 value: {{ .Values.config.javaOptions }}
159 - name: SDC_CLUSTER_NAME
160 value: "SDC-CS-{{ .Values.env.name }}"
161 - name: cassandra_ssl_enabled
162 value: {{ .Values.config.cassandraSslEnabled | quote }}
166 fieldPath: status.podIP
169 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_user}
172 secretKeyRef: {name: {{ include "common.release" . }}-sdc-cs-secrets, key: sdc_password}
174 value: {{ .Values.cert.certDir }}
176 - name: sdc-environments
177 mountPath: /app/jetty/chef-solo/environments/
178 {{- if .Values.global.aafEnabled }}
179 - name: sdc-environments
180 mountPath: /app/jetty/chef-solo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.p12
181 subPath: org.onap.sdc.p12
182 - name: sdc-environments
183 mountPath: /app/jetty/chef-solo/cookbooks/sdc-onboard-backend/files/default/org.onap.sdc.trust.jks
184 subPath: org.onap.sdc.trust.jks
187 mountPath: /etc/localtime
190 mountPath: /var/log/onap
192 mountPath: "{{ .Values.cert.certDir }}"
194 mountPath: /tmp/logback.xml
199 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"]
200 # side car containers
201 {{ include "common.log.sidecar" . | nindent 8 }}
202 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
203 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
208 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
211 name : {{ include "common.fullname" . }}-logging-configmap
212 - name: sdc-environments
213 {{- if .Values.global.aafEnabled }}
214 emptyDir: { medium: "Memory" }
215 - name: sdc-environments-input
218 name: {{ include "common.release" . }}-sdc-environments-configmap
223 persistentVolumeClaim:
224 claimName: {{ include "common.fullname" . }}-cert
226 - name: "{{ include "common.namespace" . }}-docker-registry-key"