Documentation
¶
Index ¶
- Constants
- func AddForceReconcileLabel(ctx context.Context, c client.Client, obj client.Object) error
- func AddForceReconcileLabelWithRetry(ctx context.Context, c client.Client, key client.ObjectKey, ...) error
- func ForceReconcilePredicate() predicate.Predicate
- func RemoveForceReconcileLabel(ctx context.Context, c client.Client, obj client.Object) error
- func RemoveForceReconcileLabelWithRetry(ctx context.Context, c client.Client, key client.ObjectKey, ...) error
- func StatusUpdateWithRetry(ctx context.Context, c client.Client, key client.ObjectKey, ...) error
- type CustomLabelKeyChangedPredicate
Constants ¶
View Source
const ( // force reconcile label constant ForceReconcileLabel string = "operator.dataverse.redhat.com/force-reconcile" )
Variables ¶
This section is empty.
Functions ¶
func AddForceReconcileLabel ¶
func AddForceReconcileLabelWithRetry ¶ added in v0.2.0
func AddForceReconcileLabelWithRetry(ctx context.Context, c client.Client, key client.ObjectKey, newEmpty func() client.Object) error
AddForceReconcileLabelWithRetry gets the latest object, adds the force-reconcile label, and updates with retry.
func ForceReconcilePredicate ¶
func RemoveForceReconcileLabelWithRetry ¶ added in v0.2.0
func RemoveForceReconcileLabelWithRetry(ctx context.Context, c client.Client, key client.ObjectKey, newEmpty func() client.Object) error
RemoveForceReconcileLabelWithRetry gets the latest object, removes the force-reconcile label, and updates with retry.
func StatusUpdateWithRetry ¶ added in v0.2.0
func StatusUpdateWithRetry(ctx context.Context, c client.Client, key client.ObjectKey, newEmpty func() client.Object, mutate func(client.Object)) error
StatusUpdateWithRetry runs Get -> mutate -> Status().Update with RetryOnConflict. newEmpty must return a new zero value of the object type (e.g. func() client.Object { return &ChunksGenerator{} }). mutate is called with the fetched object so the caller can set status (e.g. SetWaiting(), UpdateStatus(msg, err)).
Types ¶
type CustomLabelKeyChangedPredicate ¶
Custom Predicate to filter by a specific label key
func (CustomLabelKeyChangedPredicate) Update ¶
func (p CustomLabelKeyChangedPredicate) Update(e event.UpdateEvent) bool
Custom Predicate label to force reconciliation on label addition
Click to show internal directories.
Click to hide internal directories.