node

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewNodeStatusReconciler

func NewNodeStatusReconciler(
	c client.Client,
	log logr.Logger,
	prom prometheus.Registerer,
	resyncInterval,
	reconcileTimeout,
	linger time.Duration,
	ac alert.Cache,
	conditionPrefix string,
) reconcile.Reconciler

NewNodeStatusReconciler returns a reconcile.Reconciler that will PATCH the subresource node/status with updates to NodeConditions from alerts specific to the node. As alerts are not known ahead, the NodeConditionType is prefixed with conditionPrefix to allow the reconciler to distinguish NodeConditions it "owns" from those it does not. It will not modify non-"owned" NodeConditions.

NodeConditions created from a given alert have the provided structure:

    	NodeCondition{
		    Type:               conditionPrefix + $labels.alertname
		    Status:             True - if firing,
		                        False if not firing,
		                        Unknown if alerts are unavailable
		    LastHeartbeatTime:  currentTime,
		    LastTransitionTime: currentTime if status changed,
		    Reason:             One of "AlertIsFiring", "AlertIsNotFiring", "AlertsUnavailable"
		    Message:            $annotations.summary if present
	    }

The linger option sets the minimum time a NodeCondition with a False Status will be retained. A NodeCondition that has been False for the entire linger duration will be removed from the node. Setting this to a zero duration disables this behavior.

Types

This section is empty.

Jump to

Keyboard shortcuts

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