cloud

package
v0.0.0-...-76823b0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ShutdownTaint = &v1.Taint{
	Key:    schedulerapi.TaintNodeShutdown,
	Effect: v1.TaintEffectNoSchedule,
}
View Source
var UpdateNodeSpecBackoff = wait.Backoff{
	Steps:    20,
	Duration: 50 * time.Millisecond,
	Jitter:   1.0,
}

Functions

This section is empty.

Types

type CloudNodeController

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

func NewCloudNodeController

func NewCloudNodeController(
	nodeInformer coreinformers.NodeInformer,
	kubeClient clientset.Interface,
	cloud cloudprovider.Interface,
	nodeStatusUpdateFrequency time.Duration) *CloudNodeController

NewCloudNodeController creates a CloudNodeController object

func (*CloudNodeController) AddCloudNode

func (cnc *CloudNodeController) AddCloudNode(obj interface{})

AddCloudNode handles initializing new nodes registered with the cloud taint.

func (*CloudNodeController) Run

func (cnc *CloudNodeController) Run(stopCh <-chan struct{})

This controller updates newly registered nodes with information from the cloud provider. This call is blocking so should be called via a goroutine

func (*CloudNodeController) UpdateCloudNode

func (cnc *CloudNodeController) UpdateCloudNode(_, newObj interface{})

func (*CloudNodeController) UpdateNodeStatus

func (cnc *CloudNodeController) UpdateNodeStatus()

UpdateNodeStatus updates the node status, such as node addresses

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()

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

func (*CloudNodeLifecycleController) Run

func (c *CloudNodeLifecycleController) Run(stopCh <-chan struct{})

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

Jump to

Keyboard shortcuts

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