mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 01:06:27 +00:00
Ensure public IP removed after service deleted
This commit is contained in:
parent
551f73d324
commit
e2eaccb829
@ -383,10 +383,12 @@ func (az *Cloud) findServiceIPAddress(clusterName string, service *v1.Service, i
|
|||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
if !existsLb {
|
if !existsLb {
|
||||||
return "", fmt.Errorf("Expected to find an IP address for service %s but did not", service.Name)
|
glog.V(2).Infof("Expected to find an IP address for service %s but did not. Assuming it has been removed", service.Name)
|
||||||
|
return "", nil
|
||||||
}
|
}
|
||||||
if len(lbStatus.Ingress) < 1 {
|
if len(lbStatus.Ingress) < 1 {
|
||||||
return "", fmt.Errorf("Expected to find an IP address for service %s but it had no ingresses", service.Name)
|
glog.V(2).Infof("Expected to find an IP address for service %s but it had no ingresses. Assuming it has been removed", service.Name)
|
||||||
|
return "", nil
|
||||||
}
|
}
|
||||||
|
|
||||||
return lbStatus.Ingress[0].IP, nil
|
return lbStatus.Ingress[0].IP, nil
|
||||||
|
Loading…
Reference in New Issue
Block a user