mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Check IP of Ingress blank before append
This commit is contained in:
parent
0c112347ca
commit
63f9b392b5
@ -201,8 +201,10 @@ func (sct *ServiceChangeTracker) newBaseServiceInfo(port *v1.ServicePort, servic
|
|||||||
// Obtain Load Balancer Ingress IPs
|
// Obtain Load Balancer Ingress IPs
|
||||||
var ips []string
|
var ips []string
|
||||||
for _, ing := range service.Status.LoadBalancer.Ingress {
|
for _, ing := range service.Status.LoadBalancer.Ingress {
|
||||||
|
if ing.IP != "" {
|
||||||
ips = append(ips, ing.IP)
|
ips = append(ips, ing.IP)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if len(ips) > 0 {
|
if len(ips) > 0 {
|
||||||
ipFamilyMap = utilproxy.MapIPsByIPFamily(ips)
|
ipFamilyMap = utilproxy.MapIPsByIPFamily(ips)
|
||||||
|
Loading…
Reference in New Issue
Block a user