Merge "[AAI] Add model-loader tracing config"
[oom.git] / kubernetes / policy / values.yaml
1 # Copyright © 2017 Amdocs, Bell Canada
2 # Modifications Copyright © 2018-2020 AT&T Intellectual Property
3 # Modifications Copyright (C) 2021-2023 Nordix Foundation.
4 #
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #       http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16
17 #################################################################
18 # Global configuration defaults.
19 #################################################################
20 global:
21   mariadbGalera:
22     # flag to enable the DB creation via mariadb-operator
23     useOperator: true
24     # if useOperator set to "true", set "enableServiceAccount to "false"
25     # as the SA is created by the Operator
26     enableServiceAccount: false
27     localCluster: true
28     # '&mariadbConfig' means we "store" the values for  later use in the file
29     # with '*mariadbConfig' pointer.
30     config: &mariadbConfig
31       mysqlDatabase: policyadmin
32     service: &mariadbService
33       name: &policy-mariadb policy-mariadb
34       internalPort: 3306
35     nameOverride: *policy-mariadb
36     # (optional) if localCluster=false and an external secret is used set this variable
37     #userRootSecret: <secretName>
38   prometheusEnabled: false
39   postgres:
40     localCluster: false
41     service:
42       name: pgset
43       name2: tcp-pgset-primary
44       name3: tcp-pgset-replica
45     container:
46       name: postgres
47   kafkaBootstrap: strimzi-kafka-bootstrap:9092
48   policyKafkaUser: policy-kafka-user
49   kafkaTopics:
50     acRuntimeTopic:
51       name: policy.clamp-runtime-acm
52 #################################################################
53 # Secrets metaconfig
54 #################################################################
55 secrets:
56   - uid: db-root-password
57     name: &dbRootPassSecretName '{{ include "common.release" . }}-policy-db-root-password'
58     type: password
59     externalSecret: '{{ .Values.global.mariadbGalera.localCluster |
60       ternary (( hasSuffix "policy-db-root-password" (index .Values "mariadb-galera" "rootUser" "externalSecret")) |
61                ternary
62                   ""
63                   (tpl (default "" (index .Values "mariadb-galera" "rootUser" "externalSecret")) .)
64                )
65                ( (not (empty (default "" .Values.global.mariadbGalera.userRootSecret))) |
66                  ternary
67                    .Values.global.mariadbGalera.userRootSecret
68                    (include "common.mariadb.secret.rootPassSecretName"
69                      (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)
70                    )
71                ) }}'
72     password: '{{ (index .Values "mariadb-galera" "rootUser" "password") }}'
73     policy: generate
74   - uid: db-secret
75     name: &dbSecretName '{{ include "common.release" . }}-policy-db-secret'
76     type: basicAuth
77     externalSecret: '{{ ternary "" (tpl (default "" (index .Values "mariadb-galera" "db" "externalSecret")) .) (hasSuffix "policy-db-secret" (index .Values "mariadb-galera" "db" "externalSecret"))}}'
78     login: '{{ index .Values "mariadb-galera" "db" "user" }}'
79     password: '{{ index .Values "mariadb-galera" "db" "password" }}'
80     passwordPolicy: generate
81   - uid: policy-app-user-creds
82     name: &policyAppCredsSecret '{{ include "common.release" . }}-policy-app-user-creds'
83     type: basicAuth
84     externalSecret: '{{ tpl (default "" .Values.config.policyAppUserExternalSecret) . }}'
85     login: '{{ .Values.config.policyAppUserName }}'
86     password: '{{ .Values.config.policyAppUserPassword }}'
87     passwordPolicy: generate
88   - uid: policy-pap-user-creds
89     name: &policyPapCredsSecret '{{ include "common.release" . }}-policy-pap-user-creds'
90     type: basicAuth
91     externalSecret: '{{ tpl (default "" .Values.restServer.policyPapUserExternalSecret) . }}'
92     login: '{{ .Values.restServer.policyPapUserName }}'
93     password: '{{ .Values.restServer.policyPapUserPassword }}'
94     passwordPolicy: required
95   - uid: policy-api-user-creds
96     name: &policyApiCredsSecret '{{ include "common.release" . }}-policy-api-user-creds'
97     type: basicAuth
98     externalSecret: '{{ tpl (default "" .Values.restServer.policyApiUserExternalSecret) . }}'
99     login: '{{ .Values.restServer.policyApiUserName }}'
100     password: '{{ .Values.restServer.policyApiUserPassword }}'
101     passwordPolicy: required
102
103 db: &dbSecretsHook
104   credsExternalSecret: *dbSecretName
105
106 policy-api:
107   enabled: true
108   db: *dbSecretsHook
109   restServer:
110     apiUserExternalSecret: *policyApiCredsSecret
111   config:
112     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
113 policy-pap:
114   enabled: true
115   db: *dbSecretsHook
116   restServer:
117     papUserExternalSecret: *policyPapCredsSecret
118     apiUserExternalSecret: *policyApiCredsSecret
119   config:
120     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
121 policy-xacml-pdp:
122   enabled: true
123   db: *dbSecretsHook
124   config:
125     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
126 policy-apex-pdp:
127   enabled: true
128   db: *dbSecretsHook
129   config:
130     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
131 policy-drools-pdp:
132   enabled: false
133   db: *dbSecretsHook
134   config:
135     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
136 policy-distribution:
137   enabled: true
138   db: *dbSecretsHook
139 policy-clamp-ac-k8s-ppnt:
140   enabled: true
141 policy-clamp-ac-pf-ppnt:
142   enabled: true
143   restServer:
144     apiUserExternalSecret: *policyApiCredsSecret
145     papUserExternalSecret: *policyPapCredsSecret
146 policy-clamp-ac-http-ppnt:
147   enabled: true
148 policy-clamp-ac-a1pms-ppnt:
149   enabled: true
150 policy-clamp-ac-kserve-ppnt:
151   enabled: true
152 policy-clamp-runtime-acm:
153   enabled: true
154   db: *dbSecretsHook
155   config:
156     appUserExternalSecret: *policyAppCredsSecret
157 policy-nexus:
158   enabled: false
159   config:
160     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
161 policy-gui:
162   enabled: false
163   config:
164     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
165
166 #################################################################
167 # DB configuration defaults.
168 #################################################################
169
170 dbmigrator:
171   image: onap/policy-db-migrator:3.1.0
172   schema: policyadmin
173   policy_home: "/opt/app/policy"
174
175 subChartsOnly:
176   enabled: true
177
178 # flag to enable debugging - application support required
179 debugEnabled: false
180
181 # default number of instances
182 replicaCount: 1
183
184 nodeSelector: {}
185
186 affinity: {}
187
188 # probe configuration parameters
189 liveness:
190   initialDelaySeconds: 10
191   periodSeconds: 10
192   # necessary to disable liveness probe when setting breakpoints
193   # in debugger so K8s doesn't restart unresponsive container
194   enabled: true
195
196 readiness:
197   initialDelaySeconds: 10
198   periodSeconds: 10
199
200
201 config:
202   policyAppUserName: runtimeUser
203   policyPdpPapTopic:
204     name: policy-pdp-pap
205     partitions: 10
206     retentionMs: 7200000
207     segmentBytes: 1073741824
208     consumer:
209       groupId: policy-group
210   policyHeartbeatTopic:
211     name: policy-heartbeat
212     partitions: 10
213     retentionMs: 7200000
214     segmentBytes: 1073741824
215     consumer:
216       groupId: policy-group
217   policyNotificationTopic:
218     name: policy-notification
219     partitions: 10
220     retentionMs: 7200000
221     segmentBytes: 1073741824
222     consumer:
223       groupId: policy-group
224   someConfig: blah
225
226 mariadb-galera:
227   # mariadb-galera.config and global.mariadbGalera.config must be equals
228   db:
229     user: policy-user
230     # password:
231     externalSecret: *dbSecretName
232     name: &mysqlDbName policyadmin
233   rootUser:
234     externalSecret: *dbRootPassSecretName
235   nameOverride: *policy-mariadb
236   # mariadb-galera.service and global.mariadbGalera.service must be equals
237   service: *mariadbService
238   replicaCount: 1
239   mariadbOperator:
240     galera:
241       enabled: false
242   persistence:
243     enabled: true
244     mountSubPath: policy/maria/data
245   serviceAccount:
246     nameOverride: *policy-mariadb
247
248 postgresImage: library/postgres:latest
249 # application configuration override for postgres
250 postgres:
251   nameOverride: &postgresName policy-postgres
252   service:
253     name: *postgresName
254     name2: policy-pg-primary
255     name3: policy-pg-replica
256   container:
257     name:
258       primary: policy-pg-primary
259       replica: policy-pg-replica
260   persistence:
261     mountSubPath: policy/postgres/data
262     mountInitPath: policy
263   config:
264     pgUserName: policy-user
265     pgDatabase: policyadmin
266     pgUserExternalSecret: *dbSecretName
267     pgRootPasswordExternalSecret: *dbRootPassSecretName
268
269 readinessCheck:
270   wait_for_postgres:
271     services:
272       - '{{ .Values.global.postgres.service.name2 }}'
273   wait_for_mariadb:
274     services:
275       - '{{ include "common.mariadbService" . }}'
276
277 restServer:
278   policyPapUserName: policyadmin
279   policyPapUserPassword: zb!XztG34
280   policyApiUserName: policyadmin
281   policyApiUserPassword: zb!XztG34
282
283 # Resource Limit flavor -By Default using small
284 # Segregation for Different environment (small, large, or unlimited)
285 flavor: small
286 resources:
287   small:
288     limits:
289       cpu: "1"
290       memory: "4Gi"
291     requests:
292       cpu: "100m"
293       memory: "1Gi"
294   large:
295     limits:
296       cpu: "2"
297       memory: "8Gi"
298     requests:
299       cpu: "200m"
300       memory: "2Gi"
301   unlimited: {}
302
303 #Pods Service Account
304 serviceAccount:
305   nameOverride: policy
306   roles:
307     - read