[COMMON] Harmonize resource settings
[oom.git] / kubernetes / policy / components / policy-pap / values.yaml
1 #  ============LICENSE_START=======================================================
2 #   Copyright (C) 2019 Nordix Foundation.
3 #   Modifications Copyright (C) 2019-2021 AT&T Intellectual Property.
4 #   Modifications Copyright (C) 2020-2022 Bell Canada. All rights reserved.
5 #   Modifications Copyright © 2022 Nordix Foundation
6 #  ================================================================================
7 #  Licensed under the Apache License, Version 2.0 (the "License");
8 #  you may not use this file except in compliance with the License.
9 #  You may obtain a copy of the License at
10 #
11 #       http://www.apache.org/licenses/LICENSE-2.0
12 #
13 #  Unless required by applicable law or agreed to in writing, software
14 #  distributed under the License is distributed on an "AS IS" BASIS,
15 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 #  See the License for the specific language governing permissions and
17 #  limitations under the License.
18 #
19 #  SPDX-License-Identifier: Apache-2.0
20 #  ============LICENSE_END=========================================================
21
22 #################################################################
23 # Global configuration defaults.
24 #################################################################
25 global:
26   nodePortPrefixExt: 304
27   persistence: {}
28   useStrimziKafkaPf: set-via-parent-chart-global-value
29   postgres:
30     localCluster: false
31
32 #################################################################
33 # Secrets metaconfig
34 #################################################################
35 secrets:
36   - uid: db-secret
37     type: basicAuth
38     externalSecret: '{{ tpl (default "" .Values.db.credsExternalSecret) . }}'
39     login: '{{ .Values.db.user }}'
40     password: '{{ .Values.db.password }}'
41     passwordPolicy: required
42   - uid: restserver-secret
43     type: basicAuth
44     externalSecret: '{{ tpl (default "" .Values.restServer.papUserExternalSecret) . }}'
45     login: '{{ .Values.restServer.user }}'
46     password: '{{ .Values.restServer.password }}'
47     passwordPolicy: required
48   - uid: api-secret
49     type: basicAuth
50     externalSecret: '{{ tpl (default "" .Values.restServer.apiUserExternalSecret) . }}'
51     login: '{{ .Values.healthCheckRestClient.api.user }}'
52     password: '{{ .Values.healthCheckRestClient.api.password }}'
53     passwordPolicy: required
54   - uid: distribution-secret
55     type: basicAuth
56     externalSecret: '{{ tpl (default "" .Values.healthCheckRestClient.distribution.credsExternalSecret) . }}'
57     login: '{{ .Values.healthCheckRestClient.distribution.user }}'
58     password: '{{ .Values.healthCheckRestClient.distribution.password }}'
59     passwordPolicy: required
60   - uid: policy-kafka-user
61     externalSecret: '{{ tpl (default "" .Values.config.jaasConfExternalSecret) . }}'
62     type: genericKV
63     envs:
64       - name: sasl.jaas.config
65         value: '{{ .Values.config.someConfig }}'
66         policy: generate
67
68 #################################################################
69 # Application configuration defaults.
70 #################################################################
71 # application image
72 image: onap/policy-pap:3.0.2
73 pullPolicy: Always
74
75 # flag to enable debugging - application support required
76 debugEnabled: false
77
78 # application configuration
79
80 db:
81   user: policy-user
82   password: policy_user
83   service:
84     name: policy-mariadb
85     pgName: policy-pg-primary
86     internalPort: 3306
87     internalPgPort: 5432
88
89 restServer:
90   user: policyadmin
91   password: zb!XztG34
92
93 healthCheckRestClient:
94   api:
95     user: policyadmin
96     password: none
97   distribution:
98     user: healthcheck
99     password: zb!XztG34
100
101 # default number of instances
102 replicaCount: 1
103
104 nodeSelector: {}
105
106 affinity: {}
107
108 # probe configuration parameters
109 liveness:
110   initialDelaySeconds: 60
111   periodSeconds: 10
112   # necessary to disable liveness probe when setting breakpoints
113   # in debugger so K8s doesn't restart unresponsive container
114   enabled: true
115   port: http-api
116
117 readiness:
118   initialDelaySeconds: 10
119   periodSeconds: 120
120   port: http-api
121   api: /policy/pap/v1/healthcheck
122   successThreshold: 1
123   failureThreshold: 3
124   timeout: 60
125
126 service:
127   type: ClusterIP
128   name: policy-pap
129   ports:
130   - name: http-api
131     port: 6969
132   - name: debug-port
133     port: 5005
134     protocol: TCP
135
136 ingress:
137   enabled: false
138
139 serviceMesh:
140   authorizationPolicy:
141     authorizedPrincipals:
142       - serviceAccount: message-router-read
143       - serviceAccount: portal-app-read
144
145 flavor: small
146 resources:
147   small:
148     limits:
149       cpu: "1"
150       memory: "1Gi"
151     requests:
152       cpu: "0.5"
153       memory: "1Gi"
154   large:
155     limits:
156       cpu: "2"
157       memory: "2Gi"
158     requests:
159       cpu: "1"
160       memory: "2Gi"
161   unlimited: {}
162
163 #Pods Service Account
164 serviceAccount:
165   nameOverride: policy-pap
166   roles:
167     - read
168
169 metrics:
170   serviceMonitor:
171     # Override the labels based on the Prometheus config parameter: serviceMonitorSelector.
172     # The default operator for prometheus enforces the below label.
173     labels:
174       release: prometheus
175     enabled: true
176     port: http-api
177     interval: 60s
178     isHttps: false
179     basicAuth:
180       enabled: true
181       externalSecretNameSuffix: policy-pap-user-creds
182       externalSecretUserKey: login
183       externalSecretPasswordKey: password
184
185 # application configuration
186 config:
187 # Event consumption (kafka) properties
188   useStrimziKafkaPf: true
189   kafkaBootstrap: strimzi-kafka-bootstrap
190   kafka:
191     topics:
192       policyHeartbeat: policy-heartbeat
193       policyNotification: policy-notification
194       policyPdpPap: policy-pdp-pap
195     consumer:
196       groupId: policy-pap
197   app:
198     listener:
199       policyPdpPapTopic: policy-pdp-pap
200
201 dmaap:
202   topics:
203     policyHeartbeat: POLICY-HEARTBEAT
204     policyNotification: POLICY-NOTIFICATION
205     policyPdpPap: POLICY-PDP-PAP
206 # If targeting a custom kafka cluster, ie useStrimziKakfa: false
207 # uncomment below config and target your kafka bootstrap servers,
208 # along with any other security config.
209 #
210 # eventConsumption:
211 #   spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
212 #   spring.kafka.security.protocol: PLAINTEXT
213 #   spring.kafka.consumer.group-id: policy-group
214 #
215 # Any new property can be added in the env by setting in overrides in the format mentioned below
216 # All the added properties must be in "key: value" format instead of yaml.
217 kafkaUser:
218   authenticationType: scram-sha-512
219   acls:
220     - name: policy-pap
221       type: group
222       operations: [Create, Describe, Read, Write]
223     - name: policy-pdp-pap
224       type: topic
225       patternType: prefix
226       operations: [Create, Describe, Read, Write]
227     - name: policy-heartbeat
228       type: topic
229       patternType: prefix
230       operations: [Create, Describe, Read, Write]
231     - name: policy-notification
232       type: topic
233       patternType: prefix
234       operations: [Create, Describe, Read, Write]
235
236 readinessCheck:
237   wait_for:
238     - message-router