Documentation ¶
Overview ¶
Package utils provides some common utility functions for our controllers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IgnoreStatusUpdatesAndDeletion ¶
IgnoreStatusUpdatesAndDeletion filters out reconcile requests where only the Status was updated, or on Deletes.
**Deletes** On Deletes, we don't need to do any cleanup because we make sure to use OwnerReferences that force Kubernetes to handle the cleanup for us.
**Status Updates** Our Reconcile() loops make many updates mid-reconcile to the status fields of the objects. Doing this can cause all kinds of re-runs of the reconciler at a high rate - mostly when they are not desired.
Using this predicate filter means that the Reconcile() loops must be well tested and include their own automatic requeue-after settings.
https://sdk.operatorframework.io/docs/building-operators/golang/references/event-filtering/
func Refetch ¶
Refetch uses the "consistent client" (non-caching) to retreive the latest state of the object into the supplied object reference. This is critical to avoid "the object has been modified; please apply your changes to the latest version and try again" errors when updating object status fields.
Types ¶
This section is empty.