eligibility

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

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

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

Documentation

Index

Constants

View Source
const (
	// ScaleDownDisabledKey is the name of annotation marking node as not eligible for scale down.
	ScaleDownDisabledKey = "cluster-autoscaler.kubernetes.io/scale-down-disabled"
)

Variables

This section is empty.

Functions

func HasNoScaleDownAnnotation

func HasNoScaleDownAnnotation(node *apiv1.Node) bool

HasNoScaleDownAnnotation checks whether the node has an annotation blocking it from being scaled down.

Types

type Checker

type Checker struct {
	// contains filtered or unexported fields
}

Checker is responsible for deciding which nodes pass the criteria for scale down.

func NewChecker

func NewChecker(configGetter nodeGroupConfigGetter) *Checker

NewChecker creates a new Checker object.

func (*Checker) FilterOutUnremovable

func (c *Checker) FilterOutUnremovable(context *context.AutoscalingContext, scaleDownCandidates []*apiv1.Node, timestamp time.Time, unremovableNodes *unremovable.Nodes) ([]string, map[string]utilization.Info, []*simulator.UnremovableNode)

FilterOutUnremovable accepts a list of nodes that are candidates for scale down and filters out nodes that cannot be removed, along with node utilization info. TODO(x13n): Node utilization could actually be calculated independently for all nodes and just used here. Next refactor...

Jump to

Keyboard shortcuts

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