controllerutils

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 AddForceReconcileLabel(ctx context.Context, c client.Client, obj client.Object) error

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 ForceReconcilePredicate() predicate.Predicate

func RemoveForceReconcileLabel

func RemoveForceReconcileLabel(ctx context.Context, c client.Client, obj client.Object) error

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

type CustomLabelKeyChangedPredicate struct {
	LabelKey string
	predicate.Funcs
}

Custom Predicate to filter by a specific label key

func (CustomLabelKeyChangedPredicate) Update

Custom Predicate label to force reconciliation on label addition

Jump to

Keyboard shortcuts

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