Help us shape the future of Go! Take the 2026 Go Developer Survey

node

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2025 License: Apache-2.0, BSD-2-Clause, MIT, + 1 more Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TaintKeyUnreachable is the taint key to determine whether a node is unreachable.
	TaintKeyUnreachable = "node.kubernetes.io/unreachable"
	// HostnameLabel is a label to determine the hostname of a node.
	HostnameLabel = "kubernetes.io/hostname"
)
View Source
const (
	// ControllerName is the name of the Azure node controller.
	ControllerName = "azurenode-controller"
	// ActuatorName is the name of the Azure service actuator.
	ActuatorName = "azurenode-actuator"
	// PredicateName is the name of the predicate of the Azure node controller.
	PredicateName = "azurenode-predicate"
	// VirtualMachinePredicateName is the name of the predicate of the Azure node controller for filtering virtualmachine events.
	VirtualMachinePredicateName = "azurenode-virtualmachine-predicate"
	// FinalizerName is the finalizer to put on node resources.
	FinalizerName = "azure.remedy.gardener.cloud/node"
)
View Source
const (
	// CacheTTL is the TTL for node cache entries.
	CacheTTL = 10 * time.Hour
)

Variables

View Source
var (
	// DefaultAddOptions are the default AddOptions for AddToManager.
	DefaultAddOptions = AddOptions{
		Config: config.AzureFailedVMRemedyConfiguration{
			NodeSyncPeriod: metav1.Duration{Duration: 4 * time.Hour},
		},
	}

	// ObjectLabeler is used to label virtualmachine objects created by this controller.
	ObjectLabeler = remedycontroller.NewClusterObjectLabeler()
)

Functions

func AddToManager

func AddToManager(_ context.Context, mgr manager.Manager) error

AddToManager adds a controller with the default AddOptions to the given manager.

func AddToManagerWithOptions

func AddToManagerWithOptions(mgr manager.Manager, options AddOptions) error

AddToManagerWithOptions adds a controller with the given AddOptions to the given manager.

func NewActuator

func NewActuator(client client.Client, namespace string, syncPeriod time.Duration, logger logr.Logger) controller.Actuator

NewActuator creates a new Actuator.

func NewPredicate added in v0.9.0

func NewPredicate(nodeCache utils.ExpiringCache, logger logr.Logger) predicate.Predicate

NewPredicate creates a new predicate that filters only relevant node events, such as creating or deleting a node, updating the deletion timestamp of a node, or updating the ready condition or unreachable taint of a node.

Types

type AddOptions

type AddOptions struct {
	// Controller are the controller.Options.
	Controller controller.Options
	// Client is the Kubernetes client for the control cluster.
	Client client.Client
	// Namespace is the namespace for custom resources in the control cluster.
	Namespace string
	// Manager is the control cluster manager.
	Manager manager.Manager
	// Config is the configuration for the Azure failed virtual machine remedy.
	Config config.AzureFailedVMRemedyConfiguration
}

AddOptions are options to apply when adding a controller to a manager.

type Projection added in v0.9.0

type Projection struct {
	DeletionTimestamp     *metav1.Time
	NotReadyOrUnreachable bool
}

Projection captures only the essential properties of a node that is being cached. By using projections, we prevent the cache from getting too big for clusters with large number of nodes.

func NewProjection added in v0.9.0

func NewProjection(node *corev1.Node) *Projection

NewProjection creates a new Projection from the given node.

Jump to

Keyboard shortcuts

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