autoscaler

package
v0.0.0-...-2e1e09f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetReadinessState deprecated

func GetReadinessState(node *apiv1.Node) (isNodeReady bool, lastTransitionTime time.Time, err error)

GetReadinessState gets readiness state for the node

Deprecated: Use GetNodeReadiness instead.

func IsNodeReadyAndSchedulable

func IsNodeReadyAndSchedulable(node *apiv1.Node) bool

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL