node

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: Apache-2.0 Imports: 16 Imported by: 0 modules, 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

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,
) 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 "AlertManager_" 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:               "AlertManager_" + $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