predicates package - github.com/fluxcd/pkg/runtime/predicates - Go Packages

Package predicates provides generic controller-runtime predicates for GitOps Toolkit components to filter events.

This section is empty.

This section is empty.

This section is empty.

ReconcileRequestedPredicate implements an update predicate function for meta.ReconcileRequestAnnotation changes. This predicate will skip update events that have no meta.ReconcileRequestAnnotation change.

It is intended to be used in conjunction with the predicate.GenerationChangedPredicate, as in the following example:

Controller.Watch(
	&source.Kind{Type: v1.MyCustomKind},
	&handler.EnqueueRequestForObject{},
	predicate.Or(predicate.GenerationChangedPredicate{}, predicates.ReconcileRequestedPredicate{}))

Update implements the default UpdateEvent filter for validating meta.ReconcileRequestAnnotation changes.