blob: 96fa3378fbb1d71eb88035b89ca24fbb5e840bb4 [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
Remigiusz Janeczek42177a12020-12-10 13:10:15 +01004# Copyright © 2021 Nokia
jmac065e2ce2018-03-29 01:18:02 +00005#
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
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
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.
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010017*/}}
jmac065e2ce2018-03-29 01:18:02 +000018
Grzegorz-Lis1318a772020-07-23 15:08:43 +020019apiVersion: apps/v1
jmac065e2ce2018-03-29 01:18:02 +000020kind: StatefulSet
Alexander Dehn9b797d62020-04-21 09:53:50 +000021metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
jmac065e2ce2018-03-29 01:18:02 +000022spec:
Grzegorz-Lis1318a772020-07-23 15:08:43 +020023 selector:
24 matchLabels:
25 app: {{ include "common.name" . }}
BorislavG1ffbd992018-04-24 07:56:27 +000026 serviceName: {{ include "common.servicename" . }}-cluster
jmac065e2ce2018-03-29 01:18:02 +000027 replicas: {{ .Values.replicaCount }}
Alexander Dehn9b797d62020-04-21 09:53:50 +000028 selector: {{- include "common.selectors" . | nindent 4 }}
jmac065e2ce2018-03-29 01:18:02 +000029 podManagementPolicy: Parallel
30 template:
Alexander Dehn9b797d62020-04-21 09:53:50 +000031 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
jmac065e2ce2018-03-29 01:18:02 +000032 spec:
33 initContainers:
34 - command:
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010035 - sh
36 args:
37 - -c
38 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
39 env:
40 - name: AAI_CLIENT_NAME
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010041 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010042 - name: AAI_CLIENT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010043 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010044 - name: MODELSERVICE_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010045 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010046 - name: MODELSERVICE_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010047 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010048 - name: RESTCONF_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010049 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010050 - name: RESTCONF_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010051 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010052 - name: ANSIBLE_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010053 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010054 - name: ANSIBLE_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010055 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010056 - name: SCALEOUT_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010057 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010058 - name: SCALEOUT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010059 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010060 - name: NETBOX_APIKEY
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010061 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010062 - name: SDNC_DB_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010063 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010064 - name: SDNC_DB_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010065 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
Alexander Dehn2ae954d2020-10-20 15:57:42 +000066 - name: ODL_ADMIN_USERNAME
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
68 - name: ODL_ADMIN_PASSWORD
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
demskeq89d26b332021-01-14 16:45:28 +010070 {{ if and .Values.config.sdnr.dmaapProxy.enabled .Values.config.sdnr.dmaapProxy.usepwd }}
71 - name: DMAAP_HTTP_PROXY_USERNAME
72 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "login") | indent 10 }}
73 - name: DMAAP_HTTP_PROXY_PASSWORD
74 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "password") | indent 10 }}
75 {{- end }}
76
Alexander Dehn2ae954d2020-10-20 15:57:42 +000077
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010078 volumeMounts:
79 - mountPath: /config-input
80 name: config-input
81 - mountPath: /config
82 name: properties
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +010083 image: {{ include "repositoryGenerator.image.envsubst" . }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010084 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
85 name: {{ include "common.name" . }}-update-config
Alexander Dehn9b797d62020-04-21 09:53:50 +000086 {{ if .Values.dgbuilder.enabled -}}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010087 - command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +020088 - /app/ready.py
jmac065e2ce2018-03-29 01:18:02 +000089 args:
Alexander Dehn9b797d62020-04-21 09:53:50 +000090 {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
jmac065e2ce2018-03-29 01:18:02 +000091 - --container-name
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010092 - {{ include "common.mariadbService" . }}
Alexander Dehn9b797d62020-04-21 09:53:50 +000093 {{ end -}}
94 {{ if .Values.config.sdnr.enabled -}}
95 - --container-name
96 - {{ include "common.name" . }}-sdnrdb-init-job
97 {{ end -}}
jmac065e2ce2018-03-29 01:18:02 +000098 env:
99 - name: NAMESPACE
100 valueFrom:
101 fieldRef:
102 apiVersion: v1
103 fieldPath: metadata.namespace
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100104 image: {{ include "repositoryGenerator.image.readiness" . }}
jmac065e2ce2018-03-29 01:18:02 +0000105 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100106 name: {{ include "common.name" . }}-readiness
Alexander Dehn9b797d62020-04-21 09:53:50 +0000107 {{ end -}}
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200108{{ include "common.certInitializer.initContainer" . | indent 6 }}
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100109{{ include "common.certServiceClient.initContainer" . | indent 6 }}
110 - name: {{ include "common.name" . }}-chown
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100111 image: {{ include "repositoryGenerator.image.busybox" . }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000112 command:
113 - sh
114 args:
115 - -c
Dan Timoney2ee28a52021-01-15 16:39:50 -0500116 - |
Dan Timoney2ee28a52021-01-15 16:39:50 -0500117 mkdir {{ .Values.persistence.mdsalPath }}/journal
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100118 mkdir {{ .Values.persistence.mdsalPath }}/snapshots
Dan Timoney2ee28a52021-01-15 16:39:50 -0500119 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000120{{- if .Values.global.aafEnabled }}
Dan Timoney2ee28a52021-01-15 16:39:50 -0500121 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000122{{- end }}
Timoney, Dan (dt5972)ba4d2eb2019-05-07 13:32:42 -0400123 volumeMounts:
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200124{{ include "common.certInitializer.volumeMount" . | indent 10 }}
Timoney, Dan (dt5972)ba4d2eb2019-05-07 13:32:42 -0400125 - mountPath: {{ .Values.persistence.mdsalPath }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100126 name: {{ include "common.fullname" . }}-data
jmac065e2ce2018-03-29 01:18:02 +0000127 containers:
128 - name: {{ include "common.name" . }}
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100129 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
jmac065e2ce2018-03-29 01:18:02 +0000130 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Piotr Marcinkiewiczaf82e2b2021-02-11 11:23:31 +0100131 {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
132 {{- $linkCommand := include "common.certManager.linkVolumeMounts" . }}
133 lifecycle:
134 postStart:
135 exec:
136 command: ["sh", "-c", {{$linkCommand | quote}} ]
137 {{- end }}
jmac065e2ce2018-03-29 01:18:02 +0000138 command: ["/bin/bash"]
Dan Timoney2ee28a52021-01-15 16:39:50 -0500139 args: ["-c", "/opt/onap/sdnc/bin/createLinks.sh ; /opt/onap/sdnc/bin/startODL.sh"]
jmac065e2ce2018-03-29 01:18:02 +0000140 ports:
141 - containerPort: {{ .Values.service.internalPort }}
142 - containerPort: {{ .Values.service.internalPort2 }}
143 - containerPort: {{ .Values.service.internalPort3 }}
144 - containerPort: {{ .Values.service.clusterPort }}
145 readinessProbe:
146 tcpSocket:
147 port: {{ .Values.service.internalPort }}
148 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
149 periodSeconds: {{ .Values.readiness.periodSeconds }}
150 env:
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100151 - name: MYSQL_ROOT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100152 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100153 - name: ODL_ADMIN_USERNAME
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100154 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100155 - name: ODL_ADMIN_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100156 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100157 - name: SDNC_DB_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100158 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100159 - name: SDNC_DB_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100160 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100161 - name: SDNC_CONFIG_DIR
162 value: "{{ .Values.config.configDir }}"
163 - name: ENABLE_ODL_CLUSTER
164 value: "{{ .Values.config.enableClustering }}"
165 - name: MY_ODL_CLUSTER
166 value: "{{ .Values.config.myODLCluster }}"
167 - name: PEER_ODL_CLUSTER
168 value: "{{ .Values.config.peerODLCluster }}"
169 - name: IS_PRIMARY_CLUSTER
170 value: "{{ .Values.config.isPrimaryCluster }}"
171 - name: GEO_ENABLED
172 value: "{{ .Values.config.geoEnabled}}"
173 - name: SDNC_AAF_ENABLED
174 value: "{{ .Values.global.aafEnabled}}"
175 - name: SDNC_REPLICAS
176 value: "{{ .Values.replicaCount }}"
177 - name: MYSQL_HOST
178 value: {{ include "common.mariadbService" . }}
Dan Timoney2ee28a52021-01-15 16:39:50 -0500179 - name: MDSAL_PATH
180 value: {{ .Values.persistence.mdsalPath }}
181 - name: DAEXIM_PATH
182 value: {{ .Values.persistence.daeximPath }}
183 - name: JOURNAL_PATH
184 value: {{ .Values.persistence.journalPath }}
185 - name: SNAPSHOTS_PATH
186 value: {{ .Values.persistence.snapshotsPath }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100187 - name: JAVA_HOME
188 value: "{{ .Values.config.javaHome}}"
Dan Timoneya98765b2020-09-14 11:57:55 -0400189 - name: JAVA_OPTS
190 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +0200191 - name: KARAF_CONSOLE_LOG_LEVEL
192 value: "{{ include "common.log.level" . }}"
Alexander Dehn9b797d62020-04-21 09:53:50 +0000193 - name: SDNRWT
194 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
195 {{- if eq .Values.config.sdnr.mode "web" }}
196 - name: SDNRDM
197 value: "true"
198 {{- end }}
199 - name: SDNRONLY
200 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
201 - name: SDNRDBURL
202 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
203 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
204 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
205 - name: SDNRDBTRUSTALLCERTS
206 value: "true"
Piotr Marcinkiewiczaf82e2b2021-02-11 11:23:31 +0100207 {{- end }}
208 {{- if .Values.global.cmpv2Enabled }}
209 - name: ODL_CERT_DIR
210 value: {{ (mustFirst (.Values.certificates)).mountPath }}
211 {{- end }}
Alexander Dehn9b797d62020-04-21 09:53:50 +0000212
jmac065e2ce2018-03-29 01:18:02 +0000213 volumeMounts:
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200214{{ include "common.certInitializer.volumeMount" . | indent 10 }}
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100215{{ include "common.certServiceClient.volumeMounts" . | indent 10 }}
Piotr Marcinkiewicz59571012021-01-12 17:37:08 +0100216{{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
217{{ include "common.certManager.volumeMounts" . | indent 10 }}
218{{- end }}
jmac065e2ce2018-03-29 01:18:02 +0000219 - mountPath: /etc/localtime
220 name: localtime
221 readOnly: true
222 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
223 name: sdnc-logging-cfg-config
224 subPath: org.ops4j.pax.logging.cfg
jmaca68f4cb2018-05-10 22:44:19 +0000225 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
226 name: bin
jmac065e2ce2018-03-29 01:18:02 +0000227 subPath: installSdncDb.sh
Dan Timoney2ee28a52021-01-15 16:39:50 -0500228 - mountPath: {{ .Values.config.binDir }}/createLinks.sh
229 name: bin
230 subPath: createLinks.sh
Konrad Bańka5ea1db32020-04-06 14:32:46 +0200231 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
232 name: properties
233 subPath: aaiclient.properties
jmaca68f4cb2018-05-10 22:44:19 +0000234 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
235 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000236 subPath: aaiclient.properties
jmaca68f4cb2018-05-10 22:44:19 +0000237 - mountPath: {{ .Values.config.configDir }}/dblib.properties
238 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000239 subPath: dblib.properties
jmac7c434672018-05-11 20:14:17 +0000240 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
241 name: properties
242 subPath: lcm-dg.properties
jmaca68f4cb2018-05-10 22:44:19 +0000243 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
244 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000245 subPath: svclogic.properties
246 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
jmaca68f4cb2018-05-10 22:44:19 +0000247 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000248 subPath: svclogic.properties
Alexis de Talhouët43c67e02018-09-20 16:49:16 -0400249 - mountPath: {{ .Values.config.configDir }}/netbox.properties
250 name: properties
251 subPath: netbox.properties
252 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
253 name: properties
254 subPath: blueprints-processor-adaptor.properties
jmac8d6dc962018-04-26 14:26:55 +0000255 - mountPath: {{ .Values.persistence.mdsalPath }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100256 name: {{ include "common.fullname" . }}-data
jmac065e2ce2018-03-29 01:18:02 +0000257 - mountPath: /var/log/onap
258 name: logs
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -0400259 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
260 name: properties
261 subPath: akka.conf
262 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
263 name: properties
264 subPath: org.opendaylight.controller.cluster.datastore.cfg
Dan Timoney9520e7c2021-01-12 11:10:58 -0500265 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg
266 name: properties
267 subPath: org.opendaylight.aaa.filterchain.cfg
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -0400268 - mountPath: {{ .Values.config.odl.binDir }}/setenv
269 name: properties
270 subPath: setenv
Alexander Dehn9b797d62020-04-21 09:53:50 +0000271 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
272 name: properties
273 subPath: mountpoint-registrar.properties
274 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
275 name: properties
276 subPath: mountpoint-state-provider.properties
demskeq8a86300a2021-02-10 09:53:33 +0100277 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg
278 name: properties
279 subPath: org.opendaylight.daexim.cfg
jmac065e2ce2018-03-29 01:18:02 +0000280 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000281{{ include "common.resources" . | indent 12 }}
jmac065e2ce2018-03-29 01:18:02 +0000282 {{- if .Values.nodeSelector }}
283 nodeSelector:
284{{ toYaml .Values.nodeSelector | indent 10 }}
285 {{- end -}}
286 {{- if .Values.affinity }}
287 affinity:
288{{ toYaml .Values.affinity | indent 10 }}
289 {{- end }}
290
291 # side car containers
292 - name: filebeat-onap
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100293 image: {{ include "repositoryGenerator.image.logging" . }}
jmac065e2ce2018-03-29 01:18:02 +0000294 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
295 volumeMounts:
296 - mountPath: /usr/share/filebeat/filebeat.yml
297 name: filebeat-conf
298 subPath: filebeat.yml
299 - mountPath: /var/log/onap
300 name: logs
301 - mountPath: /usr/share/filebeat/data
302 name: data-filebeat
jmac8d6dc962018-04-26 14:26:55 +0000303 imagePullSecrets:
304 - name: "{{ include "common.namespace" . }}-docker-registry-key"
jmac065e2ce2018-03-29 01:18:02 +0000305 volumes:
306 - name: localtime
307 hostPath:
308 path: /etc/localtime
309 - name: logs
310 emptyDir: {}
311 - name: data-filebeat
312 emptyDir: {}
313 - name: filebeat-conf
314 configMap:
315 name: {{ include "common.fullname" . }}-filebeat-configmap
316 - name: sdnc-logging-cfg-config
317 configMap:
318 name: {{ include "common.fullname" . }}-log-configmap
jmaca68f4cb2018-05-10 22:44:19 +0000319 - name: bin
jmac065e2ce2018-03-29 01:18:02 +0000320 configMap:
jmaca68f4cb2018-05-10 22:44:19 +0000321 name: {{ include "common.fullname" . }}-bin
322 defaultMode: 0755
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100323 - name: config-input
jmac065e2ce2018-03-29 01:18:02 +0000324 configMap:
jmaca68f4cb2018-05-10 22:44:19 +0000325 name: {{ include "common.fullname" . }}-properties
326 defaultMode: 0644
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100327 - name: properties
328 emptyDir:
329 medium: Memory
jmac8d6dc962018-04-26 14:26:55 +0000330 {{ if not .Values.persistence.enabled }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100331 - name: {{ include "common.fullname" . }}-data
jmac8d6dc962018-04-26 14:26:55 +0000332 emptyDir: {}
333 {{ else }}
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200334{{ include "common.certInitializer.volumes" . | nindent 8 }}
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100335{{ include "common.certServiceClient.volumes" . | nindent 8 }}
Piotr Marcinkiewicz59571012021-01-12 17:37:08 +0100336{{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
337{{ include "common.certManager.volumes" . | nindent 8 }}
338{{- end }}
jmac8d6dc962018-04-26 14:26:55 +0000339 volumeClaimTemplates:
340 - metadata:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100341 name: {{ include "common.fullname" . }}-data
jmac8d6dc962018-04-26 14:26:55 +0000342 labels:
343 name: {{ include "common.fullname" . }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100344 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100345 release: "{{ include "common.release" . }}"
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100346 heritage: "{{ .Release.Service }}"
jmac8d6dc962018-04-26 14:26:55 +0000347 spec:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100348 accessModes:
349 - {{ .Values.persistence.accessMode }}
350 storageClassName: {{ include "common.storageClass" . }}
jmac8d6dc962018-04-26 14:26:55 +0000351 resources:
352 requests:
353 storage: {{ .Values.persistence.size }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100354 {{- end }}