planner

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: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Planner

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

Planner is responsible for deciding which nodes should be deleted during scale down.

func New

func New(context *context.AutoscalingContext, processors *processors.AutoscalingProcessors, deleteOptions options.NodeDeleteOptions, drainabilityRules rules.Rules) *Planner

New creates a new Planner object.

func (*Planner) CleanUpUnneededNodes

func (p *Planner) CleanUpUnneededNodes()

CleanUpUnneededNodes forces Planner to forget about all nodes considered unneeded so far.

func (*Planner) NodeUtilizationMap

func (p *Planner) NodeUtilizationMap() map[string]utilization.Info

NodeUtilizationMap returns a map with utilization of nodes.

func (*Planner) NodesToDelete

func (p *Planner) NodesToDelete(_ time.Time) (empty, needDrain []*apiv1.Node)

NodesToDelete returns all Nodes that could be removed right now, according to the Planner.

func (*Planner) UnneededNodes

func (p *Planner) UnneededNodes() []*apiv1.Node

UnneededNodes returns a list of nodes currently considered as unneeded.

func (*Planner) UnremovableNodes

func (p *Planner) UnremovableNodes() []*simulator.UnremovableNode

UnremovableNodes returns a list of nodes currently considered as unremovable.

func (*Planner) UpdateClusterState

func (p *Planner) UpdateClusterState(podDestinations, scaleDownCandidates []*apiv1.Node, as scaledown.ActuationStatus, currentTime time.Time) errors.AutoscalerError

UpdateClusterState needs to be periodically invoked to provide Planner with up-to-date information about the cluster. Planner will evaluate scaleDownCandidates in the order provided here.

Jump to

Keyboard shortcuts

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