Skip to content

Commit

Permalink
For LoadBalancer Service type don't create a HNS policy for empty or …
Browse files Browse the repository at this point in the history
…invalid external loadbalancer IP
  • Loading branch information
sbangari committed Mar 14, 2021
1 parent 4b39e92 commit 8d7f96f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/proxy/winkernel/proxier.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,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
}
Expand Down

0 comments on commit 8d7f96f

Please sign in to comment.