Merge "[POSTGRES][COMMON] Add support for postgres operator"
[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   #Strimzi Kafka properties
48   useStrimziKafka: true
49   # Temporary flag to disable strimzi for pf components - will be removed after native kafka support is added for drools and xacml
50   useStrimziKafkaPf: false
51   kafkaBootstrap: strimzi-kafka-bootstrap
52   policyKafkaUser: policy-kafka-user
53   kafkaTopics:
54     acRuntimeTopic:
55       name: policy.clamp-runtime-acm
56
57 #################################################################
58 # Secrets metaconfig
59 #################################################################
60 secrets:
61   - uid: db-root-password
62     name: &dbRootPassSecretName '{{ include "common.release" . }}-policy-db-root-password'
63     type: password
64     externalSecret: '{{ .Values.global.mariadbGalera.localCluster |
65       ternary (( hasSuffix "policy-db-root-password" (index .Values "mariadb-galera" "rootUser" "externalSecret")) |
66                ternary
67                   ""
68                   (tpl (default "" (index .Values "mariadb-galera" "rootUser" "externalSecret")) .)
69                )
70                ( (not (empty (default "" .Values.global.mariadbGalera.userRootSecret))) |
71                  ternary
72                    .Values.global.mariadbGalera.userRootSecret
73                    (include "common.mariadb.secret.rootPassSecretName"
74                      (dict "dot" . "chartName" .Values.global.mariadbGalera.nameOverride)
75                    )
76                ) }}'
77     password: '{{ (index .Values "mariadb-galera" "rootUser" "password") }}'
78     policy: generate
79   - uid: db-secret
80     name: &dbSecretName '{{ include "common.release" . }}-policy-db-secret'
81     type: basicAuth
82     externalSecret: '{{ ternary "" (tpl (default "" (index .Values "mariadb-galera" "db" "externalSecret")) .) (hasSuffix "policy-db-secret" (index .Values "mariadb-galera" "db" "externalSecret"))}}'
83     login: '{{ index .Values "mariadb-galera" "db" "user" }}'
84     password: '{{ index .Values "mariadb-galera" "db" "password" }}'
85     passwordPolicy: generate
86   - uid: policy-app-user-creds
87     name: &policyAppCredsSecret '{{ include "common.release" . }}-policy-app-user-creds'
88     type: basicAuth
89     externalSecret: '{{ tpl (default "" .Values.config.policyAppUserExternalSecret) . }}'
90     login: '{{ .Values.config.policyAppUserName }}'
91     password: '{{ .Values.config.policyAppUserPassword }}'
92     passwordPolicy: generate
93   - uid: policy-pap-user-creds
94     name: &policyPapCredsSecret '{{ include "common.release" . }}-policy-pap-user-creds'
95     type: basicAuth
96     externalSecret: '{{ tpl (default "" .Values.restServer.policyPapUserExternalSecret) . }}'
97     login: '{{ .Values.restServer.policyPapUserName }}'
98     password: '{{ .Values.restServer.policyPapUserPassword }}'
99     passwordPolicy: required
100   - uid: policy-api-user-creds
101     name: &policyApiCredsSecret '{{ include "common.release" . }}-policy-api-user-creds'
102     type: basicAuth
103     externalSecret: '{{ tpl (default "" .Values.restServer.policyApiUserExternalSecret) . }}'
104     login: '{{ .Values.restServer.policyApiUserName }}'
105     password: '{{ .Values.restServer.policyApiUserPassword }}'
106     passwordPolicy: required
107
108 db: &dbSecretsHook
109   credsExternalSecret: *dbSecretName
110
111 policy-api:
112   enabled: true
113   db: *dbSecretsHook
114   restServer:
115     apiUserExternalSecret: *policyApiCredsSecret
116   config:
117     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
118 policy-pap:
119   enabled: true
120   db: *dbSecretsHook
121   restServer:
122     papUserExternalSecret: *policyPapCredsSecret
123     apiUserExternalSecret: *policyApiCredsSecret
124   config:
125     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
126 policy-xacml-pdp:
127   enabled: true
128   db: *dbSecretsHook
129   config:
130     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
131 policy-apex-pdp:
132   enabled: true
133   db: *dbSecretsHook
134   config:
135     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
136 policy-drools-pdp:
137   enabled: true
138   db: *dbSecretsHook
139   config:
140     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
141 policy-distribution:
142   enabled: true
143   db: *dbSecretsHook
144 policy-clamp-ac-k8s-ppnt:
145   enabled: true
146 policy-clamp-ac-pf-ppnt:
147   enabled: true
148   restServer:
149     apiUserExternalSecret: *policyApiCredsSecret
150     papUserExternalSecret: *policyPapCredsSecret
151 policy-clamp-ac-http-ppnt:
152   enabled: true
153 policy-clamp-ac-a1pms-ppnt:
154   enabled: true
155 policy-clamp-ac-kserve-ppnt:
156   enabled: true
157 policy-clamp-runtime-acm:
158   enabled: true
159   db: *dbSecretsHook
160   config:
161     appUserExternalSecret: *policyAppCredsSecret
162 policy-nexus:
163   enabled: false
164   config:
165     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
166 policy-gui:
167   enabled: false
168   config:
169     jaasConfExternalSecret: '{{ include "common.release" . }}-{{ .Values.global.policyKafkaUser }}'
170
171 #################################################################
172 # DB configuration defaults.
173 #################################################################
174
175 dbmigrator:
176   image: onap/policy-db-migrator:3.0.2
177   schema: policyadmin
178   policy_home: "/opt/app/policy"
179
180 subChartsOnly:
181   enabled: true
182
183 # flag to enable debugging - application support required
184 debugEnabled: false
185
186 # default number of instances
187 replicaCount: 1
188
189 nodeSelector: {}
190
191 affinity: {}
192
193 # probe configuration parameters
194 liveness:
195   initialDelaySeconds: 10
196   periodSeconds: 10
197   # necessary to disable liveness probe when setting breakpoints
198   # in debugger so K8s doesn't restart unresponsive container
199   enabled: true
200
201 readiness:
202   initialDelaySeconds: 10
203   periodSeconds: 10
204
205
206 config:
207   policyAppUserName: runtimeUser
208   useStrimziKafka: true
209   policyPdpPapTopic:
210     name: policy-pdp-pap
211     partitions: 10
212     retentionMs: 7200000
213     segmentBytes: 1073741824
214     consumer:
215       groupId: policy-group
216   policyHeartbeatTopic:
217     name: policy-heartbeat
218     partitions: 10
219     retentionMs: 7200000
220     segmentBytes: 1073741824
221     consumer:
222       groupId: policy-group
223   policyNotificationTopic:
224     name: policy-notification
225     partitions: 10
226     retentionMs: 7200000
227     segmentBytes: 1073741824
228     consumer:
229       groupId: policy-group
230   someConfig: blah
231
232 mariadb-galera:
233   # mariadb-galera.config and global.mariadbGalera.config must be equals
234   db:
235     user: policy-user
236     # password:
237     externalSecret: *dbSecretName
238     name: &mysqlDbName policyadmin
239   rootUser:
240     externalSecret: *dbRootPassSecretName
241   nameOverride: *policy-mariadb
242   # mariadb-galera.service and global.mariadbGalera.service must be equals
243   service: *mariadbService
244   replicaCount: 1
245   mariadbOperator:
246     galera:
247       enabled: false
248   persistence:
249     enabled: true
250     mountSubPath: policy/maria/data
251   serviceAccount:
252     nameOverride: *policy-mariadb
253
254 postgresImage: library/postgres:latest
255 # application configuration override for postgres
256 postgres:
257   nameOverride: &postgresName policy-postgres
258   service:
259     name: *postgresName
260     name2: policy-pg-primary
261     name3: policy-pg-replica
262   container:
263     name:
264       primary: policy-pg-primary
265       replica: policy-pg-replica
266   persistence:
267     mountSubPath: policy/postgres/data
268     mountInitPath: policy
269   config:
270     pgUserName: policy-user
271     pgDatabase: policyadmin
272     pgUserExternalSecret: *dbSecretName
273     pgRootPasswordExternalSecret: *dbRootPassSecretName
274
275 readinessCheck:
276   wait_for:
277     - '{{ ternary .Values.postgres.service.name "postgres" .Values.global.postgres.localCluster }}'
278
279 restServer:
280   policyPapUserName: policyadmin
281   policyPapUserPassword: zb!XztG34
282   policyApiUserName: policyadmin
283   policyApiUserPassword: zb!XztG34
284
285 # Resource Limit flavor -By Default using small
286 # Segregation for Different environment (small, large, or unlimited)
287 flavor: small
288 resources:
289   small:
290     limits:
291       cpu: 1
292       memory: 4Gi
293     requests:
294       cpu: 100m
295       memory: 1Gi
296   large:
297     limits:
298       cpu: 2
299       memory: 8Gi
300     requests:
301       cpu: 200m
302       memory: 2Gi
303   unlimited: {}
304
305 #Pods Service Account
306 serviceAccount:
307   nameOverride: policy
308   roles:
309     - read