blob: 89969b9c6ac697163a9fe5406dccba1e45894b3d [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:
egernug186b9012023-09-27 10:49:45 +010040 hibernate.enable_lazy_load_no_trans: true
41 hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect
emaclee9c126612023-04-16 17:48:15 +010042
43 datasource:
44 url: jdbc:postgresql://${DB_HOST}:${DB_PORT:5432}/cpsdb
45 username: ${DB_USERNAME}
46 password: ${DB_PASSWORD}
47 driverClassName: org.postgresql.Driver
48 hikari:
49 minimumIdle: 5
50 maximumPoolSize: 80
51 idleTimeout: 60000
52 connectionTimeout: 120000
53 leakDetectionThreshold: 30000
54 pool-name: CpsDatabasePool
55
56 cache:
57 type: caffeine
58 cache-names: yangSchema
59 caffeine:
60 spec: maximumSize=10000,expireAfterAccess=10m
61
62 liquibase:
63 change-log: classpath:changelog/changelog-master.yaml
64 labels: ${LIQUIBASE_LABELS}
65
66 servlet:
67 multipart:
68 enabled: true
69 max-file-size: 100MB
70 max-request-size: 100MB
71
72 kafka:
73 bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092}
74 security:
75 protocol: PLAINTEXT
76 producer:
sourabh_sourabha287fc32023-06-15 03:12:29 +010077 value-serializer: io.cloudevents.kafka.CloudEventSerializer
emaclee9c126612023-04-16 17:48:15 +010078 client-id: cps-core
79 consumer:
80 group-id: ${NCMP_CONSUMER_GROUP_ID:ncmp-group}
81 key-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
82 value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer
83 properties:
84 spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer
sourabh_sourabha287fc32023-06-15 03:12:29 +010085 spring.deserializer.value.delegate.class: io.cloudevents.kafka.CloudEventDeserializer
emaclee9c126612023-04-16 17:48:15 +010086 spring.json.use.type.headers: false
87
88 jackson:
89 default-property-inclusion: NON_NULL
90 serialization:
91 FAIL_ON_EMPTY_BEANS: false
92 sql:
93 init:
94 mode: ALWAYS
95app:
96 ncmp:
97 async-m2m:
98 topic: ${NCMP_ASYNC_M2M_TOPIC:ncmp-async-m2m}
99 avc:
halil.cakald7899562023-07-13 11:28:18 +0100100 subscription-topic: ${NCMP_CM_AVC_SUBSCRIPTION:subscription}
lukegleeson1f6008f2023-05-18 16:40:04 +0100101 subscription-forward-topic-prefix: ${NCMP_FORWARD_CM_AVC_SUBSCRIPTION:ncmp-dmi-cm-avc-subscription-}
lukegleeson3c0ea892023-04-06 15:28:56 +0100102 subscription-response-topic: ${NCMP_RESPONSE_CM_AVC_SUBSCRIPTION:dmi-ncmp-cm-avc-subscription}
halil.cakald7899562023-07-13 11:28:18 +0100103 subscription-outcome-topic: ${NCMP_OUTCOME_CM_AVC_SUBSCRIPTION:subscription-response}
emaclee9c126612023-04-16 17:48:15 +0100104 cm-events-topic: ${NCMP_CM_EVENTS_TOPIC:cm-events}
105 lcm:
106 events:
107 topic: ${LCM_EVENTS_TOPIC:ncmp-events}
108 dmi:
109 cm-events:
110 topic: ${DMI_CM_EVENTS_TOPIC:dmi-cm-events}
mpriyankf4778802023-07-26 17:33:35 +0100111 device-heartbeat:
112 topic: ${DMI_DEVICE_HEARTBEAT_TOPIC:dmi-device-heartbeat}
emaclee9c126612023-04-16 17:48:15 +0100113
114
115notification:
116 enabled: true
117 data-updated:
118 topic: ${CPS_CHANGE_EVENT_TOPIC:cps.data-updated-events}
119 filters:
120 enabled-dataspaces: ${NOTIFICATION_DATASPACE_FILTER_PATTERNS:""}
121 async:
122 executor:
123 core-pool-size: 2
124 max-pool-size: 10
125 queue-capacity: 500
126 wait-for-tasks-to-complete-on-shutdown: true
127 thread-name-prefix: Async-
128 time-out-value-in-ms: 2000
129
130springdoc:
131 swagger-ui:
132 disable-swagger-default-url: true
133 urlsPrimaryName: cps-core
134 urls:
135 - name: cps-core
136 url: /api-docs/cps-core/openapi.yaml
137 - name: cps-ncmp
138 url: /api-docs/cps-ncmp/openapi.yaml
139 - name: cps-ncmp-inventory
140 url: /api-docs/cps-ncmp/openapi-inventory.yaml
141
egernugff598422023-11-27 12:52:07 +0000142
emaclee9c126612023-04-16 17:48:15 +0100143
144security:
145 # comma-separated uri patterns which do not require authorization
egernugff598422023-11-27 12:52:07 +0000146 permit-uri: /actuator/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**
emaclee9c126612023-04-16 17:48:15 +0100147 auth:
148 username: ${CPS_USERNAME}
149 password: ${CPS_PASSWORD}
150
151# Actuator
152management:
emaclee9c126612023-04-16 17:48:15 +0100153 endpoints:
154 web:
emaclee9c126612023-04-16 17:48:15 +0100155 exposure:
156 include: info,health,loggers,prometheus
157 endpoint:
158 health:
159 show-details: always
160 # kubernetes probes: liveness and readiness
161 probes:
162 enabled: true
163
164logging:
165 format: json
166 level:
167 org:
168 springframework: INFO
169 onap:
170 cps: INFO
171ncmp:
172 dmi:
173 auth:
174 username: ${DMI_USERNAME}
175 password: ${DMI_PASSWORD}
mpriyank612fb572023-08-01 15:36:27 +0100176 enabled: ${DMI_AUTH_ENABLED:true}
emaclee9c126612023-04-16 17:48:15 +0100177 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
halil.cakalc4485f72023-08-31 11:45:47 +0100191 trust-level:
192 dmi-availability-watchdog-ms: 30000
emaclee9c126612023-04-16 17:48:15 +0100193
194 modules-sync-watchdog:
195 async-executor:
196 parallelism-level: 10
197
198 model-loader:
emaclee505caef2023-05-09 09:18:05 +0100199 subscription: true
lukegleeson3c0ea892023-04-06 15:28:56 +0100200 maximum-attempt-count: 20
emaclee9c126612023-04-16 17:48:15 +0100201
202# Custom Hazelcast Config.
203hazelcast:
mpriyank74cf06f2023-04-28 15:02:00 +0100204 cluster-name: ${CPS_NCMP_CACHES_CLUSTER_NAME:"cps-and-ncmp-common-cache-cluster"}
lukegleeson3c0ea892023-04-06 15:28:56 +0100205 mode:
206 kubernetes:
207 enabled: ${HAZELCAST_MODE_KUBERNETES_ENABLED:false}
208 service-name: ${CPS_NCMP_SERVICE_NAME:"cps-and-ncmp-service"}