Merge "[DMAAP] DMaaP ServiceMesh compatibility"
[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 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   - uid: cps-kafka-user
47     externalSecret: '{{ tpl (default "" .Values.config.jaasConfExternalSecret) . }}'
48     type: genericKV
49     envs:
50       - name: sasl.jaas.config
51         value: '{{ .Values.config.someConfig }}'
52         policy: generate
53
54 #################################################################
55 # Global configuration defaults.
56 #################################################################
57
58 # bitnami image doesn't support well single quote in password
59 passwordStrengthOverride: basic
60 global:
61   ingress:
62     virtualhost:
63       baseurl: "simpledemo.onap.org"
64   #Service Names of the postgres db to connect to.
65   #Override it to cps-postgres if localCluster is enabled.
66   postgres:
67     localCluster: false
68     service:
69       name: pgset
70       externalPort: 5432
71       name2: tcp-pgset-primary
72       externalPort2: 5432
73       name3: tcp-pgset-replica
74       externalPort3: 5432
75     container:
76       name: postgres
77
78 image: onap/cps-and-ncmp:3.0.1
79 containerPort: &svc_port 8080
80 managementPort: &mgt_port 8081
81
82 service:
83   type: ClusterIP
84   name: cps-core
85   ports:
86     - name: &port http
87       port: *svc_port
88     - name: http-management
89       port: *mgt_port
90       targetPort: *mgt_port
91
92 prometheus:
93   enabled: false
94
95 metrics:
96   serviceMonitor:
97     port: http-management
98       ## specify target port if name is not given to the port in the service definition
99       ##
100     # targetPort: 8080
101     path: /manage/prometheus
102     interval: 60s
103     basicAuth:
104       enabled: false
105
106 pullPolicy: Always
107 # flag to enable debugging - application support required
108 debugEnabled: false
109 nodeSelector: {}
110 affinity: {}
111 # Resource Limit flavor -By Default using small
112 flavor: small
113 # default number of instances
114 replicaCount: 1
115 # Segregation for Different environment (Small and Large)
116 resources:
117   small:
118     limits:
119       cpu: 2
120       memory: 2Gi
121     requests:
122       cpu: 1
123       memory: 1Gi
124   large:
125     limits:
126       cpu: 4
127       memory: 4Gi
128     requests:
129       cpu: 2
130       memory: 2Gi
131   unlimited: {}
132 # probe configuration parameters
133 liveness:
134   initialDelaySeconds: 20
135   periodSeconds: 20
136   # necessary to disable liveness probe when setting breakpoints
137   # in debugger so K8s doesn't restart unresponsive container
138   enabled: true
139   path: /manage/health
140   port: *mgt_port
141
142 readiness:
143   initialDelaySeconds: 15
144   periodSeconds: 15
145   path: /manage/health
146   port: *mgt_port
147
148 startup:
149   failureThreshold: 5
150   periodSeconds: 60
151   path: /manage/health
152   port: *mgt_port
153
154 ingress:
155   enabled: true
156   service:
157     - baseaddr: "cps-core"
158       path: "/"
159       name: "cps-core"
160       port: *svc_port
161
162 serviceAccount:
163   nameOverride: cps-core
164   roles:
165     - read
166
167 securityContext:
168   user_id: 100
169   group_id: 655533
170
171 #################################################################
172 # Application configuration defaults.
173 #################################################################
174
175 config:
176
177   # Set it for pre loading xnfdata, else set to null
178   liquibaseLabels: xnf-data-preload
179
180   # REST API basic authentication credentials (passsword is generated if not provided)
181   appUserName: cpsuser
182   spring:
183     profile: helm
184   #appUserPassword:
185   dmiPluginUserName: dmiuser
186 # Any new property can be added in the env by setting in overrides in the format mentioned below
187 # All the added properties must be in "key: value" format instead of yaml.
188 #  additional:
189 #    spring.config.max-size: 200
190 #    spring.config.min-size: 10
191
192 # kafka config
193   useStrimziKafka: true
194   kafkaBootstrap: strimzi-kafka-bootstrap
195 # If targeting a custom kafka cluster, ie useStrimziKakfa: false
196 # uncomment below config and target your kafka bootstrap servers,
197 # along with any other security config.
198
199 #  eventPublisher:
200 #    spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
201 #    spring.kafka.security.protocol: SASL_PLAINTEXT
202 #    spring.kafka.properties.sasl.mechanism: PLAIN
203 #    spring.kafka.properties.sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username=admin password=admin_secret;
204
205   additional:
206     notification.data-updated.enabled: true
207     notification.data-updated.topic: cps.data-updated-events
208     notification.data-updated.filters.enabled-dataspaces: ""
209     notification.async.enabled: false
210     notification.async.executor.core-pool-size: 2
211     notification.async.executor.max-pool-size: 1
212     notification.async.executor.queue-capacity: 500
213     notification.async.executor.wait-for-tasks-to-complete-on-shutdown: true
214     notification.async.executor.thread-name-prefix: Async-
215
216 logging:
217   level: INFO
218   path: /tmp
219
220 #################################################################
221 # Postgres overriding defaults in the postgres
222 #################################################################
223 postgres:
224   postgresInit: true
225   nameOverride: &postgresName cps-core-postgres
226   service:
227     name: *postgresName
228     externalPort: 5432
229     name2: cps-core-pg-primary
230     externalPort2: 5432
231     name3: cps-core-pg-replica
232     externalPort3: 5432
233   container:
234     name:
235       primary: cps-core-pg-primary
236       replica: cps-core-pg-replica
237   persistence:
238     mountSubPath: cps-core/data
239     mountInitPath: cps-core
240   config:
241     pgUserName: cps
242     pgDatabase: cpsdb
243     pgUserExternalSecret: *pgUserCredsSecretName
244     pgRootPasswordExternalSecret: *pgRootPassSecretName
245
246 postgres-init:
247   nameOverride: cps-postgres-init
248   config:
249     pgUserName: cps
250     pgDatabase: cpsdb
251     pgDataPath: data
252     pgUserExternalSecret: *pgUserCredsSecretName
253
254     # pgPrimaryPassword: password
255     # pgUserPassword: password
256     # pgRootPassword: password
257
258 readinessCheck:
259   wait_for:
260     - '{{ ternary .Values.postgres.service.name "postgres" .Values.global.postgres.localCluster }}'
261
262 minReadySeconds: 10
263 updateStrategy:
264   type: RollingUpdate
265   maxUnavailable: 0
266   maxSurge: 1