Documentation ¶
Index ¶
- func CheckReady(c clientset.Interface, size int, timeout time.Duration) ([]v1.Node, error)
- func CheckReadyForTests(c clientset.Interface, nonblockingTaints string, ...) func() (bool, error)
- func Filter(nodeList *v1.NodeList, fn func(node v1.Node) bool)
- func GetReadySchedulableNodes(c clientset.Interface) (nodes *v1.NodeList, err error)
- func IsConditionSetAsExpected(node *v1.Node, conditionType v1.NodeConditionType, wantTrue bool) bool
- func IsConditionSetAsExpectedSilent(node *v1.Node, conditionType v1.NodeConditionType, wantTrue bool) bool
- func IsNodeReady(node *v1.Node) bool
- func IsNodeSchedulable(node *v1.Node) bool
- func WaitConditionToBe(c clientset.Interface, name string, conditionType v1.NodeConditionType, ...) bool
- func WaitForNodeToBeReady(c clientset.Interface, name string, timeout time.Duration) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckReady ¶
CheckReady waits up to timeout for cluster to has desired size and there is no not-ready nodes in it. By cluster size we mean number of schedulable Nodes.
func CheckReadyForTests ¶
func CheckReadyForTests(c clientset.Interface, nonblockingTaints string, allowedNotReadyNodes, largeClusterThreshold int) func() (bool, error)
CheckReadyForTests returns a function which will return 'true' once the number of ready nodes is above the allowedNotReadyNodes threshold (i.e. to be used as a global gate for starting the tests).
func Filter ¶
Filter filters nodes in NodeList in place, removing nodes that do not satisfy the given condition
func GetReadySchedulableNodes ¶
GetReadySchedulableNodes addresses the common use case of getting nodes you can do work on. 1) Needs to be schedulable. 2) Needs to be ready. If EITHER 1 or 2 is not true, most tests will want to ignore the node entirely. If there are no nodes that are both ready and schedulable, this will return an error.
func IsConditionSetAsExpected ¶
func IsConditionSetAsExpected(node *v1.Node, conditionType v1.NodeConditionType, wantTrue bool) bool
IsConditionSetAsExpected returns a wantTrue value if the node has a match to the conditionType, otherwise returns an opposite value of the wantTrue with detailed logging.
func IsConditionSetAsExpectedSilent ¶
func IsConditionSetAsExpectedSilent(node *v1.Node, conditionType v1.NodeConditionType, wantTrue bool) bool
IsConditionSetAsExpectedSilent returns a wantTrue value if the node has a match to the conditionType, otherwise returns an opposite value of the wantTrue.
func IsNodeReady ¶
IsNodeReady returns true if: 1) it's Ready condition is set to true 2) doesn't have NetworkUnavailable condition set to true
func IsNodeSchedulable ¶
IsNodeSchedulable returns true if: 1) doesn't have "unschedulable" field set 2) it also returns true from IsNodeReady
func WaitConditionToBe ¶
func WaitConditionToBe(c clientset.Interface, name string, conditionType v1.NodeConditionType, wantTrue bool, timeout time.Duration) bool
WaitConditionToBe returns whether node "name's" condition state matches wantTrue within timeout. If wantTrue is true, it will ensure the node condition status is ConditionTrue; if it's false, it ensures the node condition is in any state other than ConditionTrue (e.g. not true or unknown).
Types ¶
This section is empty.