Skip to content

Commit

Permalink
Merge pull request #101690 from fenngwd/fix/ingress_ip_blank
Browse files Browse the repository at this point in the history
Check IP of Ingress blank before append
  • Loading branch information
k8s-ci-robot committed May 13, 2021
2 parents 2a10646 + 63f9b39 commit 24727b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/proxy/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ func (sct *ServiceChangeTracker) newBaseServiceInfo(port *v1.ServicePort, servic
// Obtain Load Balancer Ingress IPs
var ips []string
for _, ing := range service.Status.LoadBalancer.Ingress {
ips = append(ips, ing.IP)
if ing.IP != "" {
ips = append(ips, ing.IP)
}
}

if len(ips) > 0 {
Expand Down

0 comments on commit 24727b5

Please sign in to comment.