nodemanager

package
v0.7.4-premiumv2 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpdateNodeSpecBackoff = wait.Backoff{
	Steps:    20,
	Duration: 50 * time.Millisecond,
	Jitter:   1.0,
}

UpdateNodeSpecBackoff is the back configure for node update.

Functions

func GetCloudTaint

func GetCloudTaint(taints []v1.Taint) *v1.Taint

func PatchNodeStatus

func PatchNodeStatus(c v1core.CoreV1Interface, nodeName types.NodeName, oldNode *v1.Node, newNode *v1.Node) (*v1.Node, []byte, error)

PatchNodeStatus patches node status.

Types

type CloudNodeController

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

CloudNodeController reconciles node information.

func NewCloudNodeController

func NewCloudNodeController(
	nodeName string,
	nodeInformer coreinformers.NodeInformer,
	kubeClient clientset.Interface,
	nodeProvider NodeProvider,
	nodeStatusUpdateFrequency time.Duration,
	waitForRoutes bool) *CloudNodeController

NewCloudNodeController creates a CloudNodeController object

func (*CloudNodeController) AddCloudNode

func (cnc *CloudNodeController) AddCloudNode(ctx context.Context, obj interface{})

AddCloudNode handles initializing new nodes registered with the cloud taint.

func (*CloudNodeController) Run

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

Run 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(ctx context.Context, _, newObj interface{})

UpdateCloudNode handles node update event.

func (*CloudNodeController) UpdateNodeStatus

func (cnc *CloudNodeController) UpdateNodeStatus(ctx context.Context)

UpdateNodeStatus updates the node status, such as node addresses

type NodeProvider

type NodeProvider interface {
	// NodeAddresses returns the addresses of the specified instance.
	NodeAddresses(ctx context.Context, name types.NodeName) ([]v1.NodeAddress, error)
	// InstanceID returns the cloud provider ID of the specified instance.
	InstanceID(ctx context.Context, name types.NodeName) (string, error)
	// InstanceType returns the type of the specified instance.
	InstanceType(ctx context.Context, name types.NodeName) (string, error)
	// GetZone returns the Zone containing the current failure zone and locality region that the program is running in
	GetZone(ctx context.Context, name types.NodeName) (cloudprovider.Zone, error)
	// GetPlatformSubFaultDomain returns the PlatformSubFaultDomain from IMDS if set.
	GetPlatformSubFaultDomain() (string, error)
}

NodeProvider defines the interfaces for node provider.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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