Merge "[AAI] Add model-loader tracing config"
[oom.git] / kubernetes / cps / components / cps-core / values.yaml
1 # Copyright (C) 2021 Pantheon.tech, Orange, Bell Canada.
2 # Modifications Copyright (C) 2022 Bell Canada
3 # Modifications Copyright © 2022-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 # Secrets.
19 #################################################################
20 secrets:
21   - uid: pg-root-pass
22     name: &pgRootPassSecretName '{{ include "common.release" . }}-cps-core-pg-root-pass'
23     type: password
24     externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgRootPasswordExternalSecret) .) (hasSuffix "cps-core-pg-root-pass" .Values.postgres.config.pgRootPasswordExternalSecret) }}'
25     password: '{{ .Values.postgres.config.pgRootpassword }}'
26     policy: generate
27   - uid: pg-user-creds
28     name: &pgUserCredsSecretName '{{ include "common.release" . }}-cps-core-pg-user-creds'
29     type: basicAuth
30     externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgUserExternalSecret) .) (hasSuffix "cps-core-pg-user-creds" .Values.postgres.config.pgUserExternalSecret) }}'
31     login: '{{ .Values.postgres.config.pgUserName }}'
32     password: '{{ .Values.postgres.config.pgUserPassword }}'
33     passwordPolicy: generate
34   - uid: app-user-creds
35     type: basicAuth
36     externalSecret: '{{ tpl (default "" .Values.config.appUserExternalSecret) . }}'
37     login: '{{ .Values.config.appUserName }}'
38     password: '{{ .Values.config.appUserPassword }}'
39     passwordPolicy: generate
40   - uid: dmi-plugin-user-creds
41     type: basicAuth
42     externalSecret: '{{ tpl (default "" .Values.config.dmiPluginUserExternalSecret) . }}'
43     login: '{{ .Values.config.dmiPluginUserName }}'
44     password: '{{ .Values.config.dmiPluginUserPassword }}'
45     passwordPolicy: generate
46
47 #################################################################
48 # Global configuration defaults.
49 #################################################################
50
51 # bitnami image doesn't support well single quote in password
52 passwordStrengthOverride: basic
53 global:
54   ingress:
55     virtualhost:
56       baseurl: "simpledemo.onap.org"
57   #Service Names of the postgres db to connect to.
58   #Override it to cps-postgres if localCluster is enabled.
59   postgres:
60     localCluster: false
61     service:
62       name: pgset
63       externalPort: 5432
64       name2: tcp-pgset-primary
65       externalPort2: 5432
66       name3: tcp-pgset-replica
67       externalPort3: 5432
68     container:
69       name: postgres
70
71 image: onap/cps-and-ncmp:3.3.11
72
73 service:
74   type: ClusterIP
75   headless: {}
76   name: cps-core
77   internalPort: &svc_port 8080
78   ports:
79     - name: &port http
80       port: *svc_port
81   headlessPorts:
82     - name: tcp-hazelcast
83       port: 5701
84
85 prometheus:
86   enabled: false
87
88 metrics:
89   serviceMonitor:
90     port: http
91       ## specify target port if name is not given to the port in the service definition
92       ##
93     # targetPort: 8080
94     path: /actuator/prometheus
95     interval: 60s
96     basicAuth:
97       enabled: false
98
99 pullPolicy: Always
100 # flag to enable debugging - application support required
101 debugEnabled: false
102 nodeSelector: {}
103 affinity: {}
104 # Resource Limit flavor -By Default using small
105 flavor: small
106 # default number of instances
107 replicaCount: 1
108 # Segregation for Different environment (Small and Large)
109 resources:
110   small:
111     limits:
112       cpu: "2"
113       memory: "1.5Gi"
114     requests:
115       cpu: "1"
116       memory: "1.5Gi"
117   large:
118     limits:
119       cpu: "4"
120       memory: "3Gi"
121     requests:
122       cpu: "2"
123       memory: "3Gi"
124   unlimited: {}
125 # probe configuration parameters
126 liveness:
127   initialDelaySeconds: 20
128   periodSeconds: 20
129   # necessary to disable liveness probe when setting breakpoints
130   # in debugger so K8s doesn't restart unresponsive container
131   enabled: true
132   path: /actuator/health
133   port: *svc_port
134
135 readiness:
136   initialDelaySeconds: 15
137   periodSeconds: 15
138   path: /actuator/health
139   port: *svc_port
140
141 startup:
142   failureThreshold: 5
143   periodSeconds: 60
144   path: /actuator/health
145   port: *svc_port
146
147 ingress:
148   enabled: true
149   service:
150     - baseaddr: "cps-core-api"
151       path: "/"
152       name: "cps-core"
153       port: *svc_port
154
155 serviceAccount:
156   nameOverride: cps-core
157   roles:
158     - read
159
160 securityContext:
161   user_id: 100
162   group_id: 655533
163
164 #################################################################
165 # Application configuration defaults.
166 #################################################################
167
168 config:
169   # Set it for preloading xnfdata, else set to null
170   liquibaseLabels: xnf-data-preload
171
172   # REST API basic authentication credentials (passsword is generated if not provided)
173   appUserName: cpsuser
174   spring:
175     profile: helm
176   #appUserPassword:
177   dmiPluginUserName: dmiuser
178 # Any new property can be added in the env by setting in overrides in the format mentioned below
179 # All the added properties must be in "key: value" format instead of yaml.
180 #  additional:
181 #    spring.config.max-size: 200
182 #    spring.config.min-size: 10
183
184   additional:
185     notification.enabled: true
186     notification.data-updated.topic: &dataUpdatedTopic cps.data-updated-events
187     notification.data-updated.filters.enabled-dataspaces: ""
188     notification.async.enabled: false
189     notification.async.executor.core-pool-size: 2
190     notification.async.executor.max-pool-size: 10
191     notification.async.executor.queue-capacity: 500
192     notification.async.executor.wait-for-tasks-to-complete-on-shutdown: true
193     notification.async.executor.thread-name-prefix: Async-
194
195 # Strimzi KafkaUser and Topic config
196 kafkaTopic:
197   - name: &dmiCmEventsTopic dmi-cm-events
198     retentionMs: 7200000
199     segmentBytes: 1073741824
200
201 kafkaUser:
202   authenticationType: scram-sha-512
203   acls:
204     - name: cps-core-group
205       type: group
206       operations: [Read]
207     - name: *dataUpdatedTopic
208       type: topic
209       operations: [Write]
210     - name: *dmiCmEventsTopic
211       type: topic
212       operations: [Read]
213     - name: &ncmpAsyncM2MTopic ncmp-async-m2m
214       type: topic
215       operations: [Read]
216     - name: &cmAvcSubscriptionTopic cm-avc-subscription
217       type: topic
218       operations: [Read]
219
220 topics:
221   config:
222     app.ncmp.async-m2m.topic: *ncmpAsyncM2MTopic
223     app.ncmp.avc.subscription-topic: *cmAvcSubscriptionTopic
224     app.dmi.cm-events.topic: *dmiCmEventsTopic
225
226 logging:
227   level: INFO
228   path: /tmp
229
230 #################################################################
231 # Postgres overriding defaults in the postgres
232 #################################################################
233 postgres:
234   postgresInit: true
235   nameOverride: &postgresName cps-core-postgres
236   service:
237     name: *postgresName
238     externalPort: 5432
239     name2: cps-core-pg-primary
240     externalPort2: 5432
241     name3: cps-core-pg-replica
242     externalPort3: 5432
243   container:
244     name:
245       primary: cps-core-pg-primary
246       replica: cps-core-pg-replica
247   persistence:
248     mountSubPath: cps-core/data
249     mountInitPath: cps-core
250   config:
251     pgUserName: cps
252     pgDatabase: cpsdb
253     pgUserExternalSecret: *pgUserCredsSecretName
254     pgRootPasswordExternalSecret: *pgRootPassSecretName
255
256 postgres-init:
257   nameOverride: cps-postgres-init
258   config:
259     pgUserName: cps
260     pgDatabase: cpsdb
261     pgDataPath: data
262     pgUserExternalSecret: *pgUserCredsSecretName
263   serviceAccount:
264     nameOverride: cps-postgres-init
265
266     # pgPrimaryPassword: password
267     # pgUserPassword: password
268     # pgRootPassword: password
269
270 readinessCheck:
271   wait_for:
272     services:
273       - '{{ .Values.global.postgres.service.name2 }}'
274
275 minReadySeconds: 10
276 updateStrategy:
277   type: RollingUpdate
278   maxUnavailable: 0
279   maxSurge: 1
280
281 # Hazlecast custom configurations.
282 hazelcast:
283   config:
284     kubernetesDiscovery: true
285     kubernetesServiceName: cps-core-headless
286
287