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