Merge pull request #90280 from gaurav1086/azure_lb_remove_unncessary_check

[Provider/Azure] remove unncessary nil check for range
This commit is contained in:
Kubernetes Prow Robot 2020-04-19 18:05:38 -07:00 committed by GitHub
commit 32540b0eaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,7 +265,6 @@ func (az *Cloud) getServiceLoadBalancer(service *v1.Service, clusterName string,
}
// check if the service already has a load balancer
if existingLBs != nil {
for i := range existingLBs {
existingLB := existingLBs[i]
if strings.EqualFold(*existingLB.Name, defaultLBName) {
@ -285,7 +284,6 @@ func (az *Cloud) getServiceLoadBalancer(service *v1.Service, clusterName string,
return &existingLB, status, true, nil
}
}
hasMode, _, _ := getServiceLoadBalancerMode(service)
if az.useStandardLoadBalancer() && hasMode {