mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #22720 from bprashanth/ing_e2e_masterip
Auto commit by PR queue bot
This commit is contained in:
commit
aca37830b1
@ -3267,9 +3267,16 @@ func getNodePortURL(client *client.Client, ns, name string, svcPort int) (string
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
// It should be OK to list unschedulable Node here.
|
// This list of nodes must not include the master, which is marked
|
||||||
nodes, err := client.Nodes().List(api.ListOptions{})
|
// unschedulable, since the master doesn't run kube-proxy. Without
|
||||||
if err != nil {
|
// kube-proxy NodePorts won't work.
|
||||||
|
var nodes *api.NodeList
|
||||||
|
if wait.PollImmediate(poll, singleCallTimeout, func() (bool, error) {
|
||||||
|
nodes, err = client.Nodes().List(api.ListOptions{FieldSelector: fields.Set{
|
||||||
|
"spec.unschedulable": "false",
|
||||||
|
}.AsSelector()})
|
||||||
|
return err == nil, nil
|
||||||
|
}) != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
if len(nodes.Items) == 0 {
|
if len(nodes.Items) == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user