From e617418b92ae7f4cec9529d3572fcd3849c378a2 Mon Sep 17 00:00:00 2001 From: "nastassia.dailidava" Date: Tue, 5 Dec 2023 17:20:15 +0100 Subject: [PATCH] Fixed traffic splitting condition for cluster configuration --- CHANGELOG.md | 5 +++++ .../snapshot/resource/clusters/EnvoyClustersFactory.kt | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 060f0a016..f3bf18332 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ Lists all changes with user impact. The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/). +## [0.20.3] + +### Changed +- Fixed traffic splitting condition check for cluster configuration + ## [0.20.2] ### Changed diff --git a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactory.kt b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactory.kt index 60e46e1d5..b0601c06d 100644 --- a/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactory.kt +++ b/envoy-control-core/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/snapshot/resource/clusters/EnvoyClustersFactory.kt @@ -304,7 +304,7 @@ class EnvoyClustersFactory( clusterLoadAssignment: ClusterLoadAssignment?, trafficSplitting: TrafficSplittingProperties ) = clusterLoadAssignment?.endpointsList - ?.any { e -> trafficSplitting.zoneName == e.locality.zone } ?: false + ?.any { e -> trafficSplitting.zoneName == e.locality.zone && e.lbEndpointsCount > 0 } ?: false private fun shouldAddDynamicForwardProxyCluster(group: Group) = group.proxySettings.outgoing.getDomainPatternDependencies().isNotEmpty()