c548abbd2377b3407fec8628968f69ceb051eb93
[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 ingress:
149   enabled: true
150   service:
151     - baseaddr: "cps-core"
152       path: "/"
153       name: "cps-core"
154       port: *svc_port
155
156 serviceAccount:
157   nameOverride: cps-core
158   roles:
159     - read
160
161 securityContext:
162   user_id: 100
163   group_id: 655533
164
165 #################################################################
166 # Application configuration defaults.
167 #################################################################
168
169 config:
170
171   # Set it for pre loading xnfdata, else set to null
172   liquibaseLabels: xnf-data-preload
173
174   # REST API basic authentication credentials (passsword is generated if not provided)
175   appUserName: cpsuser
176   spring:
177     profile: helm
178   #appUserPassword:
179   dmiPluginUserName: dmiuser
180 # Any new property can be added in the env by setting in overrides in the format mentioned below
181 # All the added properties must be in "key: value" format instead of yaml.
182 #  additional:
183 #    spring.config.max-size: 200
184 #    spring.config.min-size: 10
185
186 # kafka config
187   useStrimziKafka: true
188   kafkaBootstrap: strimzi-kafka-bootstrap
189 # If targeting a custom kafka cluster, ie useStrimziKakfa: false
190 # uncomment below config and target your kafka bootstrap servers,
191 # along with any other security config.
192
193 #  eventPublisher:
194 #    spring.kafka.bootstrap-servers: <kafka-bootstrap>:9092
195 #    spring.kafka.security.protocol: SASL_PLAINTEXT
196 #    spring.kafka.properties.sasl.mechanism: PLAIN
197 #    spring.kafka.properties.sasl.jaas.config: org.apache.kafka.common.security.plain.PlainLoginModule required username=admin password=admin_secret;
198
199   additional:
200     notification.data-updated.enabled: true
201     notification.data-updated.topic: cps.data-updated-events
202     notification.data-updated.filters.enabled-dataspaces: ""
203     notification.async.enabled: false
204     notification.async.executor.core-pool-size: 2
205     notification.async.executor.max-pool-size: 1
206     notification.async.executor.queue-capacity: 500
207     notification.async.executor.wait-for-tasks-to-complete-on-shutdown: true
208     notification.async.executor.thread-name-prefix: Async-
209
210 logging:
211   level: INFO
212   path: /tmp
213
214 #################################################################
215 # Postgres overriding defaults in the postgres
216 #################################################################
217 postgres:
218   postgresInit: true
219   nameOverride: &postgresName cps-core-postgres
220   service:
221     name: *postgresName
222     externalPort: 5432
223     name2: cps-core-pg-primary
224     externalPort2: 5432
225     name3: cps-core-pg-replica
226     externalPort3: 5432
227   container:
228     name:
229       primary: cps-core-pg-primary
230       replica: cps-core-pg-replica
231   persistence:
232     mountSubPath: cps-core/data
233     mountInitPath: cps-core
234   config:
235     pgUserName: cps
236     pgDatabase: cpsdb
237     pgUserExternalSecret: *pgUserCredsSecretName
238     pgRootPasswordExternalSecret: *pgRootPassSecretName
239
240 postgres-init:
241   nameOverride: cps-postgres-init
242   config:
243     pgUserName: cps
244     pgDatabase: cpsdb
245     pgDataPath: data
246     pgUserExternalSecret: *pgUserCredsSecretName
247
248     # pgPrimaryPassword: password
249     # pgUserPassword: password
250     # pgRootPassword: password
251
252 readinessCheck:
253   wait_for:
254     - '{{ ternary .Values.postgres.service.name "postgres" .Values.global.postgres.localCluster }}'
255
256 minReadySeconds: 10
257 updateStrategy:
258   type: RollingUpdate
259   maxUnavailable: 0
260   maxSurge: 1