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