garbagecollection

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: May 16, 2025 License: Apache-2.0, Apache-2.0 Imports: 16 Imported by: 0

README

instance garbage collection controller

  • background

When agentpool is in the Creating process, if user starts to delete NodeClaim such as kubectl delete nodeclaim {NodeClaimName}, nodeclaim termination controller will remove the termination finalizer of NodeClaim, then NodeClaim will be removed from the cluster. But agentpoll is still in the Creating process, this means agentpool and related node will be leaked.

  • solution

A new garbage collection controller named [instance garbage collection] is used for garbaging leaked agentpool and node.

  1. if agentpool releated NodeClaim is removed in the cluster, and agentpool is created more than 30s, [instance garbage collection] controller will delete the agentpool resource.
  2. if the leaked agentpool has related nodes, [instance garbage collection] controller will aslo delete node resource.

others

nodeclaim.garbagecollection controller will not take effect in our scenario. When the backend agent pool is removed, it triggers the [node termination controller], which in turn triggers the [nodeclaim termination controller]. As a result, no NodeClaims will be leaked when backend agent pools are removed.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

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

func NewController

func NewController(kubeClient client.Client, cloudProvider cloudprovider.CloudProvider) *Controller

func (*Controller) Reconcile

func (c *Controller) Reconcile(ctx context.Context) (reconcile.Result, error)

func (*Controller) Register

func (c *Controller) Register(_ context.Context, m manager.Manager) error

Jump to

Keyboard shortcuts

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