blob: 01d51a21f699c9a4207425ba1c1152e1d6bfad42 [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 }}
demskeq8b43e92c2021-02-12 15:43:48 +0100114 {{ if .Values.config.sdnr.oauth.enabled }}
115 - name: OAUTH_TOKEN_SECRET
116 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "oauth-token-secret" "key" "password") | indent 10 }}
117 - name: KEYCLOAK_SECRET
118 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keycloak-secret" "key" "password") | indent 10 }}
119
120 - name: ENABLE_ODLUX_RBAC
121 value: "{{ .Values.config.sdnr.oauth.odluxRbac.enabled | default "true" }}"
122 {{ end }}
demskeq89d26b332021-01-14 16:45:28 +0100123
Alexander Dehn2ae954d2020-10-20 15:57:42 +0000124
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100125 volumeMounts:
126 - mountPath: /config-input
127 name: config-input
128 - mountPath: /config
129 name: properties
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100130 image: {{ include "repositoryGenerator.image.envsubst" . }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100131 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
132 name: {{ include "common.name" . }}-update-config
Alexander Dehn9b797d62020-04-21 09:53:50 +0000133 {{ if .Values.dgbuilder.enabled -}}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100134 - command:
Sylvain Desbureaux1694e1d2020-08-21 09:58:25 +0200135 - /app/ready.py
jmac065e2ce2018-03-29 01:18:02 +0000136 args:
Alexander Dehn9b797d62020-04-21 09:53:50 +0000137 {{ if or .Values.dgbuilder.enabled .Values.config.sdnr.enabled -}}
jmac065e2ce2018-03-29 01:18:02 +0000138 - --container-name
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100139 - {{ include "common.mariadbService" . }}
Dan Timoney17554772021-04-01 15:49:23 -0400140 - --job-name
141 - {{ include "common.fullname" . }}-dbinit-job
Alexander Dehn9b797d62020-04-21 09:53:50 +0000142 {{ end -}}
143 {{ if .Values.config.sdnr.enabled -}}
144 - --container-name
145 - {{ include "common.name" . }}-sdnrdb-init-job
146 {{ end -}}
jmac065e2ce2018-03-29 01:18:02 +0000147 env:
148 - name: NAMESPACE
149 valueFrom:
150 fieldRef:
151 apiVersion: v1
152 fieldPath: metadata.namespace
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100153 image: {{ include "repositoryGenerator.image.readiness" . }}
jmac065e2ce2018-03-29 01:18:02 +0000154 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100155 name: {{ include "common.name" . }}-readiness
Alexander Dehn9b797d62020-04-21 09:53:50 +0000156 {{ end -}}
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200157{{ include "common.certInitializer.initContainer" . | indent 6 }}
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100158 - name: {{ include "common.name" . }}-chown
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100159 image: {{ include "repositoryGenerator.image.busybox" . }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000160 command:
161 - sh
162 args:
163 - -c
Dan Timoney2ee28a52021-01-15 16:39:50 -0500164 - |
Dan Timoney2ee28a52021-01-15 16:39:50 -0500165 mkdir {{ .Values.persistence.mdsalPath }}/journal
Remigiusz Janeczek42177a12020-12-10 13:10:15 +0100166 mkdir {{ .Values.persistence.mdsalPath }}/snapshots
demskeq83b3b7fd2021-02-18 09:41:59 +0100167 mkdir {{ .Values.persistence.mdsalPath }}/daexim
Dan Timoney2ee28a52021-01-15 16:39:50 -0500168 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.persistence.mdsalPath }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000169{{- if .Values.global.aafEnabled }}
Dan Timoney2ee28a52021-01-15 16:39:50 -0500170 chown -R {{ .Values.config.odlUid }}:{{ .Values.config.odlGid}} {{ .Values.certInitializer.credsPath }}
Lucjan Bryndza5c63e932020-06-25 08:43:23 +0000171{{- end }}
Timoney, Dan (dt5972)ba4d2eb2019-05-07 13:32:42 -0400172 volumeMounts:
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200173{{ include "common.certInitializer.volumeMount" . | indent 10 }}
Timoney, Dan (dt5972)ba4d2eb2019-05-07 13:32:42 -0400174 - mountPath: {{ .Values.persistence.mdsalPath }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100175 name: {{ include "common.fullname" . }}-data
jmac065e2ce2018-03-29 01:18:02 +0000176 containers:
177 - name: {{ include "common.name" . }}
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100178 image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
jmac065e2ce2018-03-29 01:18:02 +0000179 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
Piotr Marcinkiewicz598f2d82021-06-01 12:36:13 +0200180 {{- if .Values.global.cmpv2Enabled }}
Piotr Marcinkiewiczaf82e2b2021-02-11 11:23:31 +0100181 {{- $linkCommand := include "common.certManager.linkVolumeMounts" . }}
182 lifecycle:
183 postStart:
184 exec:
185 command: ["sh", "-c", {{$linkCommand | quote}} ]
186 {{- end }}
jmac065e2ce2018-03-29 01:18:02 +0000187 command: ["/bin/bash"]
Dan Timoney2ee28a52021-01-15 16:39:50 -0500188 args: ["-c", "/opt/onap/sdnc/bin/createLinks.sh ; /opt/onap/sdnc/bin/startODL.sh"]
jmac065e2ce2018-03-29 01:18:02 +0000189 ports:
190 - containerPort: {{ .Values.service.internalPort }}
191 - containerPort: {{ .Values.service.internalPort2 }}
192 - containerPort: {{ .Values.service.internalPort3 }}
193 - containerPort: {{ .Values.service.clusterPort }}
demskeq827854662021-04-08 14:49:47 +0200194 {{- if .Values.config.sdnr.netconfCallHome.enabled }}
195 - containerPort: {{ .Values.service.callHomePort }}
196 {{- end }}
jmac065e2ce2018-03-29 01:18:02 +0000197 readinessProbe:
198 tcpSocket:
199 port: {{ .Values.service.internalPort }}
200 initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
201 periodSeconds: {{ .Values.readiness.periodSeconds }}
202 env:
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100203 - name: MYSQL_ROOT_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100204 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-root-password" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100205 - name: ODL_ADMIN_USERNAME
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100206 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500207 - name: ODL_USER
208 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "login") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100209 - name: ODL_ADMIN_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100210 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500211 - name: ODL_PASSWORD
212 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "odl-creds" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100213 - name: SDNC_DB_USER
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100214 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100215 - name: SDNC_DB_PASSWORD
Krzysztof Opasiakab7a6bb2020-03-24 03:30:51 +0100216 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
Dan Timoney9e310e72021-02-23 11:25:39 -0500217 - name: MYSQL_USER
218 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "login") | indent 12 }}
219 - name: MYSQL_PASSWORD
220 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 12 }}
221 - name: MYSQL_DATABASE
222 value: "{{ .Values.config.dbSdnctlDatabase }}"
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100223 - name: SDNC_CONFIG_DIR
224 value: "{{ .Values.config.configDir }}"
Dan Timoney9e310e72021-02-23 11:25:39 -0500225 - name: AAI_CLIENT_NAME
226 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "login") | indent 12 }}
227 - name: AAI_CLIENT_PASSWORD
228 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-user-creds" "key" "password") | indent 12 }}
229 - name: AAI_TRUSTSTORE_PASSWORD
230 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "aai-truststore-password" "key" "password") | indent 12 }}
231 - name: ANSIBLE_TRUSTSTORE_PASSWORD
232 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "ansible-truststore-password" "key" "password") | indent 12 }}
233 - name: SO_USER
234 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "login") | indent 12 }}
235 - name: SO_PASSWORD
236 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "so-user-creds" "key" "password") | indent 12 }}
237 - name: NENG_USER
238 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "login") | indent 12 }}
239 - name: NENG_PASSWORD
240 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "neng-user-creds" "key" "password") | indent 12 }}
241 - name: CDS_USER
242 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "login") | indent 12 }}
243 - name: CDS_PASSWORD
244 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "cds-user-creds" "key" "password") | indent 12 }}
245 - name: HONEYCOMB_USER
246 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "login") | indent 12 }}
247 - name: HONEYCOMB_PASSWORD
248 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "honeycomb-user-creds" "key" "password") | indent 12 }}
249 - name: TRUSTSTORE_PASSWORD
250 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "truststore-password" "key" "password") | indent 12 }}
251 - name: KEYSTORE_PASSWORD
252 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "keystore-password" "key" "password") | indent 12 }}
253 - name: DMAAP_USER
254 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "login") | indent 12 }}
255 - name: DMAAP_PASSWORD
256 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-user-creds" "key" "password") | indent 12 }}
257 - name: DMAAP_AUTHKEY
258 {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "dmaap-authkey" "key" "password") | indent 12 }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100259 - name: ENABLE_ODL_CLUSTER
260 value: "{{ .Values.config.enableClustering }}"
261 - name: MY_ODL_CLUSTER
262 value: "{{ .Values.config.myODLCluster }}"
263 - name: PEER_ODL_CLUSTER
264 value: "{{ .Values.config.peerODLCluster }}"
265 - name: IS_PRIMARY_CLUSTER
266 value: "{{ .Values.config.isPrimaryCluster }}"
267 - name: GEO_ENABLED
268 value: "{{ .Values.config.geoEnabled}}"
269 - name: SDNC_AAF_ENABLED
270 value: "{{ .Values.global.aafEnabled}}"
271 - name: SDNC_REPLICAS
272 value: "{{ .Values.replicaCount }}"
273 - name: MYSQL_HOST
274 value: {{ include "common.mariadbService" . }}
Dan Timoney2ee28a52021-01-15 16:39:50 -0500275 - name: MDSAL_PATH
276 value: {{ .Values.persistence.mdsalPath }}
277 - name: DAEXIM_PATH
278 value: {{ .Values.persistence.daeximPath }}
279 - name: JOURNAL_PATH
280 value: {{ .Values.persistence.journalPath }}
281 - name: SNAPSHOTS_PATH
282 value: {{ .Values.persistence.snapshotsPath }}
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100283 - name: JAVA_HOME
284 value: "{{ .Values.config.javaHome}}"
Dan Timoneya98765b2020-09-14 11:57:55 -0400285 - name: JAVA_OPTS
286 value: "-Xms{{.Values.config.odl.javaOptions.minMemory}} -Xmx{{.Values.config.odl.javaOptions.maxMemory}}"
Sylvain Desbureauxbcf72512020-07-22 10:45:18 +0200287 - name: KARAF_CONSOLE_LOG_LEVEL
288 value: "{{ include "common.log.level" . }}"
Alexander Dehn9b797d62020-04-21 09:53:50 +0000289 - name: SDNRWT
290 value: "{{ .Values.config.sdnr.enabled | default "false"}}"
291 {{- if eq .Values.config.sdnr.mode "web" }}
292 - name: SDNRDM
293 value: "true"
294 {{- end }}
295 - name: SDNRONLY
296 value: "{{ .Values.config.sdnr.sdnronly | default "false" }}"
297 - name: SDNRDBURL
298 {{- $prefix := ternary "https" "http" .Values.global.aafEnabled}}
299 value: "{{$prefix}}://{{ .Values.elasticsearch.service.name | default "sdnrdb"}}.{{.Release.Namespace}}:{{.Values.elasticsearch.service.port | default "9200"}}"
300 {{- if .Values.config.sdnr.sdnrdbTrustAllCerts }}
301 - name: SDNRDBTRUSTALLCERTS
302 value: "true"
Piotr Marcinkiewiczaf82e2b2021-02-11 11:23:31 +0100303 {{- end }}
304 {{- if .Values.global.cmpv2Enabled }}
305 - name: ODL_CERT_DIR
306 value: {{ (mustFirst (.Values.certificates)).mountPath }}
307 {{- end }}
demskeq8b43e92c2021-02-12 15:43:48 +0100308 - name: ENABLE_OAUTH
309 value: "{{ .Values.config.sdnr.oauth.enabled | default "false" }}"
demskeq827854662021-04-08 14:49:47 +0200310 - name: SDNR_NETCONF_CALLHOME_ENABLED
311 value: "{{ .Values.config.sdnr.netconfCallHome.enabled | default "false" }}"
jmac065e2ce2018-03-29 01:18:02 +0000312 volumeMounts:
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200313{{ include "common.certInitializer.volumeMount" . | indent 10 }}
Piotr Marcinkiewicz598f2d82021-06-01 12:36:13 +0200314{{- if .Values.global.cmpv2Enabled }}
Piotr Marcinkiewicz59571012021-01-12 17:37:08 +0100315{{ include "common.certManager.volumeMounts" . | indent 10 }}
316{{- end }}
jmac065e2ce2018-03-29 01:18:02 +0000317 - mountPath: /etc/localtime
318 name: localtime
319 readOnly: true
320 - mountPath: /opt/opendaylight/current/etc/org.ops4j.pax.logging.cfg
321 name: sdnc-logging-cfg-config
322 subPath: org.ops4j.pax.logging.cfg
jmaca68f4cb2018-05-10 22:44:19 +0000323 - mountPath: {{ .Values.config.binDir }}/installSdncDb.sh
324 name: bin
jmac065e2ce2018-03-29 01:18:02 +0000325 subPath: installSdncDb.sh
Dan Timoney2ee28a52021-01-15 16:39:50 -0500326 - mountPath: {{ .Values.config.binDir }}/createLinks.sh
327 name: bin
328 subPath: createLinks.sh
Konrad Bańka5ea1db32020-04-06 14:32:46 +0200329 - mountPath: {{ .Values.config.ccsdkConfigDir }}/aaiclient.properties
330 name: properties
331 subPath: aaiclient.properties
jmaca68f4cb2018-05-10 22:44:19 +0000332 - mountPath: {{ .Values.config.configDir }}/aaiclient.properties
333 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000334 subPath: aaiclient.properties
jmaca68f4cb2018-05-10 22:44:19 +0000335 - mountPath: {{ .Values.config.configDir }}/dblib.properties
336 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000337 subPath: dblib.properties
jmac7c434672018-05-11 20:14:17 +0000338 - mountPath: {{ .Values.config.configDir }}/lcm-dg.properties
339 name: properties
340 subPath: lcm-dg.properties
jmaca68f4cb2018-05-10 22:44:19 +0000341 - mountPath: {{ .Values.config.configDir }}/svclogic.properties
342 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000343 subPath: svclogic.properties
344 - mountPath: /opt/onap/sdnc/svclogic/config/svclogic.properties
jmaca68f4cb2018-05-10 22:44:19 +0000345 name: properties
jmac065e2ce2018-03-29 01:18:02 +0000346 subPath: svclogic.properties
Alexis de Talhouët43c67e02018-09-20 16:49:16 -0400347 - mountPath: {{ .Values.config.configDir }}/netbox.properties
348 name: properties
349 subPath: netbox.properties
350 - mountPath: {{ .Values.config.configDir }}/blueprints-processor-adaptor.properties
351 name: properties
352 subPath: blueprints-processor-adaptor.properties
jmac8d6dc962018-04-26 14:26:55 +0000353 - mountPath: {{ .Values.persistence.mdsalPath }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100354 name: {{ include "common.fullname" . }}-data
jmac065e2ce2018-03-29 01:18:02 +0000355 - mountPath: /var/log/onap
356 name: logs
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -0400357 - mountPath: {{ .Values.config.odl.salConfigDir }}/{{ .Values.config.odl.salConfigVersion}}/sal-clustering-config-{{ .Values.config.odl.salConfigVersion}}-akkaconf.xml
358 name: properties
359 subPath: akka.conf
360 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.controller.cluster.datastore.cfg
361 name: properties
362 subPath: org.opendaylight.controller.cluster.datastore.cfg
Dan Timoney9520e7c2021-01-12 11:10:58 -0500363 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.aaa.filterchain.cfg
364 name: properties
365 subPath: org.opendaylight.aaa.filterchain.cfg
Timoney, Dan (dt5972)58774772019-08-21 16:50:54 -0400366 - mountPath: {{ .Values.config.odl.binDir }}/setenv
367 name: properties
368 subPath: setenv
Alexander Dehn9b797d62020-04-21 09:53:50 +0000369 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-registrar.properties
370 name: properties
371 subPath: mountpoint-registrar.properties
372 - mountPath: {{ .Values.config.odl.etcDir }}/mountpoint-state-provider.properties
373 name: properties
374 subPath: mountpoint-state-provider.properties
demskeq8a86300a2021-02-10 09:53:33 +0100375 - mountPath: {{ .Values.config.odl.etcDir }}/org.opendaylight.daexim.cfg
376 name: properties
377 subPath: org.opendaylight.daexim.cfg
demskeq8b43e92c2021-02-12 15:43:48 +0100378 {{- if .Values.config.sdnr.oauth.enabled }}
379 - mountPath: {{ .Values.config.odl.etcDir }}/oauth-provider.config.json
380 name: properties
381 subPath: oauth-provider.config.json
382 {{ end }}
Satoshi Fujii54bfd172021-07-04 16:39:41 +0000383 resources: {{ include "common.resources" . | nindent 12 }}
jmac065e2ce2018-03-29 01:18:02 +0000384 # side car containers
385 - name: filebeat-onap
Sylvain Desbureauxcbc703c2020-11-19 17:52:07 +0100386 image: {{ include "repositoryGenerator.image.logging" . }}
jmac065e2ce2018-03-29 01:18:02 +0000387 imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
388 volumeMounts:
389 - mountPath: /usr/share/filebeat/filebeat.yml
390 name: filebeat-conf
391 subPath: filebeat.yml
392 - mountPath: /var/log/onap
393 name: logs
394 - mountPath: /usr/share/filebeat/data
395 name: data-filebeat
Satoshi Fujii54bfd172021-07-04 16:39:41 +0000396 {{- if .Values.nodeSelector }}
397 nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
398 {{- end }}
399 {{- if .Values.affinity }}
400 affinity: {{ toYaml .Values.affinity | nindent 8 }}
401 {{- end }}
jmac8d6dc962018-04-26 14:26:55 +0000402 imagePullSecrets:
403 - name: "{{ include "common.namespace" . }}-docker-registry-key"
farida azmy32c5ed82021-08-04 14:46:09 +0200404 serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
jmac065e2ce2018-03-29 01:18:02 +0000405 volumes:
406 - name: localtime
407 hostPath:
408 path: /etc/localtime
409 - name: logs
410 emptyDir: {}
411 - name: data-filebeat
412 emptyDir: {}
413 - name: filebeat-conf
414 configMap:
415 name: {{ include "common.fullname" . }}-filebeat-configmap
416 - name: sdnc-logging-cfg-config
417 configMap:
418 name: {{ include "common.fullname" . }}-log-configmap
jmaca68f4cb2018-05-10 22:44:19 +0000419 - name: bin
jmac065e2ce2018-03-29 01:18:02 +0000420 configMap:
jmaca68f4cb2018-05-10 22:44:19 +0000421 name: {{ include "common.fullname" . }}-bin
422 defaultMode: 0755
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100423 - name: config-input
jmac065e2ce2018-03-29 01:18:02 +0000424 configMap:
jmaca68f4cb2018-05-10 22:44:19 +0000425 name: {{ include "common.fullname" . }}-properties
426 defaultMode: 0644
Krzysztof Opasiakcc97c732020-02-25 23:31:20 +0100427 - name: properties
428 emptyDir:
429 medium: Memory
jmac8d6dc962018-04-26 14:26:55 +0000430 {{ if not .Values.persistence.enabled }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100431 - name: {{ include "common.fullname" . }}-data
jmac8d6dc962018-04-26 14:26:55 +0000432 emptyDir: {}
433 {{ else }}
Krzysztof Opasiak8ab45472020-05-12 12:53:50 +0200434{{ include "common.certInitializer.volumes" . | nindent 8 }}
Piotr Marcinkiewicz598f2d82021-06-01 12:36:13 +0200435{{- if .Values.global.cmpv2Enabled }}
Piotr Marcinkiewicz59571012021-01-12 17:37:08 +0100436{{ include "common.certManager.volumes" . | nindent 8 }}
437{{- end }}
jmac8d6dc962018-04-26 14:26:55 +0000438 volumeClaimTemplates:
439 - metadata:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100440 name: {{ include "common.fullname" . }}-data
jmac8d6dc962018-04-26 14:26:55 +0000441 labels:
442 name: {{ include "common.fullname" . }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100443 chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
Krzysztof Opasiak137d7cc2020-01-24 23:49:11 +0100444 release: "{{ include "common.release" . }}"
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100445 heritage: "{{ .Release.Service }}"
jmac8d6dc962018-04-26 14:26:55 +0000446 spec:
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100447 accessModes:
448 - {{ .Values.persistence.accessMode }}
449 storageClassName: {{ include "common.storageClass" . }}
jmac8d6dc962018-04-26 14:26:55 +0000450 resources:
451 requests:
452 storage: {{ .Values.persistence.size }}
Sylvain Desbureaux25e01d52019-12-09 11:06:39 +0100453 {{- end }}