Commit aca37830 authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #22720 from bprashanth/ing_e2e_masterip

Auto commit by PR queue bot
parents fa21ef11 f6c8b9b2
......@@ -3267,9 +3267,16 @@ func getNodePortURL(client *client.Client, ns, name string, svcPort int) (string
if err != nil {
return "", err
}
// It should be OK to list unschedulable Node here.
nodes, err := client.Nodes().List(api.ListOptions{})
if err != nil {
// This list of nodes must not include the master, which is marked
// unschedulable, since the master doesn't run kube-proxy. Without
// 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
}
if len(nodes.Items) == 0 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment