From 4cf55371679a4df95a4c66832a61fa199c947d88 Mon Sep 17 00:00:00 2001 From: "nastassia.dailidava" Date: Tue, 12 Dec 2023 11:44:06 +0100 Subject: [PATCH] Logs for vte --- .../envoycontrol/snapshot/EnvoySnapshotFactory.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 ae160ef02..a22da7e39 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 @@ -226,8 +226,12 @@ class EnvoySnapshotFactory( val trafficSplitting = properties.loadBalancing.trafficSplitting val weights = trafficSplitting.serviceByWeightsProperties[serviceName] val enabledForDependency = globalSnapshot.endpoints[clusterName]?.endpointsList - ?.any { e -> trafficSplitting.zoneName == e.locality.zone } + ?.any { e -> trafficSplitting.zoneName == e.locality.zone && e.lbEndpointsCount > 0 } ?: false + logger.debug( + "Building route spec, weights: $weights, " + + "serviceName: $serviceName, outgoing dependency clusterName: $clusterName, enabled: $enabledForDependency" + ) return if (weights != null && enabledForDependency) { logger.debug( "Building traffic splitting route spec, weights: $weights, " +