budgets

package
v0.0.0-...-8c71ebf Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NodeGroupView

type NodeGroupView struct {
	Group cloudprovider.NodeGroup
	Nodes []*apiv1.Node
	// BatchSize allows overriding the number of nodes needed to trigger deletion.
	// Useful for node groups which only scale between zero and max size.
	BatchSize int
}

NodeGroupView is a subset of nodes from a given NodeGroup

type ScaleDownBudgetProcessor

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

ScaleDownBudgetProcessor is responsible for keeping the number of nodes deleted in parallel within defined limits.

func NewScaleDownBudgetProcessor

func NewScaleDownBudgetProcessor(ctx *context.AutoscalingContext) *ScaleDownBudgetProcessor

NewScaleDownBudgetProcessor creates a ScaleDownBudgetProcessor instance.

func (*ScaleDownBudgetProcessor) CropNodes

func (bp *ScaleDownBudgetProcessor) CropNodes(as scaledown.ActuationStatus, empty, drain []*apiv1.Node) (emptyToDelete, drainToDelete []*NodeGroupView)

CropNodes crops the provided node lists to respect scale-down max parallelism budgets. The returned nodes are grouped by a node group. This function assumes that each node group may occur at most once in each of the "empty" and "drain" lists.

Jump to

Keyboard shortcuts

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