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 }}
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 - name: {{ include "common.name" . }}-update-config
55 image: "{{ .Values.global.envsubstImage }}"
56 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
61 - "cd /config-input && for PFILE in `find . -not -type d | grep -v -F ..`; do envsubst <${PFILE} >/config-output/${PFILE}; chmod 0755 /config-output/${PFILE}; done"
66 name: {{ include "common.release" . }}-sdc-cs-secrets
67 key: keystore_password
68 - name: TRUSTSTORE_PASS
71 name: {{ include "common.release" . }}-sdc-cs-secrets
72 key: truststore_password
74 - name: {{ include "common.fullname" . }}-environments
75 mountPath: /config-input/
76 - name: sdc-environments-output
77 mountPath: /config-output/
79 - name: {{ include "common.name" . }}
80 image: "{{ include "common.repository" . }}/{{ .Values.image }}"
81 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
82 ports: {{ include "common.containerPorts" . | nindent 10 }}
83 {{ if eq .Values.liveness.enabled true }}
86 path: /sdc2/rest/healthCheck
87 port: {{ .Values.liveness.port }}
88 scheme: {{ if (include "common.needTLS" .) }}HTTPS{{ else }}HTTP{{ end }}
89 initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
90 periodSeconds: {{ .Values.liveness.periodSeconds }}
91 timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
96 - "/var/lib/jetty/ready-probe.sh"
97 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
98 periodSeconds: {{ .Values.readiness.periodSeconds }}
99 timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
100 resources: {{ include "common.resources" . | nindent 12 }}
103 value: {{ .Values.global.env.name }}
105 value: {{ .Values.config.javaOptions }}
106 - name: cassandra_ssl_enabled
107 value: {{ .Values.config.cassandraSslEnabled | quote }}
111 fieldPath: status.podIP
113 - name: sdc-environments-output
114 mountPath: /var/lib/jetty/chef-solo/environments/
116 mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.p12
117 subPath: org.onap.sdc.p12
119 mountPath: /var/lib/jetty/chef-solo/cookbooks/sdc-catalog-be/files/default/org.onap.sdc.trust.jks
120 subPath: org.onap.sdc.trust.jks
121 - name: {{ include "common.fullname" . }}-localtime
122 mountPath: /etc/localtime
124 - name: {{ include "common.fullname" . }}-logs
125 mountPath: /var/log/onap
126 - name: {{ include "common.fullname" . }}-logback
127 mountPath: /tmp/logback.xml
132 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"]
133 # side car containers
134 - name: {{ include "common.name" . }}-filebeat-onap
135 image: "{{ .Values.global.loggingRepository }}/{{ .Values.global.loggingImage }}"
136 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
138 - name: {{ include "common.fullname" . }}-filebeat-conf
139 mountPath: /usr/share/filebeat/filebeat.yml
140 subPath: filebeat.yml
141 - name: {{ include "common.fullname" . }}-logs
142 mountPath: /var/log/onap
143 - name: {{ include "common.fullname" . }}-data-filebeat
144 mountPath: /usr/share/filebeat/data
146 - name: {{ include "common.fullname" . }}-localtime
152 - name: {{ include "common.fullname" . }}-filebeat-conf
154 name: {{ include "common.release" . }}-sdc-filebeat-configmap
155 - name: {{ include "common.fullname" . }}-data-filebeat
157 - name: {{ include "common.fullname" . }}-logback
159 name : {{ include "common.fullname" . }}-logging-configmap
160 - name: {{ include "common.fullname" . }}-environments
162 name: {{ include "common.release" . }}-sdc-environments-configmap
164 - name: sdc-environments-output
165 emptyDir: { medium: "Memory" }
166 - name: {{ include "common.fullname" . }}-logs
169 - name: "{{ include "common.namespace" . }}-docker-registry-key"