blob: 8a844f4e9d79e6a56f350954d0e4de5e9ac09723 [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:
Alexander Dehn9b797d62020-04-21 09:53:50 +000023 selector: {{- include "common.selectors" . | nindent 4 }}
Andreas Geissler2af50792023-03-27 17:11:27 +020024 serviceName: {{ include "common.servicename" . }}-cluster
jmac065e2ce2018-03-29 01:18:02 +000025 podManagementPolicy: Parallel
Andreas Geissler2af50792023-03-27 17:11:27 +020026 replicas: {{ .Values.replicaCount }}
jmac065e2ce2018-03-29 01:18:02 +000027 template:
Alexander Dehn9b797d62020-04-21 09:53:50 +000028 metadata: {{- include "common.templateMetadata" . | nindent 6 }}
jmac065e2ce2018-03-29 01:18:02 +000029 spec:
30 initContainers:
31 - command:
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010032 - sh
33 args:
34 - -c
35 - "cd /config-input && for PFILE in `ls -1 .`; do envsubst <${PFILE} >/config/${PFILE}; done"
36 env:
37 - name: AAI_CLIENT_NAME
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010038 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010039 - name: AAI_CLIENT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010040 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 10 }}
Dan Timoney9e310e72021-02-23 11:25:39 -050041 - name: AAI_TRUSTSTORE_PASSWORD
42 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-truststore-password" "key" "password") | indent 10 }}
43 - name: ANSIBLE_TRUSTSTORE_PASSWORD
44 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-truststore-password" "key" "password") | indent 10 }}
45 - name: SO_USER
46 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "login") | indent 10 }}
47 - name: SO_PASSWORD
48 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "password") | indent 10 }}
49 - name: NENG_USER
50 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "login") | indent 10 }}
51 - name: NENG_PASSWORD
52 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "password") | indent 10 }}
53 - name: CDS_USER
54 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "login") | indent 10 }}
55 - name: CDS_PASSWORD
56 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "password") | indent 10 }}
57 - name: HONEYCOMB_USER
58 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "login") | indent 10 }}
59 - name: HONEYCOMB_PASSWORD
60 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "password") | indent 10 }}
61 - name: TRUSTSTORE_PASSWORD
62 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 10 }}
63 - name: KEYSTORE_PASSWORD
64 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 10 }}
65 - name: DMAAP_USER
66 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "login") | indent 10 }}
67 - name: DMAAP_PASSWORD
68 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "password") | indent 10 }}
69 - name: DMAAP_AUTHKEY
70 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-authkey" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010071 - name: MODELSERVICE_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010072 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010073 - name: MODELSERVICE_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010074 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "modeling-user-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010075 - name: RESTCONF_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010076 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010077 - name: RESTCONF_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010078 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "restconf-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010079 - name: ANSIBLE_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010080 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010081 - name: ANSIBLE_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010082 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010083 - name: SCALEOUT_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010084 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010085 - name: SCALEOUT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010086 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "scaleout-creds" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010087 - name: NETBOX_APIKEY
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010088 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "netbox-apikey" "key" "password") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010089 - name: SDNC_DB_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010090 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +010091 - name: SDNC_DB_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +010092 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
Dan Timoney9e310e72021-02-23 11:25:39 -050093 - name: MYSQL_USER
94 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 10 }}
95 - name: MYSQL_PASSWORD
96 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
Alexander Dehn2ae954d2020-10-20 15:57:42 +000097 - name: ODL_ADMIN_USERNAME
98 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
Dan Timoney9e310e72021-02-23 11:25:39 -050099 - name: ODL_USER
100 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 10 }}
Alexander Dehn2ae954d2020-10-20 15:57:42 +0000101 - name: ODL_ADMIN_PASSWORD
102 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500103 - name: ODL_PASSWORD
104 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 10 }}
demskeq89d26b332021-01-14 16:45:28 +0100105 {{ if and .Values.config.sdnr.dmaapProxy.enabled .Values.config.sdnr.dmaapProxy.usepwd }}
106 - name: DMAAP_HTTP_PROXY_USERNAME
107 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "login") | indent 10 }}
108 - name: DMAAP_HTTP_PROXY_PASSWORD
109 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-proxy-creds" "key" "password") | indent 10 }}
110 {{- end }}
demskeq8b43e92c2021-02-12 15:43:48 +0100111 {{ if .Values.config.sdnr.oauth.enabled }}
112 - name: OAUTH_TOKEN_SECRET
113 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "oauth-token-secret" "key" "password") | indent 10 }}
114 - name: KEYCLOAK_SECRET
115 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keycloak-secret" "key" "password") | indent 10 }}
demskeq8b43e92c2021-02-12 15:43:48 +0100116 - name: ENABLE_ODLUX_RBAC
117 value: "{{ .Values.config.sdnr.oauth.odluxRbac.enabled | default "true" }}"
118 {{ end }}
demskeq89d26b332021-01-14 16:45:28 +0100119
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100120 volumeMounts:
121 - mountPath: /config-input
122 name: config-input
123 - mountPath: /config
124 name: properties
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100125 image: {{ include "repositoryGenerator.image.envsubst" . }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100126 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
127 name: {{ include "common.name" . }}-update-config
demskeq8aa803d02021-11-03 11:56:45 +0100128 {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100129 - command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +0200130 - /app/ready.py
jmac065e2ce2018-03-29 01:18:02 +0000131 args:
demskeq8aa803d02021-11-03 11:56:45 +0100132 {{ if .Values.dgbuilder.enabled -}}
jmac065e2ce2018-03-29 01:18:02 +0000133 - --container-name
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100134 - {{ include "common.mariadbService" . }}
Dan Timoney17554772021-04-01 15:49:23 -0400135 - --job-name
136 - {{ include "common.fullname" . }}-dbinit-job
Alexander Dehn9b797d62020-04-21 09:53:50 +0000137 {{ end -}}
138 {{ if .Values.config.sdnr.enabled -}}
demskeq8ad745682021-11-03 10:50:38 +0100139 - --job-name
140 - {{ include "common.fullname" . }}-sdnrdb-init-job
Alexander Dehn9b797d62020-04-21 09:53:50 +0000141 {{ end -}}
jmac065e2ce2018-03-29 01:18:02 +0000142 env:
143 - name: NAMESPACE
144 valueFrom:
145 fieldRef:
146 apiVersion: v1
147 fieldPath: metadata.namespace
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100148 image: {{ include "repositoryGenerator.image.readiness" . }}
jmac065e2ce2018-03-29 01:18:02 +0000149 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100150 name: {{ include "common.name" . }}-readiness
Andreas Geissler2af50792023-03-27 17:11:27 +0200151 {{ end }}
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100152 - name: {{ include "common.name" . }}-chown
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100153 image: {{ include "repositoryGenerator.image.busybox" . }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000154 command:
155 - sh
156 args:
157 - -c
Dan Timoney2ee28a52021-01-15 16:39:50 -0500158 - |
Dan Timoney2ee28a52021-01-15 16:39:50 -0500159 mkdir {{ .Values.persistence.mdsalPath }}/journal
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100160 mkdir {{ .Values.persistence.mdsalPath }}/snapshots
demskeq83b3b7fd2021-02-18 09:41:59 +0100161 mkdir {{ .Values.persistence.mdsalPath }}/daexim
Dan Timoney2ee28a52021-01-15 16:39:50 -0500162 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
Timoney, Dan (dt5972)ba4d2eb2019-05-07 13:32:42 -0400163 volumeMounts:
164 - 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 Marcinkiewicz598f2d82021-06-01 12:36:13 +0200170 {{- if .Values.global.cmpv2Enabled }}
Piotr Marcinkiewiczaf82e2b2021-02-11 11:23:31 +0100171 {{- $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 }}
demskeq827854662021-04-08 14:49:47 +0200184 {{- if .Values.config.sdnr.netconfCallHome.enabled }}
185 - containerPort: {{ .Values.service.callHomePort }}
186 {{- end }}
jmac065e2ce2018-03-29 01:18:02 +0000187 readinessProbe:
188 tcpSocket:
189 port: {{ .Values.service.internalPort }}
190 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
191 periodSeconds: {{ .Values.readiness.periodSeconds }}
192 env:
demskeq8aa803d02021-11-03 11:56:45 +0100193 {{ if and .Values.config.sdnr.enabled .Values.config.sdnr.sdnronly -}}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100194 - name: MYSQL_ROOT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100195 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
demskeq8aa803d02021-11-03 11:56:45 +0100196 {{ end -}}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100197 - name: ODL_ADMIN_USERNAME
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100198 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500199 - name: ODL_USER
200 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100201 - name: ODL_ADMIN_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100202 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500203 - name: ODL_PASSWORD
204 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100205 - name: SDNC_DB_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100206 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100207 - name: SDNC_DB_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100208 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500209 - name: MYSQL_USER
210 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
211 - name: MYSQL_PASSWORD
212 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
213 - name: MYSQL_DATABASE
214 value: "{{ .Values.config.dbSdnctlDatabase }}"
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100215 - name: SDNC_CONFIG_DIR
216 value: "{{ .Values.config.configDir }}"
Dan Timoney9e310e72021-02-23 11:25:39 -0500217 - name: AAI_CLIENT_NAME
218 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 12 }}
219 - name: AAI_CLIENT_PASSWORD
220 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 12 }}
221 - name: AAI_TRUSTSTORE_PASSWORD
222 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-truststore-password" "key" "password") | indent 12 }}
223 - name: ANSIBLE_TRUSTSTORE_PASSWORD
224 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-truststore-password" "key" "password") | indent 12 }}
225 - name: SO_USER
226 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "login") | indent 12 }}
227 - name: SO_PASSWORD
228 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "password") | indent 12 }}
229 - name: NENG_USER
230 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "login") | indent 12 }}
231 - name: NENG_PASSWORD
232 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "password") | indent 12 }}
233 - name: CDS_USER
234 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "login") | indent 12 }}
235 - name: CDS_PASSWORD
236 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "password") | indent 12 }}
237 - name: HONEYCOMB_USER
238 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "login") | indent 12 }}
239 - name: HONEYCOMB_PASSWORD
240 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "password") | indent 12 }}
241 - name: TRUSTSTORE_PASSWORD
242 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }}
243 - name: KEYSTORE_PASSWORD
244 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }}
245 - name: DMAAP_USER
246 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "login") | indent 12 }}
247 - name: DMAAP_PASSWORD
248 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "password") | indent 12 }}
249 - name: DMAAP_AUTHKEY
250 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-authkey" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100251 - name: ENABLE_ODL_CLUSTER
252 value: "{{ .Values.config.enableClustering }}"
253 - name: MY_ODL_CLUSTER
254 value: "{{ .Values.config.myODLCluster }}"
255 - name: PEER_ODL_CLUSTER
256 value: "{{ .Values.config.peerODLCluster }}"
257 - name: IS_PRIMARY_CLUSTER
258 value: "{{ .Values.config.isPrimaryCluster }}"
259 - name: GEO_ENABLED
260 value: "{{ .Values.config.geoEnabled}}"
261 - name: SDNC_AAF_ENABLED
Andreas Geissler2af50792023-03-27 17:11:27 +0200262 value: "false"
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100263 - name: SDNC_REPLICAS
264 value: "{{ .Values.replicaCount }}"
265 - name: MYSQL_HOST
266 value: {{ include "common.mariadbService" . }}
Dan Timoney2ee28a52021-01-15 16:39:50 -0500267 - name: MDSAL_PATH
268 value: {{ .Values.persistence.mdsalPath }}
269 - name: DAEXIM_PATH
270 value: {{ .Values.persistence.daeximPath }}
271 - name: JOURNAL_PATH
272 value: {{ .Values.persistence.journalPath }}
273 - name: SNAPSHOTS_PATH
274 value: {{ .Values.persistence.snapshotsPath }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100275 - name: JAVA_HOME
276 value: "{{ .Values.config.javaHome}}"
Dan Timoneya98765b2020-09-14 11:57:55 -0400277 - name: JAVA_OPTS
278 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
Dan Timoney1426fed2021-12-14 08:30:10 -0500279 - name: LOG4J_FORMAT_MSG_NO_LOOKUPS
280 value: "true"
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +0200281 - name: KARAF_CONSOLE_LOG_LEVEL
282 value: "{{ include "common.log.level" . }}"
Alexander Dehn9b797d62020-04-21 09:53:50 +0000283 - name: SDNRWT
284 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
285 {{- if eq .Values.config.sdnr.mode "web" }}
286 - name: SDNRDM
287 value: "true"
288 {{- end }}
289 - name: SDNRONLY
290 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
291 - name: SDNRDBURL
Andreas Geissler2af50792023-03-27 17:11:27 +0200292 value: "http://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
Alexander Dehn9b797d62020-04-21 09:53:50 +0000293 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
294 - name: SDNRDBTRUSTALLCERTS
295 value: "true"
Piotr Marcinkiewiczaf82e2b2021-02-11 11:23:31 +0100296 {{- end }}
297 {{- if .Values.global.cmpv2Enabled }}
298 - name: ODL_CERT_DIR
299 value: {{ (mustFirst (.Values.certificates)).mountPath }}
300 {{- end }}
demskeq8b43e92c2021-02-12 15:43:48 +0100301 - name: ENABLE_OAUTH
302 value: "{{ .Values.config.sdnr.oauth.enabled | default "false" }}"
demskeq827854662021-04-08 14:49:47 +0200303 - name: SDNR_NETCONF_CALLHOME_ENABLED
304 value: "{{ .Values.config.sdnr.netconfCallHome.enabled | default "false" }}"
sebdetb205f402021-10-20 12:16:02 +0200305 - name: SDNR_VES_COLLECTOR_ENABLED
306 value: "{{ .Values.config.sdnr.vesCollector.enabled }}"
307 - name: SDNR_VES_COLLECTOR_TLS_ENABLED
308 value: "{{ .Values.config.sdnr.vesCollector.tls.enabled }}"
309 - name: SDNR_VES_COLLECTOR_TRUST_ALL_CERTS
310 value: "{{ .Values.config.sdnr.vesCollector.trustAllCertificates }}"
311 - name: SDNR_VES_COLLECTOR_IP
312 value: "{{ .Values.config.sdnr.vesCollector.address }}"
313 - name: SDNR_VES_COLLECTOR_PORT
314 value: "{{ .Values.config.sdnr.vesCollector.port }}"
315 - name: SDNR_VES_COLLECTOR_VERSION
316 value: "{{ .Values.config.sdnr.vesCollector.version | default "v7" }}"
317 - name: SDNR_VES_COLLECTOR_REPORTING_ENTITY_NAME
318 value: "{{ .Values.config.sdnr.vesCollector.reportingEntityName | default "ONAP SDN-R" }}"
319 - name: SDNR_VES_COLLECTOR_EVENTLOG_MSG_DETAIL
320 value: "{{ .Values.config.sdnr.vesCollector.eventLogMsgDetail | default "SHORT" }}"
321 - name: SDNR_VES_COLLECTOR_USERNAME
322 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ves-collector-secret" "key" "login") | indent 12 }}
323 - name: SDNR_VES_COLLECTOR_PASSWORD
324 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ves-collector-secret" "key" "password") | indent 12 }}
325
jmac065e2ce2018-03-29 01:18:02 +0000326 volumeMounts:
Piotr Marcinkiewicz598f2d82021-06-01 12:36:13 +0200327{{- if .Values.global.cmpv2Enabled }}
Piotr Marcinkiewicz59571012021-01-12 17:37:08 +0100328{{ include "common.certManager.volumeMounts" . | indent 10 }}
329{{- end }}
jmac065e2ce2018-03-29 01:18:02 +0000330 - mountPath: /etc/localtime
331 name: localtime
332 readOnly: true
333 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
334 name: sdnc-logging-cfg-config
335 subPath: org.ops4j.pax.logging.cfg
jmaca68f4cb2018-05-10 22:44:19 +0000336 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
337 name: bin
jmac065e2ce2018-03-29 01:18:02 +0000338 subPath: installSdncDb.sh
Dan Timoney2ee28a52021-01-15 16:39:50 -0500339 - mountPath: {{ .Values.config.binDir }}/createLinks.sh
340 name: bin
341 subPath: createLinks.sh
Konrad Bańka5ea1db32020-04-06 14:32:46 +0200342 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
343 name: properties
344 subPath: aaiclient.properties
jmaca68f4cb2018-05-10 22:44:19 +0000345 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
346 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000347 subPath: aaiclient.properties
jmaca68f4cb2018-05-10 22:44:19 +0000348 - mountPath: {{ .Values.config.configDir }}/dblib.properties
349 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000350 subPath: dblib.properties
jmac7c434672018-05-11 20:14:17 +0000351 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
352 name: properties
353 subPath: lcm-dg.properties
jmaca68f4cb2018-05-10 22:44:19 +0000354 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
355 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000356 subPath: svclogic.properties
357 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
jmaca68f4cb2018-05-10 22:44:19 +0000358 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000359 subPath: svclogic.properties
Alexis de Talhouët43c67e02018-09-20 16:49:16 -0400360 - mountPath: {{ .Values.config.configDir }}/netbox.properties
361 name: properties
362 subPath: netbox.properties
363 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
364 name: properties
365 subPath: blueprints-processor-adaptor.properties
jmac8d6dc962018-04-26 14:26:55 +0000366 - mountPath: {{ .Values.persistence.mdsalPath }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100367 name: {{ include "common.fullname" . }}-data
Maciej Wereski537d71e2021-11-03 13:31:44 +0000368 - mountPath: {{ .Values.log.path }}
jmac065e2ce2018-03-29 01:18:02 +0000369 name: logs
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -0400370 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
371 name: properties
372 subPath: akka.conf
373 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
374 name: properties
375 subPath: org.opendaylight.controller.cluster.datastore.cfg
Dan Timoney9520e7c2021-01-12 11:10:58 -0500376 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg
377 name: properties
378 subPath: org.opendaylight.aaa.filterchain.cfg
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -0400379 - mountPath: {{ .Values.config.odl.binDir }}/setenv
380 name: properties
381 subPath: setenv
Alexander Dehn9b797d62020-04-21 09:53:50 +0000382 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
383 name: properties
384 subPath: mountpoint-registrar.properties
385 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
386 name: properties
387 subPath: mountpoint-state-provider.properties
demskeq8a86300a2021-02-10 09:53:33 +0100388 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg
389 name: properties
390 subPath: org.opendaylight.daexim.cfg
demskeq8b43e92c2021-02-12 15:43:48 +0100391 {{- if .Values.config.sdnr.oauth.enabled }}
392 - mountPath: {{ .Values.config.odl.etcDir }}/oauth-provider.config.json
393 name: properties
394 subPath: oauth-provider.config.json
395 {{ end }}
Satoshi Fujii54bfd172021-07-04 16:39:41 +0000396 resources: {{ include "common.resources" . | nindent 12 }}
jmac065e2ce2018-03-29 01:18:02 +0000397 # side car containers
Maciej Wereski537d71e2021-11-03 13:31:44 +0000398 {{ include "common.log.sidecar" . | nindent 8 }}
Satoshi Fujii54bfd172021-07-04 16:39:41 +0000399 {{- if .Values.nodeSelector }}
400 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
401 {{- end }}
402 {{- if .Values.affinity }}
403 affinity: {{ toYaml .Values.affinity | nindent 8 }}
404 {{- end }}
jmac8d6dc962018-04-26 14:26:55 +0000405 imagePullSecrets:
406 - name: "{{ include "common.namespace" . }}-docker-registry-key"
farida azmy32c5ed82021-08-04 14:46:09 +0200407 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
jmac065e2ce2018-03-29 01:18:02 +0000408 volumes:
409 - name: localtime
410 hostPath:
411 path: /etc/localtime
412 - name: logs
413 emptyDir: {}
Maciej Wereski537d71e2021-11-03 13:31:44 +0000414 {{ include "common.log.volumes" . | nindent 8 }}
jmac065e2ce2018-03-29 01:18:02 +0000415 - name: sdnc-logging-cfg-config
416 configMap:
417 name: {{ include "common.fullname" . }}-log-configmap
jmaca68f4cb2018-05-10 22:44:19 +0000418 - name: bin
jmac065e2ce2018-03-29 01:18:02 +0000419 configMap:
jmaca68f4cb2018-05-10 22:44:19 +0000420 name: {{ include "common.fullname" . }}-bin
421 defaultMode: 0755
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100422 - name: config-input
jmac065e2ce2018-03-29 01:18:02 +0000423 configMap:
jmaca68f4cb2018-05-10 22:44:19 +0000424 name: {{ include "common.fullname" . }}-properties
425 defaultMode: 0644
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100426 - name: properties
427 emptyDir:
428 medium: Memory
jmac8d6dc962018-04-26 14:26:55 +0000429 {{ if not .Values.persistence.enabled }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100430 - name: {{ include "common.fullname" . }}-data
jmac8d6dc962018-04-26 14:26:55 +0000431 emptyDir: {}
432 {{ else }}
Piotr Marcinkiewicz598f2d82021-06-01 12:36:13 +0200433{{- if .Values.global.cmpv2Enabled }}
Piotr Marcinkiewicz59571012021-01-12 17:37:08 +0100434{{ include "common.certManager.volumes" . | nindent 8 }}
435{{- end }}
jmac8d6dc962018-04-26 14:26:55 +0000436 volumeClaimTemplates:
437 - metadata:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100438 name: {{ include "common.fullname" . }}-data
jmac8d6dc962018-04-26 14:26:55 +0000439 labels:
440 name: {{ include "common.fullname" . }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100441 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100442 release: "{{ include "common.release" . }}"
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100443 heritage: "{{ .Release.Service }}"
jmac8d6dc962018-04-26 14:26:55 +0000444 spec:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100445 accessModes:
446 - {{ .Values.persistence.accessMode }}
447 storageClassName: {{ include "common.storageClass" . }}
jmac8d6dc962018-04-26 14:26:55 +0000448 resources:
449 requests:
450 storage: {{ .Values.persistence.size }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100451 {{- end }}