mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 10:43:56 +00:00
Only schedule to pods that are available. #5545
This commit is contained in:
parent
35b2c5ce9d
commit
c2938b299d
@ -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