Skip to content

Commit

Permalink
fix(MeshLoadBalancingStrategy): set all priorities equal is localityA…
Browse files Browse the repository at this point in the history
…wareness is disabled

Signed-off-by: Mike Beaumont <[email protected]>
  • Loading branch information
michaelbeaumont committed Nov 5, 2024
1 parent 863d1bf commit 799b52a
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,15 @@ func configureEndpoints(
}
}
}
if conf.LocalityAwareness != nil && pointer.Deref(conf.LocalityAwareness.Disabled) {
for _, cla := range endpoints {
for _, localityLbEndpoints := range cla.Endpoints {
if localityLbEndpoints.Locality != nil && localityLbEndpoints.Locality.Zone != localZone {
localityLbEndpoints.Priority = 0
}
}
}
}
return nil
}

Expand Down

0 comments on commit 799b52a

Please sign in to comment.