mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #5725 from rrati/schedule-to-available-nodes-5545
Only schedule to pods that are available. This turns on the node
This commit is contained in:
commit
8d94c43e70
@ -230,8 +230,8 @@ func (factory *ConfigFactory) pollMinions() (cache.Enumerator, error) {
|
||||
}
|
||||
} else {
|
||||
// If no condition is set, we get unknown node condition. In such cases,
|
||||
// we add nodes unconditionally.
|
||||
nodes.Items = append(nodes.Items, node)
|
||||
// do not add the node
|
||||
glog.V(2).Infof("Minion %s is not available. Skipping", node.Name)
|
||||
}
|
||||
}
|
||||
return &nodeEnumerator{nodes}, nil
|
||||
|
@ -220,7 +220,7 @@ func TestPollMinions(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedCount: 6,
|
||||
expectedCount: 5,
|
||||
},
|
||||
{
|
||||
minions: []api.Node{
|
||||
@ -262,7 +262,7 @@ func TestPollMinions(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedCount: 1,
|
||||
expectedCount: 0,
|
||||
},
|
||||
{
|
||||
minions: []api.Node{
|
||||
@ -299,7 +299,7 @@ func TestPollMinions(t *testing.T) {
|
||||
},
|
||||
},
|
||||
},
|
||||
expectedCount: 1,
|
||||
expectedCount: 0,
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user