Merge pull request #99958 from sbangari/winkubeproxylbservicefix

For LoadBalancer Service type don't create a HNS policy for empty or invalid external loadbalancer IP
This commit is contained in:
Kubernetes Prow Robot 2021-03-10 00:35:35 -08:00 committed by GitHub
commit b014610de3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -410,7 +410,9 @@ func (proxier *Proxier) newServiceInfo(port *v1.ServicePort, service *v1.Service
}
for _, ingress := range service.Status.LoadBalancer.Ingress {
info.loadBalancerIngressIPs = append(info.loadBalancerIngressIPs, &loadBalancerIngressInfo{ip: ingress.IP})
if net.ParseIP(ingress.IP) != nil {
info.loadBalancerIngressIPs = append(info.loadBalancerIngressIPs, &loadBalancerIngressInfo{ip: ingress.IP})
}
}
return info
}