Merge "Part 1: Refactor CPS Delta code to utility class"
[cps.git] / cps-application / src / main / resources / application.yml
index 094046c..26cc9e0 100644 (file)
@@ -1,8 +1,8 @@
 #  ============LICENSE_START=======================================================
 #  Copyright (C) 2021 Pantheon.tech
 #  Modifications Copyright (C) 2021-2022 Bell Canada
-#  Modifications Copyright (C) 2021-2024 Nordix Foundation
 #  Modifications Copyright (C) 2024 TechMahindra Ltd
+#  Modifications Copyright (C) 2021-2025 OpenInfra Foundation Europe. All rights reserved.
 #  ================================================================================
 #  Licensed under the Apache License, Version 2.0 (the "License");
 #  you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ spring:
             hibernate.jdbc.batch_size: 100
 
     datasource:
-        url: jdbc:postgresql://${DB_HOST}:${DB_PORT:5432}/cpsdb
+        url: jdbc:postgresql://${DB_HOST:localhost}:${DB_PORT:5432}/cpsdb
         username: ${DB_USERNAME}
         password: ${DB_PASSWORD}
         driverClassName: org.postgresql.Driver
@@ -106,6 +106,7 @@ app:
             cm-subscription-dmi-out: ${CM_SUBSCRIPTION_DMI_OUT_TOPIC:dmi-ncmp-cm-avc-subscription}
             cm-subscription-ncmp-out: ${CM_SUBSCRIPTION_NCMP_OUT_TOPIC:subscription-response}
             cm-events-topic: ${NCMP_CM_EVENTS_TOPIC:cm-events}
+            inventory-events-topic: ncmp-inventory-events
     lcm:
         events:
             topic: ${LCM_EVENTS_TOPIC:ncmp-events}
@@ -116,11 +117,9 @@ app:
             topic: ${DMI_DEVICE_HEARTBEAT_TOPIC:dmi-device-heartbeat}
     cps:
         data-updated:
-            change-event-notifications-enabled: ${CPS_CHANGE_EVENT_NOTIFICATIONS_ENABLED:true}
+            change-event-notifications-enabled: ${CPS_CHANGE_EVENT_NOTIFICATIONS_ENABLED:false}
             topic: ${CPS_CHANGE_EVENT_TOPIC:cps-data-updated-events}
 
-
-
 notification:
     enabled: true
     async:
@@ -144,19 +143,30 @@ springdoc:
             - name: cps-ncmp-inventory
               url: /api-docs/cps-ncmp/openapi-inventory.yaml
 
-security:
-    # comma-separated uri patterns which do not require authorization
-    permit-uri: /actuator/**,/swagger-ui.html,/swagger-ui/**,/swagger-resources/**,/api-docs/**,/v3/api-docs/**
-    auth:
-        username: ${CPS_USERNAME:cpsuser}
-        password: ${CPS_PASSWORD:cpsr0cks!}
+cps:
+    monitoring:
+        micrometer-jvm-extras: false
+    tracing:
+        sampler:
+            jaeger_remote:
+                endpoint: ${ONAP_OTEL_SAMPLER_JAEGER_REMOTE_ENDPOINT:http://onap-otel-collector:14250}
+        exporter:
+            endpoint: ${ONAP_OTEL_EXPORTER_ENDPOINT:http://onap-otel-collector:4317}
+            protocol: ${ONAP_OTEL_EXPORTER_PROTOCOL:grpc}
+        enabled: ${ONAP_TRACING_ENABLED:false}
+        excluded-observation-names: ${ONAP_EXCLUDED_OBSERVATION_NAMES:tasks.scheduled.execution}
 
 # Actuator
 management:
+    tracing:
+        propagation:
+            produce: ${ONAP_PROPAGATOR_PRODUCE:[W3C]}
+        sampling:
+            probability: 1.0
     endpoints:
         web:
             exposure:
-                include: info,health,loggers,prometheus
+                include: info,health,loggers,prometheus,metrics,heapdump,threaddump
     endpoint:
         health:
             show-details: always
@@ -164,6 +174,11 @@ management:
             probes:
                 enabled: true
 
+    info:
+        git:
+            enabled: true
+            mode: full
+
 logging:
     format: json
     level:
@@ -172,13 +187,39 @@ logging:
             onap:
                 cps: INFO
 ncmp:
+    policy-executor:
+        enabled: ${POLICY_SERVICE_ENABLED:false}
+        defaultDecision: ${POLICY_SERVICE_DEFAULT_DECISION:"allow"}
+        server:
+            address: ${POLICY_SERVICE_URL:http://policy-executor-stub}
+            port: ${POLICY_SERVICE_PORT:8093}
+        httpclient:
+            all-services:
+                maximumInMemorySizeInMegabytes: 16
+                maximumConnectionsTotal: 100
+                pendingAcquireMaxCount: 50
+                connectionTimeoutInSeconds: 30
+                readTimeoutInSeconds: 30
+                writeTimeoutInSeconds: 30
+                responseTimeoutInSeconds: 60
     dmi:
         httpclient:
-            connectionTimeoutInSeconds: 30
-            maximumConnectionsPerRoute: 50
-            maximumConnectionsTotal: 100
-            idleConnectionEvictionThresholdInSeconds: 5
-            maximumInMemorySizeInMegabytes: 16
+            data-services:
+                maximumInMemorySizeInMegabytes: 16
+                maximumConnectionsTotal: 100
+                pendingAcquireMaxCount: 50
+                connectionTimeoutInSeconds: 30
+                readTimeoutInSeconds: 30
+                writeTimeoutInSeconds: 30
+                responseTimeoutInSeconds: 60
+            model-services:
+                maximumInMemorySizeInMegabytes: 16
+                maximumConnectionsTotal: 100
+                pendingAcquireMaxCount: 50
+                connectionTimeoutInSeconds: 30
+                readTimeoutInSeconds: 30
+                writeTimeoutInSeconds: 30
+                responseTimeoutInSeconds: 60
         auth:
             username: ${DMI_USERNAME:cpsuser}
             password: ${DMI_PASSWORD:cpsr0cks!}
@@ -188,10 +229,10 @@ ncmp:
 
     timers:
         advised-modules-sync:
+            initial-delay-ms: 40000
             sleep-time-ms: 5000
-        locked-modules-sync:
-            sleep-time-ms: 300000
         cm-handle-data-sync:
+            initial-delay-ms: 40000
             sleep-time-ms: 30000
         subscription-forwarding:
             dmi-response-timeout-ms: 30000
@@ -200,17 +241,20 @@ ncmp:
         trust-level:
             dmi-availability-watchdog-ms: 30000
 
-    modules-sync-watchdog:
-        async-executor:
-            parallelism-level: 10
-
     model-loader:
         maximum-attempt-count: 20
 
 # Custom Hazelcast Config.
 hazelcast:
     cluster-name: ${CPS_NCMP_CACHES_CLUSTER_NAME:"cps-and-ncmp-common-cache-cluster"}
+    instance-config-name: ${CPS_NCMP_INSTANCE_CONFIG_NAME:"cps-and-ncmp-hazelcast-instance-config"}
     mode:
         kubernetes:
             enabled: ${HAZELCAST_MODE_KUBERNETES_ENABLED:false}
             service-name: ${CPS_NCMP_SERVICE_NAME:"cps-and-ncmp-service"}
+
+otel:
+    exporter:
+        otlp:
+            traces:
+                protocol: ${ONAP_OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:grpc}