cloud-providerk8s.io/cloud-provider/controllers/nodelifecycle Index | Files

package nodelifecycle

import "k8s.io/cloud-provider/controllers/nodelifecycle"

Index

Variables

var ShutdownTaint = &v1.Taint{
	Key:    cloudproviderapi.TaintNodeShutdown,
	Effect: v1.TaintEffectNoSchedule,
}

Types

type CloudNodeLifecycleController

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

CloudNodeLifecycleController is responsible for deleting/updating kubernetes nodes that have been deleted/shutdown on the cloud provider

func NewCloudNodeLifecycleController

func NewCloudNodeLifecycleController(
	nodeInformer coreinformers.NodeInformer,
	kubeClient clientset.Interface,
	cloud cloudprovider.Interface,
	nodeMonitorPeriod time.Duration) (*CloudNodeLifecycleController, error)

func (*CloudNodeLifecycleController) MonitorNodes

func (c *CloudNodeLifecycleController) MonitorNodes(ctx context.Context)

MonitorNodes checks to see if nodes in the cluster have been deleted or shutdown. If deleted, it deletes the node resource. If shutdown it applies a shutdown taint to the node

func (*CloudNodeLifecycleController) Run

Run starts the main loop for this controller. Run is blocking so should be called via a goroutine

Source Files

node_lifecycle_controller.go

Version
v0.32.2 (latest)
Published
Feb 13, 2025
Platform
linux/amd64
Imports
21 packages
Last checked
2 months ago

Tools for package owners.