[CPS] Update cps-and-ncmp and dmi-plugin image
[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.2.6
72 containerPort: &svc_port 8080
73 managementPort: &mgt_port 8081
74
75 service:
76   type: ClusterIP
77   name: cps-core
78   ports:
79     - name: &port http
80       port: *svc_port
81     - name: http-management
82       port: *mgt_port
83       targetPort: *mgt_port
84
85 prometheus:
86   enabled: false
87
88 metrics:
89   serviceMonitor:
90     port: http-management
91       ## specify target port if name is not given to the port in the service definition
92       ##
93     # targetPort: 8080
94     path: /manage/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: 2Gi
114     requests:
115       cpu: 1
116       memory: 1Gi
117   large:
118     limits:
119       cpu: 4
120       memory: 4Gi
121     requests:
122       cpu: 2
123       memory: 2Gi
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: /manage/health
133   port: *mgt_port
134
135 readiness:
136   initialDelaySeconds: 15
137   periodSeconds: 15
138   path: /manage/health
139   port: *mgt_port
140
141 startup:
142   failureThreshold: 5
143   periodSeconds: 60
144   path: /manage/health
145   port: *mgt_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 config
196 kafkaUser:
197   authenticationType: scram-sha-512
198   acls:
199     - name: cps-core-group
200       type: group
201       operations: [Read]
202     - name: *dataUpdatedTopic
203       type: topic
204       operations: [Write]
205     - name: dmi-cm-events
206       type: topic
207       operations: [Read]
208     - name: ncmp-async-m2m
209       type: topic
210       operations: [Read]
211     - name: cm-avc-subscription
212       type: topic
213       operations: [Read]
214
215 logging:
216   level: INFO
217   path: /tmp
218
219 #################################################################
220 # Postgres overriding defaults in the postgres
221 #################################################################
222 postgres:
223   postgresInit: true
224   nameOverride: &postgresName cps-core-postgres
225   service:
226     name: *postgresName
227     externalPort: 5432
228     name2: cps-core-pg-primary
229     externalPort2: 5432
230     name3: cps-core-pg-replica
231     externalPort3: 5432
232   container:
233     name:
234       primary: cps-core-pg-primary
235       replica: cps-core-pg-replica
236   persistence:
237     mountSubPath: cps-core/data
238     mountInitPath: cps-core
239   config:
240     pgUserName: cps
241     pgDatabase: cpsdb
242     pgUserExternalSecret: *pgUserCredsSecretName
243     pgRootPasswordExternalSecret: *pgRootPassSecretName
244
245 postgres-init:
246   nameOverride: cps-postgres-init
247   config:
248     pgUserName: cps
249     pgDatabase: cpsdb
250     pgDataPath: data
251     pgUserExternalSecret: *pgUserCredsSecretName
252
253     # pgPrimaryPassword: password
254     # pgUserPassword: password
255     # pgRootPassword: password
256
257 readinessCheck:
258   wait_for:
259     - '{{ ternary .Values.postgres.service.name "postgres" .Values.global.postgres.localCluster }}'
260
261 minReadySeconds: 10
262 updateStrategy:
263   type: RollingUpdate
264   maxUnavailable: 0
265   maxSurge: 1