Skip to content

Commit

Permalink
added log for empty load assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
nastassia-dailidava committed Dec 17, 2024
1 parent 866410f commit 868ea71
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,19 @@ class EnvoySnapshotFactory(
val endpoints = getServicesEndpointsForGroup(
group.proxySettings.incoming.rateLimitEndpoints, globalSnapshot,
egressRouteSpecification
)
).also { e ->
val list = e.mapNotNull { el -> el.endpointsList.find { x -> x.lbEndpointsList.isEmpty() } }
val rPolicy = group.proxySettings.outgoing.defaultServiceSettings.routingPolicy
if (list.isNotEmpty() &&
list.none { it.locality.zone.contains(properties.loadBalancing.trafficSplitting.zoneName) } &&
rPolicy.autoServiceTag
) {
logger.warn(
"Some of service ${group.serviceName} dependencies have ClusterLoadAssignment with empty " +
"lbEndpoints: $list, routingPolicy: $rPolicy, all endpoints: $e"
)
}
}

val version = snapshotsVersions.version(group, clusters, endpoints, listeners, routes)
return createSnapshot(
Expand Down

0 comments on commit 868ea71

Please sign in to comment.