mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Ensure expected load balancer is selected for Azure
Without this, the last element of LB list is always selected.
This commit is contained in:
parent
e7ed9b408a
commit
0f0e271936
@ -199,7 +199,8 @@ func (az *Cloud) getServiceLoadBalancer(service *v1.Service, clusterName string,
|
|||||||
|
|
||||||
// check if the service already has a load balancer
|
// check if the service already has a load balancer
|
||||||
if existingLBs != nil {
|
if existingLBs != nil {
|
||||||
for _, existingLB := range existingLBs {
|
for i := range existingLBs {
|
||||||
|
existingLB := existingLBs[i]
|
||||||
if strings.EqualFold(*existingLB.Name, defaultLBName) {
|
if strings.EqualFold(*existingLB.Name, defaultLBName) {
|
||||||
defaultLB = &existingLB
|
defaultLB = &existingLB
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user