blob: 016356801dcbab98b7f32c6921e6145c3e37f855 [file] [log] [blame]
emaclee9c126612023-04-16 17:48:15 +01001# ============LICENSE_START=======================================================
2# Copyright (C) 2021 Pantheon.tech
3# Modifications Copyright (C) 2021-2022 Bell Canada
4# Modifications Copyright (C) 2021-2023 Nordix Foundation
5# ================================================================================
6# Licensed under the Apache License, Version 2.0 (the "License");
7# you may not use this file except in compliance with the License.
8# You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing, software
13# distributed under the License is distributed on an "AS IS" BASIS,
14# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15# See the License for the specific language governing permissions and
16# limitations under the License.
17#
18# SPDX-License-Identifier: Apache-2.0
19# ============LICENSE_END=========================================================
20
21server:
22 port: 8080
23
24rest:
25 api:
26 cps-base-path: /cps/api
27 ncmp-base-path: /ncmp
28 ncmp-inventory-base-path: /ncmpInventory
29
30spring:
31 main:
32 banner-mode: "off"
33 application:
34 name: "cps-application"
35 jpa:
36 show-sql: false
37 ddl-auto: create
38 open-in-view: false
39 properties:
40 hibernate:
41 enable_lazy_load_no_trans: true
42 dialect: org.hibernate.dialect.PostgreSQLDialect
43
44 datasource:
45 url: jdbc:postgresql://${DB_HOST}:${DB_PORT:5432}/cpsdb
46 username: ${DB_USERNAME}
47 password: ${DB_PASSWORD}
48 driverClassName: org.postgresql.Driver
49 hikari:
50 minimumIdle: 5
51 maximumPoolSize: 80
52 idleTimeout: 60000
53 connectionTimeout: 120000
54 leakDetectionThreshold: 30000
55 pool-name: CpsDatabasePool
56
57 cache:
58 type: caffeine
59 cache-names: yangSchema
60 caffeine:
61 spec: maximumSize=10000,expireAfterAccess=10m
62
63 liquibase:
64 change-log: classpath:changelog/changelog-master.yaml
65 labels: ${LIQUIBASE_LABELS}
66
67 servlet:
68 multipart:
69 enabled: true
70 max-file-size: 100MB
71 max-request-size: 100MB
72
73 kafka:
74 bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092}
75 security:
76 protocol: PLAINTEXT
77 producer:
sourabh_sourabha287fc32023-06-15 03:12:29 +010078 value-serializer: io.cloudevents.kafka.CloudEventSerializer
emaclee9c126612023-04-16 17:48:15 +010079 client-id: cps-core
80 consumer:
81 group-id: ${NCMP_CONSUMER_GROUP_ID:ncmp-group}
82 key-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
83 value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
84 properties:
85 spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer
sourabh_sourabha287fc32023-06-15 03:12:29 +010086 spring.deserializer.value.delegate.class: io.cloudevents.kafka.CloudEventDeserializer
emaclee9c126612023-04-16 17:48:15 +010087 spring.json.use.type.headers: false
88
89 jackson:
90 default-property-inclusion: NON_NULL
91 serialization:
92 FAIL_ON_EMPTY_BEANS: false
93 sql:
94 init:
95 mode: ALWAYS
96app:
97 ncmp:
98 async-m2m:
99 topic: ${NCMP_ASYNC_M2M_TOPIC:ncmp-async-m2m}
100 avc:
halil.cakald7899562023-07-13 11:28:18 +0100101 subscription-topic: ${NCMP_CM_AVC_SUBSCRIPTION:subscription}
lukegleeson1f6008f2023-05-18 16:40:04 +0100102 subscription-forward-topic-prefix: ${NCMP_FORWARD_CM_AVC_SUBSCRIPTION:ncmp-dmi-cm-avc-subscription-}
lukegleeson3c0ea892023-04-06 15:28:56 +0100103 subscription-response-topic: ${NCMP_RESPONSE_CM_AVC_SUBSCRIPTION:dmi-ncmp-cm-avc-subscription}
halil.cakald7899562023-07-13 11:28:18 +0100104 subscription-outcome-topic: ${NCMP_OUTCOME_CM_AVC_SUBSCRIPTION:subscription-response}
emaclee9c126612023-04-16 17:48:15 +0100105 cm-events-topic: ${NCMP_CM_EVENTS_TOPIC:cm-events}
106 lcm:
107 events:
108 topic: ${LCM_EVENTS_TOPIC:ncmp-events}
109 dmi:
110 cm-events:
111 topic: ${DMI_CM_EVENTS_TOPIC:dmi-cm-events}
mpriyankf4778802023-07-26 17:33:35 +0100112 device-heartbeat:
113 topic: ${DMI_DEVICE_HEARTBEAT_TOPIC:dmi-device-heartbeat}
emaclee9c126612023-04-16 17:48:15 +0100114
115
116notification:
117 enabled: true
118 data-updated:
119 topic: ${CPS_CHANGE_EVENT_TOPIC:cps.data-updated-events}
120 filters:
121 enabled-dataspaces: ${NOTIFICATION_DATASPACE_FILTER_PATTERNS:""}
122 async:
123 executor:
124 core-pool-size: 2
125 max-pool-size: 10
126 queue-capacity: 500
127 wait-for-tasks-to-complete-on-shutdown: true
128 thread-name-prefix: Async-
129 time-out-value-in-ms: 2000
130
131springdoc:
132 swagger-ui:
133 disable-swagger-default-url: true
134 urlsPrimaryName: cps-core
135 urls:
136 - name: cps-core
137 url: /api-docs/cps-core/openapi.yaml
138 - name: cps-ncmp
139 url: /api-docs/cps-ncmp/openapi.yaml
140 - name: cps-ncmp-inventory
141 url: /api-docs/cps-ncmp/openapi-inventory.yaml
142
egernug477bd462023-09-21 17:51:21 +0100143permit-uri: /manage/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**
emaclee9c126612023-04-16 17:48:15 +0100144
145security:
146 # comma-separated uri patterns which do not require authorization
emaclee9c126612023-04-16 17:48:15 +0100147 auth:
148 username: ${CPS_USERNAME}
149 password: ${CPS_PASSWORD}
150
151# Actuator
152management:
153 server:
154 port: 8081
155 endpoints:
156 web:
157 base-path: /manage
158 exposure:
159 include: info,health,loggers,prometheus
160 endpoint:
161 health:
162 show-details: always
163 # kubernetes probes: liveness and readiness
164 probes:
165 enabled: true
166
167logging:
168 format: json
169 level:
170 org:
171 springframework: INFO
172 onap:
173 cps: INFO
174ncmp:
175 dmi:
176 auth:
177 username: ${DMI_USERNAME}
178 password: ${DMI_PASSWORD}
mpriyank612fb572023-08-01 15:36:27 +0100179 enabled: ${DMI_AUTH_ENABLED:true}
emaclee9c126612023-04-16 17:48:15 +0100180 api:
181 base-path: dmi
182
183 timers:
184 advised-modules-sync:
185 sleep-time-ms: 5000
186 locked-modules-sync:
187 sleep-time-ms: 300000
188 cm-handle-data-sync:
189 sleep-time-ms: 30000
lukegleeson3c0ea892023-04-06 15:28:56 +0100190 subscription-forwarding:
191 dmi-response-timeout-ms: 30000
192 model-loader:
193 retry-time-ms: 1000
halil.cakalc4485f72023-08-31 11:45:47 +0100194 trust-level:
195 dmi-availability-watchdog-ms: 30000
emaclee9c126612023-04-16 17:48:15 +0100196
197 modules-sync-watchdog:
198 async-executor:
199 parallelism-level: 10
200
201 model-loader:
emaclee505caef2023-05-09 09:18:05 +0100202 subscription: true
lukegleeson3c0ea892023-04-06 15:28:56 +0100203 maximum-attempt-count: 20
emaclee9c126612023-04-16 17:48:15 +0100204
205# Custom Hazelcast Config.
206hazelcast:
mpriyank74cf06f2023-04-28 15:02:00 +0100207 cluster-name: ${CPS_NCMP_CACHES_CLUSTER_NAME:"cps-and-ncmp-common-cache-cluster"}
lukegleeson3c0ea892023-04-06 15:28:56 +0100208 mode:
209 kubernetes:
210 enabled: ${HAZELCAST_MODE_KUBERNETES_ENABLED:false}
211 service-name: ${CPS_NCMP_SERVICE_NAME:"cps-and-ncmp-service"}