blob: ed71339f93193da60c8aa5784dc580369ac0b265 [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:
101 subscription-topic: ${NCMP_CM_AVC_SUBSCRIPTION:cm-avc-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}
104 subscription-outcome-topic: ${NCMP_OUTCOME_CM_AVC_SUBSCRIPTION:cm-avc-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}
112
113
114notification:
115 enabled: true
116 data-updated:
117 topic: ${CPS_CHANGE_EVENT_TOPIC:cps.data-updated-events}
118 filters:
119 enabled-dataspaces: ${NOTIFICATION_DATASPACE_FILTER_PATTERNS:""}
120 async:
121 executor:
122 core-pool-size: 2
123 max-pool-size: 10
124 queue-capacity: 500
125 wait-for-tasks-to-complete-on-shutdown: true
126 thread-name-prefix: Async-
127 time-out-value-in-ms: 2000
128
129springdoc:
130 swagger-ui:
131 disable-swagger-default-url: true
132 urlsPrimaryName: cps-core
133 urls:
134 - name: cps-core
135 url: /api-docs/cps-core/openapi.yaml
136 - name: cps-ncmp
137 url: /api-docs/cps-ncmp/openapi.yaml
138 - name: cps-ncmp-inventory
139 url: /api-docs/cps-ncmp/openapi-inventory.yaml
140
141
142security:
143 # comma-separated uri patterns which do not require authorization
144 permit-uri: /manage/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**
145 auth:
146 username: ${CPS_USERNAME}
147 password: ${CPS_PASSWORD}
148
149# Actuator
150management:
151 server:
152 port: 8081
153 endpoints:
154 web:
155 base-path: /manage
156 exposure:
157 include: info,health,loggers,prometheus
158 endpoint:
159 health:
160 show-details: always
161 # kubernetes probes: liveness and readiness
162 probes:
163 enabled: true
164
165logging:
166 format: json
167 level:
168 org:
169 springframework: INFO
170 onap:
171 cps: INFO
172ncmp:
173 dmi:
174 auth:
175 username: ${DMI_USERNAME}
176 password: ${DMI_PASSWORD}
177 api:
178 base-path: dmi
179
180 timers:
181 advised-modules-sync:
182 sleep-time-ms: 5000
183 locked-modules-sync:
184 sleep-time-ms: 300000
185 cm-handle-data-sync:
186 sleep-time-ms: 30000
lukegleeson3c0ea892023-04-06 15:28:56 +0100187 subscription-forwarding:
188 dmi-response-timeout-ms: 30000
189 model-loader:
190 retry-time-ms: 1000
emaclee9c126612023-04-16 17:48:15 +0100191
192 modules-sync-watchdog:
193 async-executor:
194 parallelism-level: 10
195
196 model-loader:
emaclee505caef2023-05-09 09:18:05 +0100197 subscription: true
lukegleeson3c0ea892023-04-06 15:28:56 +0100198 maximum-attempt-count: 20
emaclee9c126612023-04-16 17:48:15 +0100199
200# Custom Hazelcast Config.
201hazelcast:
mpriyank74cf06f2023-04-28 15:02:00 +0100202 cluster-name: ${CPS_NCMP_CACHES_CLUSTER_NAME:"cps-and-ncmp-common-cache-cluster"}
lukegleeson3c0ea892023-04-06 15:28:56 +0100203 mode:
204 kubernetes:
205 enabled: ${HAZELCAST_MODE_KUBERNETES_ENABLED:false}
206 service-name: ${CPS_NCMP_SERVICE_NAME:"cps-and-ncmp-service"}