mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-12 13:31:52 +00:00
Update some tests to fall back to InternalIP if ExternalIP isn't set
This commit is contained in:
parent
a9afb931d4
commit
9377a4bf32
@ -307,6 +307,10 @@ func GetNodePublicIps(c clientset.Interface) ([]string, error) {
|
|||||||
nodes := GetReadySchedulableNodesOrDie(c)
|
nodes := GetReadySchedulableNodesOrDie(c)
|
||||||
|
|
||||||
ips := CollectAddresses(nodes, v1.NodeExternalIP)
|
ips := CollectAddresses(nodes, v1.NodeExternalIP)
|
||||||
|
if len(ips) == 0 {
|
||||||
|
// If ExternalIP isn't set, assume the test programs can reach the InternalIP
|
||||||
|
ips = CollectAddresses(nodes, v1.NodeInternalIP)
|
||||||
|
}
|
||||||
return ips, nil
|
return ips, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user