[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 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 #################################################################
17 # Secrets.
18 #################################################################
19 secrets:
20   - uid: pg-root-pass
21     name: &pgRootPassSecretName '{{ include "common.release" . }}-cps-core-pg-root-pass'
22     type: password
23     externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgRootPasswordExternalSecret) .) (hasSuffix "cps-core-pg-root-pass" .Values.postgres.config.pgRootPasswordExternalSecret) }}'
24     password: '{{ .Values.postgres.config.pgRootpassword }}'
25     policy: generate
26   - uid: pg-user-creds
27     name: &pgUserCredsSecretName '{{ include "common.release" . }}-cps-core-pg-user-creds'
28     type: basicAuth
29     externalSecret: '{{ ternary "" (tpl (default "" .Values.postgres.config.pgUserExternalSecret) .) (hasSuffix "cps-core-pg-user-creds" .Values.postgres.config.pgUserExternalSecret) }}'
30     login: '{{ .Values.postgres.config.pgUserName }}'
31     password: '{{ .Values.postgres.config.pgUserPassword }}'
32     passwordPolicy: generate
33   - uid: app-user-creds
34     type: basicAuth
35     externalSecret: '{{ tpl (default "" .Values.config.appUserExternalSecret) . }}'
36     login: '{{ .Values.config.appUserName }}'
37     password: '{{ .Values.config.appUserPassword }}'
38     passwordPolicy: generate
39   - uid: dmi-plugin-user-creds
40     type: basicAuth
41     externalSecret: '{{ tpl (default "" .Values.config.dmiPluginUserExternalSecret) . }}'
42     login: '{{ .Values.config.dmiPluginUserName }}'
43     password: '{{ .Values.config.dmiPluginUserPassword }}'
44     passwordPolicy: generate
45
46 #################################################################
47 # Global configuration defaults.
48 #################################################################
49
50 # bitnami image doesn't support well single quote in password
51 passwordStrengthOverride: basic
52 global:
53   ingress:
54     virtualhost:
55       baseurl: "simpledemo.onap.org"
56   #Service Names of the postgres db to connect to.
57   #Override it to cps-postgres if localCluster is enabled.
58   postgres:
59     localCluster: false
60     service:
61       name: pgset
62       externalPort: 5432
63       name2: tcp-pgset-primary
64       externalPort2: 5432
65       name3: tcp-pgset-replica
66       externalPort3: 5432
67     container:
68       name: postgres
69
70 image: onap/cps-and-ncmp:3.0.0
71 containerPort: &svc_port 8080
72 managementPort: &mgt_port 8081
73
74 service:
75   type: ClusterIP
76   name: cps-core
77   ports:
78     - name: &port http
79       port: *svc_port
80     - name: http-management
81       port: *mgt_port
82       targetPort: *mgt_port
83
84 prometheus:
85   enabled: false
86
87 metrics:
88   serviceMonitor:
89     port: http-management
90       ## specify target port if name is not given to the port in the service definition
91       ##
92     # targetPort: 8080
93     path: /manage/prometheus
94     interval: 60s
95     basicAuth:
96       enabled: false
97
98 pullPolicy: Always
99 # flag to enable debugging - application support required
100 debugEnabled: false
101 nodeSelector: {}
102 affinity: {}
103 # Resource Limit flavor -By Default using small
104 flavor: small
105 # default number of instances
106 replicaCount: 1
107 # Segregation for Different environment (Small and Large)
108 resources:
109   small:
110     limits:
111       cpu: 2
112       memory: 2Gi
113     requests:
114       cpu: 1
115       memory: 1Gi
116   large:
117     limits:
118       cpu: 4
119       memory: 4Gi
120     requests:
121       cpu: 2
122       memory: 2Gi
123   unlimited: {}
124 # probe configuration parameters
125 liveness:
126   initialDelaySeconds: 20
127   periodSeconds: 20
128   # necessary to disable liveness probe when setting breakpoints
129   # in debugger so K8s doesn't restart unresponsive container
130   enabled: true
131   path: /manage/health
132   port: *mgt_port
133
134 readiness:
135   initialDelaySeconds: 15
136   periodSeconds: 15
137   path: /manage/health
138   port: *mgt_port
139
140 ingress:
141   enabled: true
142   service:
143     - baseaddr: "cps-core"
144       path: "/"
145       name: "cps-core"
146       port: *svc_port
147
148 serviceAccount:
149   nameOverride: cps-core
150   roles:
151     - read
152
153 securityContext:
154   user_id: 100
155   group_id: 655533
156
157 #################################################################
158 # Application configuration defaults.
159 #################################################################
160
161 config:
162
163   # Set it for pre loading xnfdata, else set to null
164   liquibaseLabels: xnf-data-preload
165
166   # REST API basic authentication credentials (passsword is generated if not provided)
167   appUserName: cpsuser
168   spring:
169     profile: helm
170   #appUserPassword:
171   dmiPluginUserName: dmiuser
172 # Any new property can be added in the env by setting in overrides in the format mentioned below
173 # All the added properties must be in "key: value" format insead of yaml.
174 #  additional:
175 #    spring.config.max-size: 200
176 #    spring.config.min-size: 10
177
178   eventPublisher:
179     spring.kafka.bootstrap-servers: message-router-kafka:9092
180     spring.kafka.security.protocol: SASL_PLAINTEXT
181     spring.kafka.properties.sasl.mechanism: PLAIN
182     spring.kafka.properties.sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username=admin password=admin_secret;
183     spring.kafka.producer.client-id: cps-core
184
185   additional:
186     notification.data-updated.enabled: true
187     notification.data-updated.topic: cps.data-updated-events
188     notification.data-updated.filters.enabled-dataspaces: ""
189     notification.async.enabled: false
190     notification.async.executor.core-pool-size: 2
191     notification.async.executor.max-pool-size: 1
192     notification.async.executor.queue-capacity: 500
193     notification.async.executor.wait-for-tasks-to-complete-on-shutdown: true
194     notification.async.executor.thread-name-prefix: Async-
195
196 logging:
197   level: INFO
198   path: /tmp
199
200 #################################################################
201 # Postgres overriding defaults in the postgres
202 #################################################################
203 postgres:
204   postgresInit: true
205   nameOverride: &postgresName cps-core-postgres
206   service:
207     name: *postgresName
208     externalPort: 5432
209     name2: cps-core-pg-primary
210     externalPort2: 5432
211     name3: cps-core-pg-replica
212     externalPort3: 5432
213   container:
214     name:
215       primary: cps-core-pg-primary
216       replica: cps-core-pg-replica
217   persistence:
218     mountSubPath: cps-core/data
219     mountInitPath: cps-core
220   config:
221     pgUserName: cps
222     pgDatabase: cpsdb
223     pgUserExternalSecret: *pgUserCredsSecretName
224     pgRootPasswordExternalSecret: *pgRootPassSecretName
225
226 postgres-init:
227   nameOverride: cps-postgres-init
228   config:
229     pgUserName: cps
230     pgDatabase: cpsdb
231     pgDataPath: data
232     pgUserExternalSecret: *pgUserCredsSecretName
233
234     # pgPrimaryPassword: password
235     # pgUserPassword: password
236     # pgRootPassword: password
237
238 readinessCheck:
239   wait_for:
240     - '{{ ternary .Values.postgres.service.name "postgres" .Values.global.postgres.localCluster }}'
241
242 minReadySeconds: 10
243 updateStrategy:
244   type: RollingUpdate
245   maxUnavailable: 0
246   maxSurge: 1