Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNodeReadyAndSchedulable ¶
IsNodeReadyAndSchedulable returns true if the node is ready and schedulable.
Types ¶
type NodeNotReadyReason ¶
type NodeNotReadyReason string
NodeNotReadyReason reprents a reason for node to be unready. While it is simply a string on the node object, custom type ensures no one accidentally performs any string operation on variables of this type and allows them to be treated as enums.
const ( // ResourceUnready is a fake identifier used internally by Cluster Autoscaler // to indicate nodes that appear Ready in the API, but are treated as // still upcoming due to a missing resource (e.g. GPU). ResourceUnready NodeNotReadyReason = "cluster-autoscaler.kubernetes.io/resource-not-ready" // IgnoreTaint is a fake identifier used internally by Cluster Autoscaler // to indicate nodes that appear Ready in the API, but are treated as // still upcoming due to applied ignore taint. IgnoreTaint NodeNotReadyReason = "cluster-autoscaler.kubernetes.io/ignore-taint" )
type NodeReadiness ¶
type NodeReadiness struct { // Is the node ready or not. Ready bool // Time of the last state transition related to readiness. LastTransitionTime time.Time // Reason for the node to be unready. Defined only when Ready is false. Reason NodeNotReadyReason }
NodeReadiness represents the last known node readiness.
func GetNodeReadiness ¶
func GetNodeReadiness(node *apiv1.Node) (NodeReadiness, error)
GetNodeReadiness gets readiness for the node
Click to show internal directories.
Click to hide internal directories.