blob: 63b56f87a92403597141926ce810aea982a448ea [file] [log] [blame]
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +01001{{/*
egernug27578332020-03-26 10:27:55 +00002# Copyright © 2020 Samsung Electronics
jmac065e2ce2018-03-29 01:18:02 +00003# Copyright © 2017 Amdocs, Bell Canada
4#
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
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
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.
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010016*/}}
jmac065e2ce2018-03-29 01:18:02 +000017
Grzegorz-Lis1318a772020-07-23 15:08:43 +020018apiVersion: apps/v1
jmac065e2ce2018-03-29 01:18:02 +000019kind: StatefulSet
Alexander Dehn9b797d62020-04-21 09:53:50 +000020metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
jmac065e2ce2018-03-29 01:18:02 +000021spec:
Grzegorz-Lis1318a772020-07-23 15:08:43 +020022 selector:
23 matchLabels:
24 app: {{ include "common.name" . }}
BorislavG1ffbd992018-04-24 07:56:27 +000025 serviceName: {{ include "common.servicename" . }}-cluster
jmac065e2ce2018-03-29 01:18:02 +000026 replicas: {{ .Values.replicaCount }}
Alexander Dehn9b797d62020-04-21 09:53:50 +000027 selector: {{- include "common.selectors" . | nindent 4 }}
jmac065e2ce2018-03-29 01:18:02 +000028 podManagementPolicy: Parallel
29 template:
Alexander Dehn9b797d62020-04-21 09:53:50 +000030 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
jmac065e2ce2018-03-29 01:18:02 +000031 spec:
32 initContainers:
33 - command:
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010034 - sh
35 args:
36 - -c
37 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
38 env:
39 - name: AAI_CLIENT_NAME
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010040 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010041 - name: AAI_CLIENT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010042 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010043 - name: MODELSERVICE_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010044 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010045 - name: MODELSERVICE_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010046 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010047 - name: RESTCONF_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010048 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010049 - name: RESTCONF_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010050 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010051 - name: ANSIBLE_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010052 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010053 - name: ANSIBLE_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010054 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010055 - name: SCALEOUT_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010056 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010057 - name: SCALEOUT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010058 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010059 - name: NETBOX_APIKEY
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010060 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010061 - name: SDNC_DB_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010062 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010063 - name: SDNC_DB_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010064 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
Alexander Dehn2ae954d2020-10-20 15:57:42 +000065 - name: ODL_ADMIN_USERNAME
66 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
67 - name: ODL_ADMIN_PASSWORD
68 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
69
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010070 volumeMounts:
71 - mountPath: /config-input
72 name: config-input
73 - mountPath: /config
74 name: properties
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +010075 image: {{ include "repositoryGenerator.image.envsubst" . }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010076 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
77 name: {{ include "common.name" . }}-update-config
Alexander Dehn9b797d62020-04-21 09:53:50 +000078 {{ if .Values.dgbuilder.enabled -}}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010079 - command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020080 - /app/ready.py
jmac065e2ce2018-03-29 01:18:02 +000081 args:
Alexander Dehn9b797d62020-04-21 09:53:50 +000082 {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
jmac065e2ce2018-03-29 01:18:02 +000083 - --container-name
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010084 - {{ include "common.mariadbService" . }}
Alexander Dehn9b797d62020-04-21 09:53:50 +000085 {{ end -}}
86 {{ if .Values.config.sdnr.enabled -}}
87 - --container-name
88 - {{ include "common.name" . }}-sdnrdb-init-job
89 {{ end -}}
jmac065e2ce2018-03-29 01:18:02 +000090 env:
91 - name: NAMESPACE
92 valueFrom:
93 fieldRef:
94 apiVersion: v1
95 fieldPath: metadata.namespace
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +010096 image: {{ include "repositoryGenerator.image.readiness" . }}
jmac065e2ce2018-03-29 01:18:02 +000097 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +010098 name: {{ include "common.name" . }}-readiness
Alexander Dehn9b797d62020-04-21 09:53:50 +000099 {{ end -}}
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200100{{ include "common.certInitializer.initContainer" . | indent 6 }}
101
egernug27578332020-03-26 10:27:55 +0000102 {{ if .Values.global.cmpv2Enabled }}
103 - name: certs-init
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100104 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.global.platform.certServiceClient.image }}
egernug27578332020-03-26 10:27:55 +0000105 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
106 env:
107 - name: REQUEST_URL
108 value: {{ .Values.global.platform.certServiceClient.envVariables.requestURL }}
109 - name: REQUEST_TIMEOUT
110 value: "30000"
111 - name: OUTPUT_PATH
112 value: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
113 - name: CA_NAME
114 value: {{ .Values.global.platform.certServiceClient.envVariables.caName }}
115 - name: COMMON_NAME
116 value: {{ .Values.global.platform.certServiceClient.envVariables.common_name }}
117 - name: ORGANIZATION
118 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Organization }}
119 - name: ORGANIZATION_UNIT
120 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2OrganizationalUnit }}
121 - name: LOCATION
122 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Location }}
123 - name: STATE
124 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2State }}
125 - name: COUNTRY
126 value: {{ .Values.global.platform.certServiceClient.envVariables.cmpv2Country }}
127 - name: KEYSTORE_PATH
128 value: {{ .Values.global.platform.certServiceClient.envVariables.keystorePath }}
129 - name: KEYSTORE_PASSWORD
130 value: {{ .Values.global.platform.certServiceClient.envVariables.keystorePassword }}
131 - name: TRUSTSTORE_PATH
132 value: {{ .Values.global.platform.certServiceClient.envVariables.truststorePath }}
133 - name: TRUSTSTORE_PASSWORD
134 value: {{ .Values.global.platform.certServiceClient.envVariables.truststorePassword }}
135 terminationMessagePath: /dev/termination-log
136 terminationMessagePolicy: File
137 volumeMounts:
138 - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
139 name: certs
140 - mountPath: {{ .Values.global.platform.certServiceClient.secret.mountPath }}
141 name: certservice-tls-volume
142 {{ end }}
143
Dan Timoney2ee28a52021-01-15 16:39:50 -0500144 - name: {{ include "common.name" . }}-init-files
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100145 image: {{ include "repositoryGenerator.image.busybox" . }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000146 command:
147 - sh
148 args:
149 - -c
Dan Timoney2ee28a52021-01-15 16:39:50 -0500150 - |
151 mkdir {{ .Values.persistence.mdsalPath }}/daexim
152 mkdir {{ .Values.persistence.mdsalPath }}/journal
153 mkdir {{ .Values.persistence.mdsalPath }}/snapshots
154 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000155{{- if .Values.global.aafEnabled }}
Dan Timoney2ee28a52021-01-15 16:39:50 -0500156 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000157{{- end }}
Timoney, Dan (dt5972)ba4d2eb2019-05-07 13:32:42 -0400158 volumeMounts:
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200159{{ include "common.certInitializer.volumeMount" . | indent 10 }}
Timoney, Dan (dt5972)ba4d2eb2019-05-07 13:32:42 -0400160 - mountPath: {{ .Values.persistence.mdsalPath }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100161 name: {{ include "common.fullname" . }}-data
jmac065e2ce2018-03-29 01:18:02 +0000162 containers:
163 - name: {{ include "common.name" . }}
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100164 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
jmac065e2ce2018-03-29 01:18:02 +0000165 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
166 command: ["/bin/bash"]
Dan Timoney2ee28a52021-01-15 16:39:50 -0500167 args: ["-c", "/opt/onap/sdnc/bin/createLinks.sh ; /opt/onap/sdnc/bin/startODL.sh"]
jmac065e2ce2018-03-29 01:18:02 +0000168 ports:
169 - containerPort: {{ .Values.service.internalPort }}
170 - containerPort: {{ .Values.service.internalPort2 }}
171 - containerPort: {{ .Values.service.internalPort3 }}
172 - containerPort: {{ .Values.service.clusterPort }}
173 readinessProbe:
174 tcpSocket:
175 port: {{ .Values.service.internalPort }}
176 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
177 periodSeconds: {{ .Values.readiness.periodSeconds }}
178 env:
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100179 - name: MYSQL_ROOT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100180 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100181 - name: ODL_ADMIN_USERNAME
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100182 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100183 - name: ODL_ADMIN_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100184 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100185 - name: SDNC_DB_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100186 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100187 - name: SDNC_DB_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100188 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100189 - name: SDNC_CONFIG_DIR
190 value: "{{ .Values.config.configDir }}"
191 - name: ENABLE_ODL_CLUSTER
192 value: "{{ .Values.config.enableClustering }}"
193 - name: MY_ODL_CLUSTER
194 value: "{{ .Values.config.myODLCluster }}"
195 - name: PEER_ODL_CLUSTER
196 value: "{{ .Values.config.peerODLCluster }}"
197 - name: IS_PRIMARY_CLUSTER
198 value: "{{ .Values.config.isPrimaryCluster }}"
199 - name: GEO_ENABLED
200 value: "{{ .Values.config.geoEnabled}}"
201 - name: SDNC_AAF_ENABLED
202 value: "{{ .Values.global.aafEnabled}}"
203 - name: SDNC_REPLICAS
204 value: "{{ .Values.replicaCount }}"
205 - name: MYSQL_HOST
206 value: {{ include "common.mariadbService" . }}
Dan Timoney2ee28a52021-01-15 16:39:50 -0500207 - name: MDSAL_PATH
208 value: {{ .Values.persistence.mdsalPath }}
209 - name: DAEXIM_PATH
210 value: {{ .Values.persistence.daeximPath }}
211 - name: JOURNAL_PATH
212 value: {{ .Values.persistence.journalPath }}
213 - name: SNAPSHOTS_PATH
214 value: {{ .Values.persistence.snapshotsPath }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100215 - name: JAVA_HOME
216 value: "{{ .Values.config.javaHome}}"
Dan Timoneya98765b2020-09-14 11:57:55 -0400217 - name: JAVA_OPTS
218 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +0200219 - name: KARAF_CONSOLE_LOG_LEVEL
220 value: "{{ include "common.log.level" . }}"
Alexander Dehn9b797d62020-04-21 09:53:50 +0000221 - name: SDNRWT
222 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
223 {{- if eq .Values.config.sdnr.mode "web" }}
224 - name: SDNRDM
225 value: "true"
226 {{- end }}
227 - name: SDNRONLY
228 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
229 - name: SDNRDBURL
230 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
231 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
232 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
233 - name: SDNRDBTRUSTALLCERTS
234 value: "true"
235 {{ end }}
236
jmac065e2ce2018-03-29 01:18:02 +0000237 volumeMounts:
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200238{{ include "common.certInitializer.volumeMount" . | indent 10 }}
jmac065e2ce2018-03-29 01:18:02 +0000239 - mountPath: /etc/localtime
240 name: localtime
241 readOnly: true
242 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
243 name: sdnc-logging-cfg-config
244 subPath: org.ops4j.pax.logging.cfg
jmaca68f4cb2018-05-10 22:44:19 +0000245 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
246 name: bin
jmac065e2ce2018-03-29 01:18:02 +0000247 subPath: installSdncDb.sh
Dan Timoney2ee28a52021-01-15 16:39:50 -0500248 - mountPath: {{ .Values.config.binDir }}/createLinks.sh
249 name: bin
250 subPath: createLinks.sh
Konrad Bańka5ea1db32020-04-06 14:32:46 +0200251 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
252 name: properties
253 subPath: aaiclient.properties
jmaca68f4cb2018-05-10 22:44:19 +0000254 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
255 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000256 subPath: aaiclient.properties
jmaca68f4cb2018-05-10 22:44:19 +0000257 - mountPath: {{ .Values.config.configDir }}/dblib.properties
258 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000259 subPath: dblib.properties
jmac7c434672018-05-11 20:14:17 +0000260 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
261 name: properties
262 subPath: lcm-dg.properties
jmaca68f4cb2018-05-10 22:44:19 +0000263 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
264 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000265 subPath: svclogic.properties
266 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
jmaca68f4cb2018-05-10 22:44:19 +0000267 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000268 subPath: svclogic.properties
Alexis de Talhouët43c67e02018-09-20 16:49:16 -0400269 - mountPath: {{ .Values.config.configDir }}/netbox.properties
270 name: properties
271 subPath: netbox.properties
272 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
273 name: properties
274 subPath: blueprints-processor-adaptor.properties
jmac8d6dc962018-04-26 14:26:55 +0000275 - mountPath: {{ .Values.persistence.mdsalPath }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100276 name: {{ include "common.fullname" . }}-data
jmac065e2ce2018-03-29 01:18:02 +0000277 - mountPath: /var/log/onap
278 name: logs
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -0400279 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
280 name: properties
281 subPath: akka.conf
282 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
283 name: properties
284 subPath: org.opendaylight.controller.cluster.datastore.cfg
Dan Timoney9520e7c2021-01-12 11:10:58 -0500285 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg
286 name: properties
287 subPath: org.opendaylight.aaa.filterchain.cfg
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -0400288 - mountPath: {{ .Values.config.odl.binDir }}/setenv
289 name: properties
290 subPath: setenv
Alexander Dehn9b797d62020-04-21 09:53:50 +0000291 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
292 name: properties
293 subPath: mountpoint-registrar.properties
294 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
295 name: properties
296 subPath: mountpoint-state-provider.properties
egernugb8f88072020-10-08 11:05:20 +0100297 {{ if .Values.global.cmpv2Enabled }}
egernug27578332020-03-26 10:27:55 +0000298 - mountPath: {{ .Values.global.platform.certServiceClient.envVariables.cert_path }}
299 name: certs
egernugb8f88072020-10-08 11:05:20 +0100300 {{- end }}
jmac065e2ce2018-03-29 01:18:02 +0000301 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000302{{ include "common.resources" . | indent 12 }}
jmac065e2ce2018-03-29 01:18:02 +0000303 {{- if .Values.nodeSelector }}
304 nodeSelector:
305{{ toYaml .Values.nodeSelector | indent 10 }}
306 {{- end -}}
307 {{- if .Values.affinity }}
308 affinity:
309{{ toYaml .Values.affinity | indent 10 }}
310 {{- end }}
311
312 # side car containers
313 - name: filebeat-onap
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100314 image: {{ include "repositoryGenerator.image.logging" . }}
jmac065e2ce2018-03-29 01:18:02 +0000315 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
316 volumeMounts:
317 - mountPath: /usr/share/filebeat/filebeat.yml
318 name: filebeat-conf
319 subPath: filebeat.yml
320 - mountPath: /var/log/onap
321 name: logs
322 - mountPath: /usr/share/filebeat/data
323 name: data-filebeat
jmac8d6dc962018-04-26 14:26:55 +0000324 imagePullSecrets:
325 - name: "{{ include "common.namespace" . }}-docker-registry-key"
jmac065e2ce2018-03-29 01:18:02 +0000326 volumes:
327 - name: localtime
328 hostPath:
329 path: /etc/localtime
330 - name: logs
331 emptyDir: {}
332 - name: data-filebeat
333 emptyDir: {}
334 - name: filebeat-conf
335 configMap:
336 name: {{ include "common.fullname" . }}-filebeat-configmap
337 - name: sdnc-logging-cfg-config
338 configMap:
339 name: {{ include "common.fullname" . }}-log-configmap
jmaca68f4cb2018-05-10 22:44:19 +0000340 - name: bin
jmac065e2ce2018-03-29 01:18:02 +0000341 configMap:
jmaca68f4cb2018-05-10 22:44:19 +0000342 name: {{ include "common.fullname" . }}-bin
343 defaultMode: 0755
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100344 - name: config-input
jmac065e2ce2018-03-29 01:18:02 +0000345 configMap:
jmaca68f4cb2018-05-10 22:44:19 +0000346 name: {{ include "common.fullname" . }}-properties
347 defaultMode: 0644
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100348 - name: properties
349 emptyDir:
350 medium: Memory
egernugb8f88072020-10-08 11:05:20 +0100351 {{ if .Values.global.cmpv2Enabled }}
egernug27578332020-03-26 10:27:55 +0000352 - name: certs
353 emptyDir:
354 medium: Memory
355 - name: certservice-tls-volume
356 secret:
357 secretName: {{ .Values.global.platform.certServiceClient.secret.name }}
egernugb8f88072020-10-08 11:05:20 +0100358 {{- end }}
jmac8d6dc962018-04-26 14:26:55 +0000359 {{ if not .Values.persistence.enabled }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100360 - name: {{ include "common.fullname" . }}-data
jmac8d6dc962018-04-26 14:26:55 +0000361 emptyDir: {}
362 {{ else }}
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200363{{ include "common.certInitializer.volumes" . | nindent 8 }}
jmac8d6dc962018-04-26 14:26:55 +0000364 volumeClaimTemplates:
365 - metadata:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100366 name: {{ include "common.fullname" . }}-data
jmac8d6dc962018-04-26 14:26:55 +0000367 labels:
368 name: {{ include "common.fullname" . }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100369 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100370 release: "{{ include "common.release" . }}"
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100371 heritage: "{{ .Release.Service }}"
jmac8d6dc962018-04-26 14:26:55 +0000372 spec:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100373 accessModes:
374 - {{ .Values.persistence.accessMode }}
375 storageClassName: {{ include "common.storageClass" . }}
jmac8d6dc962018-04-26 14:26:55 +0000376 resources:
377 requests:
378 storage: {{ .Values.persistence.size }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100379 {{- end }}