Documentation ¶
Index ¶
- type Planner
- func (p *Planner) CleanUpUnneededNodes()
- func (p *Planner) NodeUtilizationMap() map[string]utilization.Info
- func (p *Planner) NodesToDelete(_ time.Time) (empty, needDrain []*apiv1.Node)
- func (p *Planner) UnneededNodes() []*apiv1.Node
- func (p *Planner) UnremovableNodes() []*simulator.UnremovableNode
- func (p *Planner) UpdateClusterState(podDestinations, scaleDownCandidates []*apiv1.Node, ...) errors.AutoscalerError
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 ¶
NodesToDelete returns all Nodes that could be removed right now, according to the Planner.
func (*Planner) UnneededNodes ¶
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.