emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 1 | # ============LICENSE_START======================================================= |
| 2 | # Copyright (C) 2021 Pantheon.tech |
| 3 | # Modifications Copyright (C) 2021-2022 Bell Canada |
danielhanrahan | 36b81b2 | 2023-08-17 14:58:30 +0100 | [diff] [blame] | 4 | # Modifications Copyright (C) 2021-2024 Nordix Foundation |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 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 | |
| 21 | server: |
| 22 | port: 8080 |
| 23 | |
| 24 | rest: |
| 25 | api: |
| 26 | cps-base-path: /cps/api |
| 27 | ncmp-base-path: /ncmp |
| 28 | ncmp-inventory-base-path: /ncmpInventory |
| 29 | |
| 30 | spring: |
| 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: |
egernug | 186b901 | 2023-09-27 10:49:45 +0100 | [diff] [blame] | 40 | hibernate.enable_lazy_load_no_trans: true |
| 41 | hibernate.dialect: org.hibernate.dialect.PostgreSQLDialect |
danielhanrahan | 36b81b2 | 2023-08-17 14:58:30 +0100 | [diff] [blame] | 42 | # Please ensure these values match those used in integration-test/src/test/resources/application.yml |
| 43 | hibernate.id.new_generator_mappings: true |
| 44 | hibernate.jdbc.batch_size: 100 |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 45 | |
| 46 | datasource: |
| 47 | url: jdbc:postgresql://${DB_HOST}:${DB_PORT:5432}/cpsdb |
| 48 | username: ${DB_USERNAME} |
| 49 | password: ${DB_PASSWORD} |
| 50 | driverClassName: org.postgresql.Driver |
| 51 | hikari: |
| 52 | minimumIdle: 5 |
| 53 | maximumPoolSize: 80 |
| 54 | idleTimeout: 60000 |
danielhanrahan | bbfb061 | 2024-04-16 22:04:44 +0100 | [diff] [blame] | 55 | connectionTimeout: 30000 |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 56 | leakDetectionThreshold: 30000 |
| 57 | pool-name: CpsDatabasePool |
| 58 | |
| 59 | cache: |
| 60 | type: caffeine |
| 61 | cache-names: yangSchema |
| 62 | caffeine: |
| 63 | spec: maximumSize=10000,expireAfterAccess=10m |
| 64 | |
| 65 | liquibase: |
| 66 | change-log: classpath:changelog/changelog-master.yaml |
emaclee | ea7d1b4 | 2024-03-24 19:05:34 +0000 | [diff] [blame] | 67 | label-filter: ${LIQUIBASE_LABELS} |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 68 | |
| 69 | servlet: |
| 70 | multipart: |
| 71 | enabled: true |
| 72 | max-file-size: 100MB |
| 73 | max-request-size: 100MB |
| 74 | |
| 75 | kafka: |
| 76 | bootstrap-servers: ${KAFKA_BOOTSTRAP_SERVER:localhost:9092} |
| 77 | security: |
| 78 | protocol: PLAINTEXT |
| 79 | producer: |
sourabh_sourabh | a287fc3 | 2023-06-15 03:12:29 +0100 | [diff] [blame] | 80 | value-serializer: io.cloudevents.kafka.CloudEventSerializer |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 81 | client-id: cps-core |
| 82 | consumer: |
| 83 | group-id: ${NCMP_CONSUMER_GROUP_ID:ncmp-group} |
| 84 | key-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer |
| 85 | value-deserializer: org.springframework.kafka.support.serializer.ErrorHandlingDeserializer |
| 86 | properties: |
| 87 | spring.deserializer.key.delegate.class: org.apache.kafka.common.serialization.StringDeserializer |
sourabh_sourabh | a287fc3 | 2023-06-15 03:12:29 +0100 | [diff] [blame] | 88 | spring.deserializer.value.delegate.class: io.cloudevents.kafka.CloudEventDeserializer |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 89 | spring.json.use.type.headers: false |
| 90 | |
| 91 | jackson: |
| 92 | default-property-inclusion: NON_NULL |
| 93 | serialization: |
| 94 | FAIL_ON_EMPTY_BEANS: false |
| 95 | sql: |
| 96 | init: |
| 97 | mode: ALWAYS |
| 98 | app: |
| 99 | ncmp: |
| 100 | async-m2m: |
| 101 | topic: ${NCMP_ASYNC_M2M_TOPIC:ncmp-async-m2m} |
| 102 | avc: |
halil.cakal | d789956 | 2023-07-13 11:28:18 +0100 | [diff] [blame] | 103 | subscription-topic: ${NCMP_CM_AVC_SUBSCRIPTION:subscription} |
lukegleeson | 1f6008f | 2023-05-18 16:40:04 +0100 | [diff] [blame] | 104 | subscription-forward-topic-prefix: ${NCMP_FORWARD_CM_AVC_SUBSCRIPTION:ncmp-dmi-cm-avc-subscription-} |
lukegleeson | 3c0ea89 | 2023-04-06 15:28:56 +0100 | [diff] [blame] | 105 | subscription-response-topic: ${NCMP_RESPONSE_CM_AVC_SUBSCRIPTION:dmi-ncmp-cm-avc-subscription} |
halil.cakal | d789956 | 2023-07-13 11:28:18 +0100 | [diff] [blame] | 106 | subscription-outcome-topic: ${NCMP_OUTCOME_CM_AVC_SUBSCRIPTION:subscription-response} |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 107 | cm-events-topic: ${NCMP_CM_EVENTS_TOPIC:cm-events} |
| 108 | lcm: |
| 109 | events: |
| 110 | topic: ${LCM_EVENTS_TOPIC:ncmp-events} |
| 111 | dmi: |
| 112 | cm-events: |
| 113 | topic: ${DMI_CM_EVENTS_TOPIC:dmi-cm-events} |
mpriyank | f477880 | 2023-07-26 17:33:35 +0100 | [diff] [blame] | 114 | device-heartbeat: |
| 115 | topic: ${DMI_DEVICE_HEARTBEAT_TOPIC:dmi-device-heartbeat} |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 116 | |
| 117 | |
| 118 | notification: |
| 119 | enabled: true |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 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- |
mpriyank | 6b0e6b3 | 2024-03-08 12:50:53 +0000 | [diff] [blame] | 127 | time-out-value-in-ms: 60000 |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 128 | |
| 129 | springdoc: |
| 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 | |
egernug | ff59842 | 2023-11-27 12:52:07 +0000 | [diff] [blame] | 141 | |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 142 | |
| 143 | security: |
| 144 | # comma-separated uri patterns which do not require authorization |
waqas.ikram | 7a397ca | 2024-01-25 11:36:16 +0000 | [diff] [blame] | 145 | permit-uri: /actuator/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**,/v3/api-docs/** |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 146 | auth: |
| 147 | username: ${CPS_USERNAME} |
| 148 | password: ${CPS_PASSWORD} |
| 149 | |
| 150 | # Actuator |
| 151 | management: |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 152 | endpoints: |
| 153 | web: |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 154 | exposure: |
| 155 | include: info,health,loggers,prometheus |
| 156 | endpoint: |
| 157 | health: |
| 158 | show-details: always |
| 159 | # kubernetes probes: liveness and readiness |
| 160 | probes: |
| 161 | enabled: true |
| 162 | |
| 163 | logging: |
| 164 | format: json |
| 165 | level: |
| 166 | org: |
| 167 | springframework: INFO |
| 168 | onap: |
| 169 | cps: INFO |
| 170 | ncmp: |
| 171 | dmi: |
waqas.ikram | 177d66d | 2023-12-19 15:24:28 +0000 | [diff] [blame] | 172 | httpclient: |
danielhanrahan | bbfb061 | 2024-04-16 22:04:44 +0100 | [diff] [blame] | 173 | connectionTimeoutInSeconds: 30 |
waqas.ikram | 177d66d | 2023-12-19 15:24:28 +0000 | [diff] [blame] | 174 | maximumConnectionsPerRoute: 50 |
| 175 | maximumConnectionsTotal: 100 |
| 176 | idleConnectionEvictionThresholdInSeconds: 5 |
leventecsanyi | 5a48974 | 2024-04-26 13:35:32 +0200 | [diff] [blame^] | 177 | maximumInMemorySizeInMegabytes: 16 |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 178 | auth: |
| 179 | username: ${DMI_USERNAME} |
| 180 | password: ${DMI_PASSWORD} |
mpriyank | 612fb57 | 2023-08-01 15:36:27 +0100 | [diff] [blame] | 181 | enabled: ${DMI_AUTH_ENABLED:true} |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 182 | api: |
| 183 | base-path: dmi |
| 184 | |
| 185 | timers: |
| 186 | advised-modules-sync: |
| 187 | sleep-time-ms: 5000 |
| 188 | locked-modules-sync: |
| 189 | sleep-time-ms: 300000 |
| 190 | cm-handle-data-sync: |
| 191 | sleep-time-ms: 30000 |
lukegleeson | 3c0ea89 | 2023-04-06 15:28:56 +0100 | [diff] [blame] | 192 | subscription-forwarding: |
| 193 | dmi-response-timeout-ms: 30000 |
| 194 | model-loader: |
| 195 | retry-time-ms: 1000 |
halil.cakal | c4485f7 | 2023-08-31 11:45:47 +0100 | [diff] [blame] | 196 | trust-level: |
| 197 | dmi-availability-watchdog-ms: 30000 |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 198 | |
| 199 | modules-sync-watchdog: |
| 200 | async-executor: |
| 201 | parallelism-level: 10 |
| 202 | |
| 203 | model-loader: |
lukegleeson | 3c0ea89 | 2023-04-06 15:28:56 +0100 | [diff] [blame] | 204 | maximum-attempt-count: 20 |
emaclee | 9c12661 | 2023-04-16 17:48:15 +0100 | [diff] [blame] | 205 | |
| 206 | # Custom Hazelcast Config. |
| 207 | hazelcast: |
mpriyank | 74cf06f | 2023-04-28 15:02:00 +0100 | [diff] [blame] | 208 | cluster-name: ${CPS_NCMP_CACHES_CLUSTER_NAME:"cps-and-ncmp-common-cache-cluster"} |
lukegleeson | 3c0ea89 | 2023-04-06 15:28:56 +0100 | [diff] [blame] | 209 | mode: |
| 210 | kubernetes: |
| 211 | enabled: ${HAZELCAST_MODE_KUBERNETES_ENABLED:false} |
waqas.ikram | 7a397ca | 2024-01-25 11:36:16 +0000 | [diff] [blame] | 212 | service-name: ${CPS_NCMP_SERVICE_NAME:"cps-and-ncmp-service"} |