From f03c8f9d81cf72b8c24a8030020fc4e4d5032cd1 Mon Sep 17 00:00:00 2001 From: "nastassia.dailidava" Date: Thu, 14 Sep 2023 17:51:24 +0200 Subject: [PATCH] Added logs #292 --- .../envoycontrol/snapshot/EnvoySnapshotFactory.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/EnvoySnapshotFactory.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/EnvoySnapshotFactory.kt index 135b9e787..04809c8c4 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/EnvoySnapshotFactory.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/EnvoySnapshotFactory.kt @@ -113,6 +113,7 @@ class EnvoySnapshotFactory( val removedClusters = previous - current.keys current + removedClusters } + false -> current } } @@ -198,6 +199,7 @@ class EnvoySnapshotFactory( is ServicesGroup -> { definedServicesRoutes } + is AllServicesGroup -> { val servicesNames = group.proxySettings.outgoing.getServiceDependencies().map { it.service }.toSet() val allServicesRoutes = globalSnapshot.allServicesNames.subtract(servicesNames).map { @@ -226,6 +228,10 @@ class EnvoySnapshotFactory( val enabledForDependency = globalSnapshot.endpoints[clusterName]?.endpointsList ?.any { e -> trafficSplitting.zoneName == e.locality.zone } ?: false + logger.debug( + "Traffic splitting route spec, enabled: $trafficSplitting, " + + "weights: $weights, enabledForDependency: $enabledForDependency" + ) return if (weights != null && enabledForDependency) { WeightRouteSpecification( clusterName,