status

package
v0.0.0-...-95ec5f3 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeDeleteResult

type NodeDeleteResult struct {
	// Err contains nil if the delete was successful and an error otherwise.
	Err error
	// ResultType contains the type of the result of a node deletion.
	ResultType NodeDeleteResultType
	// PodEvictionResults maps pod names to the result of their eviction.
	PodEvictionResults map[string]PodEvictionResult
}

NodeDeleteResult contains information about the result of a node deletion.

type NodeDeleteResultType

type NodeDeleteResultType int

NodeDeleteResultType denotes the type of the result of node deletion. It provides deeper insight into why the node failed to be deleted.

const (
	// NodeDeleteOk - the node was deleted successfully.
	NodeDeleteOk NodeDeleteResultType = iota

	// NodeDeleteErrorFailedToMarkToBeDeleted - node deletion failed because the node couldn't be marked to be deleted.
	NodeDeleteErrorFailedToMarkToBeDeleted
	// NodeDeleteErrorFailedToEvictPods - node deletion failed because some of the pods couldn't be evicted from the node.
	NodeDeleteErrorFailedToEvictPods
	// NodeDeleteErrorFailedToDelete - failed to delete the node from the cloud provider.
	NodeDeleteErrorFailedToDelete
	// NodeDeleteErrorInternal - failed to delete the node because of an unexpected error.
	NodeDeleteErrorInternal
)

type PodEvictionResult

type PodEvictionResult struct {
	Pod      *apiv1.Pod
	TimedOut bool
	Err      error
}

PodEvictionResult contains the result of an eviction of a pod.

func (PodEvictionResult) WasEvictionSuccessful

func (per PodEvictionResult) WasEvictionSuccessful() bool

WasEvictionSuccessful tells if the pod was successfully evicted.

type ScaleDownNode

type ScaleDownNode struct {
	Node        *apiv1.Node
	NodeGroup   cloudprovider.NodeGroup
	EvictedPods []*apiv1.Pod
	UtilInfo    utilization.Info
}

ScaleDownNode represents the state of a node that's being scaled down.

type ScaleDownResult

type ScaleDownResult int

ScaleDownResult represents the result of scale down.

const (
	// ScaleDownError - scale down finished with error.
	ScaleDownError ScaleDownResult = iota
	// ScaleDownNoNodeDeleted - no new node deletions started.
	ScaleDownNoNodeDeleted
	// ScaleDownNodeDeleteStarted - a node deletion process was started.
	ScaleDownNodeDeleteStarted
	// ScaleDownNotTried - the scale down wasn't even attempted, e.g. an autoscaling iteration was skipped, or
	// an error occurred before the scale up logic.
	ScaleDownNotTried
	// ScaleDownInCooldown - the scale down wasn't even attempted, because it's in a cooldown state (it's suspended for a scheduled period of time).
	ScaleDownInCooldown
	// ScaleDownInProgress - the scale down wasn't attempted, because a previous scale-down was still in progress.
	ScaleDownInProgress
)

type ScaleDownStatus

type ScaleDownStatus struct {
	Result                ScaleDownResult
	ScaledDownNodes       []*ScaleDownNode
	UnremovableNodes      []*UnremovableNode
	RemovedNodeGroups     []cloudprovider.NodeGroup
	NodeDeleteResults     map[string]NodeDeleteResult
	NodeDeleteResultsAsOf time.Time
}

ScaleDownStatus represents the state of scale down.

func (*ScaleDownStatus) SetUnremovableNodesInfo

func (s *ScaleDownStatus) SetUnremovableNodesInfo(unremovableNodes []*simulator.UnremovableNode, nodeUtilizationMap map[string]utilization.Info, cp cloudprovider.CloudProvider)

SetUnremovableNodesInfo sets the status of nodes that were found to be unremovable.

type UnremovableNode

type UnremovableNode struct {
	Node        *apiv1.Node
	NodeGroup   cloudprovider.NodeGroup
	UtilInfo    *utilization.Info
	Reason      simulator.UnremovableReason
	BlockingPod *drain.BlockingPod
}

UnremovableNode represents the state of a node that couldn't be removed.

Jump to

Keyboard shortcuts

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