blob: 027f01ce01b206e22c929b6156adb9f16ca8f9de [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 }}
Dan Timoney9e310e72021-02-23 11:25:39 -050044 - name: AAI_TRUSTSTORE_PASSWORD
45 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-truststore-password" "key" "password") | indent 10 }}
46 - name: ANSIBLE_TRUSTSTORE_PASSWORD
47 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-truststore-password" "key" "password") | indent 10 }}
48 - name: SO_USER
49 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "login") | indent 10 }}
50 - name: SO_PASSWORD
51 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "password") | indent 10 }}
52 - name: NENG_USER
53 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "login") | indent 10 }}
54 - name: NENG_PASSWORD
55 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "password") | indent 10 }}
56 - name: CDS_USER
57 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "login") | indent 10 }}
58 - name: CDS_PASSWORD
59 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "password") | indent 10 }}
60 - name: HONEYCOMB_USER
61 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "login") | indent 10 }}
62 - name: HONEYCOMB_PASSWORD
63 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "password") | indent 10 }}
64 - name: TRUSTSTORE_PASSWORD
65 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 10 }}
66 - name: KEYSTORE_PASSWORD
67 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 10 }}
68 - name: DMAAP_USER
69 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "login") | indent 10 }}
70 - name: DMAAP_PASSWORD
71 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "password") | indent 10 }}
72 - name: DMAAP_AUTHKEY
73 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-authkey" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010074 - name: MODELSERVICE_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010075 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010076 - name: MODELSERVICE_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010077 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010078 - name: RESTCONF_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010079 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010080 - name: RESTCONF_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010081 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010082 - name: ANSIBLE_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010083 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010084 - name: ANSIBLE_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010085 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010086 - name: SCALEOUT_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010087 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010088 - name: SCALEOUT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010089 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010090 - name: NETBOX_APIKEY
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010091 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010092 - name: SDNC_DB_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010093 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010094 - name: SDNC_DB_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010095 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
Dan Timoney9e310e72021-02-23 11:25:39 -050096 - name: MYSQL_USER
97 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
98 - name: MYSQL_PASSWORD
99 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
Alexander Dehn2ae954d2020-10-20 15:57:42 +0000100 - name: ODL_ADMIN_USERNAME
101 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500102 - name: ODL_USER
103 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
Alexander Dehn2ae954d2020-10-20 15:57:42 +0000104 - name: ODL_ADMIN_PASSWORD
105 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500106 - name: ODL_PASSWORD
107 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
demskeq89d26b332021-01-14 16:45:28 +0100108 {{ if and .Values.config.sdnr.dmaapProxy.enabled .Values.config.sdnr.dmaapProxy.usepwd }}
109 - name: DMAAP_HTTP_PROXY_USERNAME
110 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "login") | indent 10 }}
111 - name: DMAAP_HTTP_PROXY_PASSWORD
112 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "password") | indent 10 }}
113 {{- end }}
114
Alexander Dehn2ae954d2020-10-20 15:57:42 +0000115
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100116 volumeMounts:
117 - mountPath: /config-input
118 name: config-input
119 - mountPath: /config
120 name: properties
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100121 image: {{ include "repositoryGenerator.image.envsubst" . }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100122 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
123 name: {{ include "common.name" . }}-update-config
Alexander Dehn9b797d62020-04-21 09:53:50 +0000124 {{ if .Values.dgbuilder.enabled -}}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100125 - command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +0200126 - /app/ready.py
jmac065e2ce2018-03-29 01:18:02 +0000127 args:
Alexander Dehn9b797d62020-04-21 09:53:50 +0000128 {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
jmac065e2ce2018-03-29 01:18:02 +0000129 - --container-name
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100130 - {{ include "common.mariadbService" . }}
Alexander Dehn9b797d62020-04-21 09:53:50 +0000131 {{ end -}}
132 {{ if .Values.config.sdnr.enabled -}}
133 - --container-name
134 - {{ include "common.name" . }}-sdnrdb-init-job
135 {{ end -}}
jmac065e2ce2018-03-29 01:18:02 +0000136 env:
137 - name: NAMESPACE
138 valueFrom:
139 fieldRef:
140 apiVersion: v1
141 fieldPath: metadata.namespace
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100142 image: {{ include "repositoryGenerator.image.readiness" . }}
jmac065e2ce2018-03-29 01:18:02 +0000143 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100144 name: {{ include "common.name" . }}-readiness
Alexander Dehn9b797d62020-04-21 09:53:50 +0000145 {{ end -}}
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200146{{ include "common.certInitializer.initContainer" . | indent 6 }}
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100147{{ include "common.certServiceClient.initContainer" . | indent 6 }}
148 - name: {{ include "common.name" . }}-chown
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100149 image: {{ include "repositoryGenerator.image.busybox" . }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000150 command:
151 - sh
152 args:
153 - -c
Dan Timoney2ee28a52021-01-15 16:39:50 -0500154 - |
Dan Timoney2ee28a52021-01-15 16:39:50 -0500155 mkdir {{ .Values.persistence.mdsalPath }}/journal
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100156 mkdir {{ .Values.persistence.mdsalPath }}/snapshots
demskeq83b3b7fd2021-02-18 09:41:59 +0100157 mkdir {{ .Values.persistence.mdsalPath }}/daexim
Dan Timoney2ee28a52021-01-15 16:39:50 -0500158 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000159{{- if .Values.global.aafEnabled }}
Dan Timoney2ee28a52021-01-15 16:39:50 -0500160 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000161{{- end }}
Timoney, Dan (dt5972)ba4d2eb2019-05-07 13:32:42 -0400162 volumeMounts:
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200163{{ include "common.certInitializer.volumeMount" . | indent 10 }}
Timoney, Dan (dt5972)ba4d2eb2019-05-07 13:32:42 -0400164 - mountPath: {{ .Values.persistence.mdsalPath }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100165 name: {{ include "common.fullname" . }}-data
jmac065e2ce2018-03-29 01:18:02 +0000166 containers:
167 - name: {{ include "common.name" . }}
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100168 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
jmac065e2ce2018-03-29 01:18:02 +0000169 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Piotr Marcinkiewiczaf82e2b2021-02-11 11:23:31 +0100170 {{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
171 {{- $linkCommand := include "common.certManager.linkVolumeMounts" . }}
172 lifecycle:
173 postStart:
174 exec:
175 command: ["sh", "-c", {{$linkCommand | quote}} ]
176 {{- end }}
jmac065e2ce2018-03-29 01:18:02 +0000177 command: ["/bin/bash"]
Dan Timoney2ee28a52021-01-15 16:39:50 -0500178 args: ["-c", "/opt/onap/sdnc/bin/createLinks.sh ; /opt/onap/sdnc/bin/startODL.sh"]
jmac065e2ce2018-03-29 01:18:02 +0000179 ports:
180 - containerPort: {{ .Values.service.internalPort }}
181 - containerPort: {{ .Values.service.internalPort2 }}
182 - containerPort: {{ .Values.service.internalPort3 }}
183 - containerPort: {{ .Values.service.clusterPort }}
184 readinessProbe:
185 tcpSocket:
186 port: {{ .Values.service.internalPort }}
187 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
188 periodSeconds: {{ .Values.readiness.periodSeconds }}
189 env:
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100190 - name: MYSQL_ROOT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100191 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100192 - name: ODL_ADMIN_USERNAME
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100193 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500194 - name: ODL_USER
195 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100196 - name: ODL_ADMIN_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100197 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500198 - name: ODL_PASSWORD
199 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100200 - name: SDNC_DB_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100201 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100202 - name: SDNC_DB_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100203 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500204 - name: MYSQL_USER
205 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
206 - name: MYSQL_PASSWORD
207 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
208 - name: MYSQL_DATABASE
209 value: "{{ .Values.config.dbSdnctlDatabase }}"
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100210 - name: SDNC_CONFIG_DIR
211 value: "{{ .Values.config.configDir }}"
Dan Timoney9e310e72021-02-23 11:25:39 -0500212 - name: AAI_CLIENT_NAME
213 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 12 }}
214 - name: AAI_CLIENT_PASSWORD
215 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 12 }}
216 - name: AAI_TRUSTSTORE_PASSWORD
217 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-truststore-password" "key" "password") | indent 12 }}
218 - name: ANSIBLE_TRUSTSTORE_PASSWORD
219 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-truststore-password" "key" "password") | indent 12 }}
220 - name: SO_USER
221 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "login") | indent 12 }}
222 - name: SO_PASSWORD
223 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "password") | indent 12 }}
224 - name: NENG_USER
225 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "login") | indent 12 }}
226 - name: NENG_PASSWORD
227 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "password") | indent 12 }}
228 - name: CDS_USER
229 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "login") | indent 12 }}
230 - name: CDS_PASSWORD
231 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "password") | indent 12 }}
232 - name: HONEYCOMB_USER
233 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "login") | indent 12 }}
234 - name: HONEYCOMB_PASSWORD
235 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "password") | indent 12 }}
236 - name: TRUSTSTORE_PASSWORD
237 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }}
238 - name: KEYSTORE_PASSWORD
239 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }}
240 - name: DMAAP_USER
241 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "login") | indent 12 }}
242 - name: DMAAP_PASSWORD
243 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "password") | indent 12 }}
244 - name: DMAAP_AUTHKEY
245 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-authkey" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100246 - name: ENABLE_ODL_CLUSTER
247 value: "{{ .Values.config.enableClustering }}"
248 - name: MY_ODL_CLUSTER
249 value: "{{ .Values.config.myODLCluster }}"
250 - name: PEER_ODL_CLUSTER
251 value: "{{ .Values.config.peerODLCluster }}"
252 - name: IS_PRIMARY_CLUSTER
253 value: "{{ .Values.config.isPrimaryCluster }}"
254 - name: GEO_ENABLED
255 value: "{{ .Values.config.geoEnabled}}"
256 - name: SDNC_AAF_ENABLED
257 value: "{{ .Values.global.aafEnabled}}"
258 - name: SDNC_REPLICAS
259 value: "{{ .Values.replicaCount }}"
260 - name: MYSQL_HOST
261 value: {{ include "common.mariadbService" . }}
Dan Timoney2ee28a52021-01-15 16:39:50 -0500262 - name: MDSAL_PATH
263 value: {{ .Values.persistence.mdsalPath }}
264 - name: DAEXIM_PATH
265 value: {{ .Values.persistence.daeximPath }}
266 - name: JOURNAL_PATH
267 value: {{ .Values.persistence.journalPath }}
268 - name: SNAPSHOTS_PATH
269 value: {{ .Values.persistence.snapshotsPath }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100270 - name: JAVA_HOME
271 value: "{{ .Values.config.javaHome}}"
Dan Timoneya98765b2020-09-14 11:57:55 -0400272 - name: JAVA_OPTS
273 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +0200274 - name: KARAF_CONSOLE_LOG_LEVEL
275 value: "{{ include "common.log.level" . }}"
Alexander Dehn9b797d62020-04-21 09:53:50 +0000276 - name: SDNRWT
277 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
278 {{- if eq .Values.config.sdnr.mode "web" }}
279 - name: SDNRDM
280 value: "true"
281 {{- end }}
282 - name: SDNRONLY
283 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
284 - name: SDNRDBURL
285 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
286 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
287 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
288 - name: SDNRDBTRUSTALLCERTS
289 value: "true"
Piotr Marcinkiewiczaf82e2b2021-02-11 11:23:31 +0100290 {{- end }}
291 {{- if .Values.global.cmpv2Enabled }}
292 - name: ODL_CERT_DIR
293 value: {{ (mustFirst (.Values.certificates)).mountPath }}
294 {{- end }}
Alexander Dehn9b797d62020-04-21 09:53:50 +0000295
jmac065e2ce2018-03-29 01:18:02 +0000296 volumeMounts:
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200297{{ include "common.certInitializer.volumeMount" . | indent 10 }}
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100298{{ include "common.certServiceClient.volumeMounts" . | indent 10 }}
Piotr Marcinkiewicz59571012021-01-12 17:37:08 +0100299{{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
300{{ include "common.certManager.volumeMounts" . | indent 10 }}
301{{- end }}
jmac065e2ce2018-03-29 01:18:02 +0000302 - mountPath: /etc/localtime
303 name: localtime
304 readOnly: true
305 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
306 name: sdnc-logging-cfg-config
307 subPath: org.ops4j.pax.logging.cfg
jmaca68f4cb2018-05-10 22:44:19 +0000308 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
309 name: bin
jmac065e2ce2018-03-29 01:18:02 +0000310 subPath: installSdncDb.sh
Dan Timoney2ee28a52021-01-15 16:39:50 -0500311 - mountPath: {{ .Values.config.binDir }}/createLinks.sh
312 name: bin
313 subPath: createLinks.sh
Konrad Bańka5ea1db32020-04-06 14:32:46 +0200314 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
315 name: properties
316 subPath: aaiclient.properties
jmaca68f4cb2018-05-10 22:44:19 +0000317 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
318 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000319 subPath: aaiclient.properties
jmaca68f4cb2018-05-10 22:44:19 +0000320 - mountPath: {{ .Values.config.configDir }}/dblib.properties
321 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000322 subPath: dblib.properties
jmac7c434672018-05-11 20:14:17 +0000323 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
324 name: properties
325 subPath: lcm-dg.properties
jmaca68f4cb2018-05-10 22:44:19 +0000326 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
327 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000328 subPath: svclogic.properties
329 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
jmaca68f4cb2018-05-10 22:44:19 +0000330 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000331 subPath: svclogic.properties
Alexis de Talhouët43c67e02018-09-20 16:49:16 -0400332 - mountPath: {{ .Values.config.configDir }}/netbox.properties
333 name: properties
334 subPath: netbox.properties
335 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
336 name: properties
337 subPath: blueprints-processor-adaptor.properties
jmac8d6dc962018-04-26 14:26:55 +0000338 - mountPath: {{ .Values.persistence.mdsalPath }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100339 name: {{ include "common.fullname" . }}-data
jmac065e2ce2018-03-29 01:18:02 +0000340 - mountPath: /var/log/onap
341 name: logs
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -0400342 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
343 name: properties
344 subPath: akka.conf
345 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
346 name: properties
347 subPath: org.opendaylight.controller.cluster.datastore.cfg
Dan Timoney9520e7c2021-01-12 11:10:58 -0500348 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg
349 name: properties
350 subPath: org.opendaylight.aaa.filterchain.cfg
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -0400351 - mountPath: {{ .Values.config.odl.binDir }}/setenv
352 name: properties
353 subPath: setenv
Alexander Dehn9b797d62020-04-21 09:53:50 +0000354 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
355 name: properties
356 subPath: mountpoint-registrar.properties
357 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
358 name: properties
359 subPath: mountpoint-state-provider.properties
demskeq8a86300a2021-02-10 09:53:33 +0100360 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg
361 name: properties
362 subPath: org.opendaylight.daexim.cfg
jmac065e2ce2018-03-29 01:18:02 +0000363 resources:
Mandeep Khinda5e3f36a2018-09-24 15:25:42 +0000364{{ include "common.resources" . | indent 12 }}
jmac065e2ce2018-03-29 01:18:02 +0000365 {{- if .Values.nodeSelector }}
366 nodeSelector:
367{{ toYaml .Values.nodeSelector | indent 10 }}
368 {{- end -}}
369 {{- if .Values.affinity }}
370 affinity:
371{{ toYaml .Values.affinity | indent 10 }}
372 {{- end }}
373
374 # side car containers
375 - name: filebeat-onap
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100376 image: {{ include "repositoryGenerator.image.logging" . }}
jmac065e2ce2018-03-29 01:18:02 +0000377 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
378 volumeMounts:
379 - mountPath: /usr/share/filebeat/filebeat.yml
380 name: filebeat-conf
381 subPath: filebeat.yml
382 - mountPath: /var/log/onap
383 name: logs
384 - mountPath: /usr/share/filebeat/data
385 name: data-filebeat
jmac8d6dc962018-04-26 14:26:55 +0000386 imagePullSecrets:
387 - name: "{{ include "common.namespace" . }}-docker-registry-key"
jmac065e2ce2018-03-29 01:18:02 +0000388 volumes:
389 - name: localtime
390 hostPath:
391 path: /etc/localtime
392 - name: logs
393 emptyDir: {}
394 - name: data-filebeat
395 emptyDir: {}
396 - name: filebeat-conf
397 configMap:
398 name: {{ include "common.fullname" . }}-filebeat-configmap
399 - name: sdnc-logging-cfg-config
400 configMap:
401 name: {{ include "common.fullname" . }}-log-configmap
jmaca68f4cb2018-05-10 22:44:19 +0000402 - name: bin
jmac065e2ce2018-03-29 01:18:02 +0000403 configMap:
jmaca68f4cb2018-05-10 22:44:19 +0000404 name: {{ include "common.fullname" . }}-bin
405 defaultMode: 0755
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100406 - name: config-input
jmac065e2ce2018-03-29 01:18:02 +0000407 configMap:
jmaca68f4cb2018-05-10 22:44:19 +0000408 name: {{ include "common.fullname" . }}-properties
409 defaultMode: 0644
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100410 - name: properties
411 emptyDir:
412 medium: Memory
jmac8d6dc962018-04-26 14:26:55 +0000413 {{ if not .Values.persistence.enabled }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100414 - name: {{ include "common.fullname" . }}-data
jmac8d6dc962018-04-26 14:26:55 +0000415 emptyDir: {}
416 {{ else }}
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200417{{ include "common.certInitializer.volumes" . | nindent 8 }}
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100418{{ include "common.certServiceClient.volumes" . | nindent 8 }}
Piotr Marcinkiewicz59571012021-01-12 17:37:08 +0100419{{- if and .Values.global.cmpv2Enabled .Values.global.CMPv2CertManagerIntegration }}
420{{ include "common.certManager.volumes" . | nindent 8 }}
421{{- end }}
jmac8d6dc962018-04-26 14:26:55 +0000422 volumeClaimTemplates:
423 - metadata:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100424 name: {{ include "common.fullname" . }}-data
jmac8d6dc962018-04-26 14:26:55 +0000425 labels:
426 name: {{ include "common.fullname" . }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100427 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100428 release: "{{ include "common.release" . }}"
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100429 heritage: "{{ .Release.Service }}"
jmac8d6dc962018-04-26 14:26:55 +0000430 spec:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100431 accessModes:
432 - {{ .Values.persistence.accessMode }}
433 storageClassName: {{ include "common.storageClass" . }}
jmac8d6dc962018-04-26 14:26:55 +0000434 resources:
435 requests:
436 storage: {{ .Values.persistence.size }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100437 {{- end }}