policystatus

package
v0.5.6 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: 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

Overview

Package policystatus turns the WAFPolicies' conditions into metrics and Kubernetes Events (#378): the inkwall_operator_policies gauge counts the policies by condition, status and reason, and a change of a policy's Ready, Programmed or Enforced condition records an Event on it, so `kubectl describe wafpolicy` and event-based tooling see it. It runs on the leader.

Index

Constants

View Source
const DefaultEvery = 30 * time.Second

DefaultEvery is the least time between two Events on a policy.

Variables

This section is empty.

Functions

This section is empty.

Types

type Watcher

type Watcher struct {
	Client   client.Client
	Recorder events.EventRecorder
	// Every is the least time between two Events on a policy: changes
	// within it are recorded together, once it has passed; 0: DefaultEvery.
	Every time.Duration
	// Now is the clock; nil: time.Now.
	Now func() time.Time
	// contains filtered or unexported fields
}

Watcher reconciles WAFPolicies into the gauge and Events.

func (*Watcher) Reconcile

func (w *Watcher) Reconcile(ctx context.Context, req reconcile.Request) (reconcile.Result, error)

Reconcile updates the gauge with the policy's conditions, and records an Event when Ready, Programmed or Enforced changed since the last.

func (*Watcher) SetupWithManager

func (w *Watcher) SetupWithManager(mgr ctrl.Manager) error

SetupWithManager registers the watcher.

Jump to

Keyboard shortcuts

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