node

package
v1.7.26 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2026 License: Apache-2.0 Imports: 18 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	MaxNodeReconciliationInterval = 15 * time.Minute
	NodeInitialCleanupInterval    = 1 * time.Minute
)

Variables

This section is empty.

Functions

func RegisterMetrics added in v1.7.26

func RegisterMetrics()

RegisterMetrics registers the node metrics and exposes every restore series at 0. NewNodeManager calls it at startup on every replica, before leader election. A restart restores every node within one scrape, so a delta-based scraper counts the restores only if it read this process at 0 first, as it does for a standby that takes over. If the process restores before its first scrape, the restores are lost: a scraper with no baseline takes the burst as its baseline, and one that kept the previous process's value N publishes the burst minus N, or nothing if the burst is below N (read as a reset).

Types

type ErrInitResources

type ErrInitResources struct {
	Message string
	Err     error
}

ErrInitResources to wrap error messages for all errors encountered during node initialization so the node can be de-registered on failure

func (*ErrInitResources) Error added in v1.0.7

func (e *ErrInitResources) Error() string

type Node

type Node interface {
	InitResources(resourceManager resource.ResourceManager) error
	DeleteResources(resourceManager resource.ResourceManager) error
	UpdateResources(resourceManager resource.ResourceManager) error

	UpdateCustomNetworkingSpecs(subnetID string, securityGroup []string)
	IsReady() bool
	IsManaged() bool
	IsNitroInstance() bool

	GetNodeInstanceID() string
	HasInstance() bool

	GetNextReconciliationTime() time.Time
	SetNextReconciliationTime(time time.Time)
	GetReconciliationInterval() time.Duration
	SetReconciliationInterval(time time.Duration)
}

func NewManagedNode added in v1.1.0

func NewManagedNode(log logr.Logger, nodeName string, instanceID string, os string, k8sAPI k8s.K8sWrapper, ec2API api.EC2APIHelper) Node

NewManagedNode returns node managed by the controller

func NewUnManagedNode added in v1.1.0

func NewUnManagedNode(log logr.Logger, nodeName, instanceID, os string) Node

NewUnManagedNode returns a node that's not managed by the controller

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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