predicate

package
v0.19.4 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DependentPredicate

type DependentPredicate struct {
	predicate.Funcs
}

DependentPredicate is a predicate that filters events for resources created as dependents of a primary resource. It follows the following rules:

  • Create events are ignored because it is assumed that the controller reconciling the parent is the client creating the dependent resources.
  • Update events that change only the dependent resource status are ignored because it is not typical for the controller of a primary resource to write to the status of one its dependent resources.
  • Deletion events are always handled because a controller will typically want to recreate deleted dependent resources if the primary resource is not deleted.
  • Generic events are ignored.

DependentPredicate is most often used in conjunction with controller-runtime's handler.EnqueueRequestForOwner

func (DependentPredicate) Create

Create filters out all events. It assumes that the controller reconciling the parent is the only client creating the dependent resources.

func (DependentPredicate) Delete

Delete passes all events through. This allows the controller to recreate deleted dependent resources if the primary resource is not deleted.

func (DependentPredicate) Generic

Generic filters out all events.

func (DependentPredicate) Update

Update filters out events that change only the dependent resource status. It is not typical for the controller of a primary resource to write to the status of one its dependent resources.

Jump to

Keyboard shortcuts

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