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 Nodes excluding Master Node.
CheckReadyForTests returns a method usable in polling methods which will check that the nodes are in a testable state based on schedulability.
CollectAddresses returns a list of addresses of the given addressType for the given list of nodes
Filter filters nodes in NodeList in place, removing nodes that do not satisfy the given condition TODO: consider merging with pkg/client/cache.NodeLister
FirstAddress returns the first address of the given type of each node. TODO: Use return type string instead of string
GetAddresses returns a list of addresses of the given addressType for the given node
GetBoundedReadySchedulableNodes is like GetReadySchedulableNodes except that it returns at most maxNodes nodes. Use this to keep your test case from blowing up when run on a large cluster.
GetExternalIP returns node external IP concatenated with port 22 for ssh e.g. 184.108.40.206:22
GetInternalIP returns node internal IP
GetMasterAndWorkerNodes will return a list masters and schedulable worker nodes
GetPortURL returns the url to a nodeport Service.
GetPublicIps returns a public IP list of nodes.
GetRandomReadySchedulableNode gets a single randomly-selected node which is available for running pods on. If there are no available nodes it will return an error.
GetReadyNodesIncludingTainted 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
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. TODO: remove references in framework/util.go.
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.
IsConditionSetAsExpectedSilent returns a wantTrue value if the node has a match to the conditionType, otherwise returns an opposite value of the wantTrue.
IsConditionUnset returns true if conditions of the given node do not have a match to the given conditionType, otherwise false.
IsNodeReady returns true if: 1) it's Ready condition is set to true 2) doesn't have NetworkUnavailable condition set to true
IsNodeSchedulable returns true if: 1) doesn't have "unschedulable" field set 2) it also returns true from IsNodeReady
IsNodeUntainted tests whether a fake pod can be scheduled on "node", given its current taints. TODO: need to discuss wether to return bool and error type
PickIP picks one public node IP
TotalReady returns number of ready Nodes excluding Master Node.
TotalRegistered returns number of registered Nodes excluding Master Node.
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).
WaitForNodeToBeNotReady returns whether node name is not ready (i.e. the readiness condition is anything but ready, e.g false or unknown) within timeout.
WaitForNodeToBeReady returns whether node name is ready within timeout.
WaitForReadyNodes 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 Nodes excluding Master Node.
WaitForTotalHealthy checks whether all registered nodes are ready and all required Pods are running on them.
PodNode is a pod-node pair indicating which node a given pod is running on
PodNodePairs return podNode pairs for all pods in a namespace