Documentation ¶
Index ¶
- type Nodes
- func (n *Nodes) AsList() []*apiv1.Node
- func (n *Nodes) Clear()
- func (n *Nodes) Contains(nodeName string) bool
- func (n *Nodes) Drop(node string)
- func (n *Nodes) RemovableAt(context *context.AutoscalingContext, scaleDownContext nodes.ScaleDownContext, ...) (empty, needDrain []simulator.NodeToBeRemoved, ...)
- func (n *Nodes) Update(nodes []simulator.NodeToBeRemoved, ts time.Time)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Nodes ¶
type Nodes struct {
// contains filtered or unexported fields
}
Nodes tracks the state of cluster nodes that are not needed.
func NewNodes ¶
func NewNodes(sdtg scaleDownTimeGetter, limitsFinder *resource.LimitsFinder) *Nodes
NewNodes returns a new initialized Nodes object.
func (*Nodes) Clear ¶
func (n *Nodes) Clear()
Clear resets the internal state, dropping information about all tracked nodes.
func (*Nodes) RemovableAt ¶
func (n *Nodes) RemovableAt(context *context.AutoscalingContext, scaleDownContext nodes.ScaleDownContext, ts time.Time) (empty, needDrain []simulator.NodeToBeRemoved, unremovable []simulator.UnremovableNode)
RemovableAt returns all nodes that can be removed at a given time, divided into empty and non-empty node lists, as well as a list of nodes that were unneeded, but are not removable, annotated by reason.
Click to show internal directories.
Click to hide internal directories.