mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-02 00:07:50 +00:00
Add framework.GetReadyNodesIncludingTaintedOrDie
This commit is contained in:
parent
56f1744c7a
commit
14fc90a8f6
@ -2606,6 +2606,18 @@ func GetReadySchedulableNodesOrDie(c clientset.Interface) (nodes *v1.NodeList) {
|
|||||||
return nodes
|
return nodes
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GetReadyNodesIncludingTaintedOrDie returns all ready nodes, even those which are tainted.
|
||||||
|
// There are cases when we care about tainted nodes
|
||||||
|
// E.g. in tests related to nodes with gpu we care about nodes despite
|
||||||
|
// presence of nvidia.com/gpu=present:NoSchedule taint
|
||||||
|
func GetReadyNodesIncludingTaintedOrDie(c clientset.Interface) (nodes *v1.NodeList) {
|
||||||
|
nodes = waitListSchedulableNodesOrDie(c)
|
||||||
|
FilterNodes(nodes, func(node v1.Node) bool {
|
||||||
|
return isNodeSchedulable(&node)
|
||||||
|
})
|
||||||
|
return nodes
|
||||||
|
}
|
||||||
|
|
||||||
func WaitForAllNodesSchedulable(c clientset.Interface, timeout time.Duration) error {
|
func WaitForAllNodesSchedulable(c clientset.Interface, timeout time.Duration) error {
|
||||||
Logf("Waiting up to %v for all (but %d) nodes to be schedulable", timeout, TestContext.AllowedNotReadyNodes)
|
Logf("Waiting up to %v for all (but %d) nodes to be schedulable", timeout, TestContext.AllowedNotReadyNodes)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user