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.