predicates

package
v0.8.9 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package predicates owns controller-runtime predicate filtering. Predicates are the first line of defence against unnecessary reconciliation — they run in the informer goroutine before a reconcile request ever enters the work queue.

The key filtering concern for BlanketOps is spec-only reconciliation: status updates and metadata changes (labels, annotations, finalizers) must not trigger domain execution. Without this filter, a status patch written by a domain at the end of reconciliation would re-enqueue the same object, creating a tight reconciliation loop.

MeaningfulChangePredicate enforces this by type-switching on the concrete CR kind and comparing specs directly. All other event types (Create, Delete, Generic) pass through unconditionally — only Update events are filtered.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MeaningfulChangePredicate

func MeaningfulChangePredicate() predicate.Funcs

MeaningfulChangePredicate returns a predicate.Funcs that suppresses Update events where only status or metadata changed. Spec changes always pass through; all other event types (Create, Delete, Generic) are unconditional.

This predicate is registered at the manager level and applied to all BlanketOps CR controllers. It is the primary guard against reconciliation loops caused by status writes re-enqueuing the same object.

The type switch covers all nine CR kinds managed by the platform. Unknown types fall through to true (reconcile) as a safe default — an unknown kind reaching this predicate indicates a registration gap, not a reason to drop the event.

Types

This section is empty.

Jump to

Keyboard shortcuts

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