Documentation ¶
Index ¶
- type NodeDeletionTracker
- func (n *NodeDeletionTracker) ClearResultsNotNewerThan(t time.Time)
- func (n *NodeDeletionTracker) DeletionResults() (map[string]status.NodeDeleteResult, time.Time)
- func (n *NodeDeletionTracker) DeletionsCount(nodeGroupId string) int
- func (n *NodeDeletionTracker) DeletionsInProgress() ([]string, []string)
- func (n *NodeDeletionTracker) EndDeletion(nodeGroupId, nodeName string, result status.NodeDeleteResult)
- func (n *NodeDeletionTracker) RecentEvictions() []*apiv1.Pod
- func (n *NodeDeletionTracker) RegisterEviction(pod *apiv1.Pod)
- func (n *NodeDeletionTracker) Snapshot() *NodeDeletionTracker
- func (n *NodeDeletionTracker) StartDeletion(nodeGroupId, nodeName string)
- func (n *NodeDeletionTracker) StartDeletionWithDrain(nodeGroupId, nodeName string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NodeDeletionTracker ¶
NodeDeletionTracker keeps track of node deletions.
func NewNodeDeletionTracker ¶
func NewNodeDeletionTracker(podEvictionsTTL time.Duration) *NodeDeletionTracker
NewNodeDeletionTracker creates new NodeDeletionTracker.
func (*NodeDeletionTracker) ClearResultsNotNewerThan ¶
func (n *NodeDeletionTracker) ClearResultsNotNewerThan(t time.Time)
ClearResultsNotNewerThan iterates over existing deletion results and keeps only the ones that are newer than the provided timestamp.
func (*NodeDeletionTracker) DeletionResults ¶
func (n *NodeDeletionTracker) DeletionResults() (map[string]status.NodeDeleteResult, time.Time)
DeletionResults returns deletion results since the last ClearResultsNotNewerThan call in a map form, along with the timestamp of last result.
func (*NodeDeletionTracker) DeletionsCount ¶
func (n *NodeDeletionTracker) DeletionsCount(nodeGroupId string) int
DeletionsCount returns the number of deletions in progress for the given node group.
func (*NodeDeletionTracker) DeletionsInProgress ¶
func (n *NodeDeletionTracker) DeletionsInProgress() ([]string, []string)
DeletionsInProgress returns a list of all node names currently undergoing deletion.
func (*NodeDeletionTracker) EndDeletion ¶
func (n *NodeDeletionTracker) EndDeletion(nodeGroupId, nodeName string, result status.NodeDeleteResult)
EndDeletion decrements node deletion in progress counter for the given nodegroup.
func (*NodeDeletionTracker) RecentEvictions ¶
func (n *NodeDeletionTracker) RecentEvictions() []*apiv1.Pod
RecentEvictions returns a list of pods that were recently evicted by Cluster Autoscaler.
func (*NodeDeletionTracker) RegisterEviction ¶
func (n *NodeDeletionTracker) RegisterEviction(pod *apiv1.Pod)
RegisterEviction stores information about a pod that was recently evicted.
func (*NodeDeletionTracker) Snapshot ¶
func (n *NodeDeletionTracker) Snapshot() *NodeDeletionTracker
Snapshot return a copy of NodeDeletionTracker.
func (*NodeDeletionTracker) StartDeletion ¶
func (n *NodeDeletionTracker) StartDeletion(nodeGroupId, nodeName string)
StartDeletion increments node deletion in progress counter for the given nodegroup.
func (*NodeDeletionTracker) StartDeletionWithDrain ¶
func (n *NodeDeletionTracker) StartDeletionWithDrain(nodeGroupId, nodeName string)
StartDeletionWithDrain is equivalent to StartDeletion, but for counting nodes that are drained first.