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
41 fieldPath: metadata.namespace
42 image: {{ include "repositoryGenerator.image.readiness" . }}
43 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
51 - name: {{ include "common.name" . }}-job-completion
52 image: {{ include "repositoryGenerator.image.readiness" . }}
53 imagePullPolicy: "{{ .Values.global.pullPolicy | default .Values.pullPolicy }}"
58 - {{ include "common.release" . }}-sdc-onboarding-be-cassandra-init
64 fieldPath: metadata.namespace
72 {{- if .Values.global.aafEnabled }}
73 - name: {{ include "common.name" . }}-update-config
74 image: {{ include "repositoryGenerator.image.envsubst" . }}
75 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
81 export $(grep '^c' {{ .Values.certInitializer.credsPath }}/mycreds.prop | xargs -0)
82 export KEYSTORE_PASS=$cadi_keystore_password_p12
83 export KEYMANAGER_PASS=$cadi_keystore_password_p12
84 export TRUSTSTORE_PASS=$cadi_truststore_password
85 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.keystoreFile }} /config-output
86 cp {{ .Values.certInitializer.credsPath }}/{{ .Values.certInitializer.truststoreFile }} /config-output
88 for PFILE in `find . -not -type d | grep -v -F ..`
90 envsubst <${PFILE} >/config-output/${PFILE}
91 chmod 0755 /config-output/${PFILE}
100 volumeMounts: {{ include "common.certInitializer.volumeMount" . | nindent 8 }}
101 - name: sdc-environments-input
102 mountPath: /config-input/
103 - name: sdc-environments
104 mountPath: /config-output/
107 - name: {{ include "common.name" . }}
108 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
109 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
110 {{- if .Values.global.aafEnabled }}
116 sed -i '/trustStorePassword/d' ${JETTY_BASE}/startup.sh
117 ${JETTY_BASE}/startup.sh
119 ports: {{ include "common.containerPorts" . | nindent 10 }}
120 {{ if eq .Values.liveness.enabled true }}
123 path: /sdc2/rest/healthCheck
124 port: {{ .Values.service.internalPort }}
125 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
126 periodSeconds: {{ .Values.liveness.periodSeconds }}
127 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
128 successThreshold: {{ .Values.liveness.successThreshold }}
129 failureThreshold: {{ .Values.liveness.failureThreshold }}
133 path: /sdc2/rest/healthCheck
134 port: {{ .Values.service.internalPort }}
135 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
136 periodSeconds: {{ .Values.readiness.periodSeconds }}
137 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
138 successThreshold: {{ .Values.readiness.successThreshold }}
139 failureThreshold: {{ .Values.readiness.failureThreshold }}
140 resources: {{ include "common.resources" . | nindent 12 }}
143 path: /sdc2/rest/healthCheck
144 port: {{ .Values.service.internalPort }}
145 initialDelaySeconds: {{ .Values.startup.initialDelaySeconds }}
146 periodSeconds: {{ .Values.startup.periodSeconds }}
147 timeoutSeconds: {{ .Values.startup.timeoutSeconds }}
148 successThreshold: {{ .Values.startup.successThreshold }}
149 failureThreshold: {{ .Values.startup.failureThreshold }}
150 resources: {{ include "common.resources" . | nindent 12 }}
153 value: {{ .Values.env.name }}
155 value: {{ .Values.config.javaOptions }}
156 - name: cassandra_ssl_enabled
157 value: {{ .Values.config.cassandraSslEnabled | quote }}
161 fieldPath: status.podIP
163 - name: sdc-environments
164 mountPath: /app/jetty/chef-solo/environments/
165 {{- if .Values.global.aafEnabled }}
166 - name: sdc-environments
167 mountPath: /app/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.p12
168 subPath: org.onap.sdc.p12
169 - name: sdc-environments
170 mountPath: /app/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.trust.jks
171 subPath: org.onap.sdc.trust.jks
174 mountPath: /etc/localtime
177 mountPath: /var/log/onap
179 mountPath: /tmp/logback.xml
184 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"]
185 # side car containers
186 {{ include "common.log.sidecar" . | nindent 8 }}
187 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
188 volumes: {{ include "common.certInitializer.volumes" . | nindent 6 }}
192 {{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
195 name : {{ include "common.fullname" . }}-logging-configmap
196 - name: sdc-environments
197 {{- if .Values.global.aafEnabled }}
198 emptyDir: { medium: "Memory" }
199 - name: sdc-environments-input
202 name: {{ include "common.release" . }}-sdc-environments-configmap
207 - name: "{{ include "common.namespace" . }}-docker-registry-key"