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 ¶
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.