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 ¶
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...
Click to show internal directories.
Click to hide internal directories.