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 4e80857d7..c72de3d4b 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 @@ -281,7 +281,14 @@ class EnvoySnapshotFactory( // ClusterLoadAssignments many times - it may reduce MEM, CPU and latency if some serviceTags are // commonly used endpointsFactory.filterEndpoints(endpoints, routeSpec.settings.routingPolicy).let { - endpointsFactory.assignLocalityWeights(routeSpec, it) + endpointsFactory.assignLocalityWeights(routeSpec, it).also { la -> + if (la.endpointsList.any { el -> el.lbEndpointsList.isEmpty() }) { + logger.warn( + "ClusterLoadAssignment for ${routeSpec.clusterName} has empty lbEndpoints, " + + "original clusterLoadAssignment: ${endpoints.toString()}" + ) + } + } } } }