controllerutils

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 9 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 AWSConfigFromSecret added in v0.8.0

func AWSConfigFromSecret(ctx context.Context, c client.Client, secretName, namespace, prefix string) (*awsclienthandler.AWSConfig, error)

AWSConfigFromSecret reads a K8s secret and returns an AWSConfig. The prefix selects which set of keys to read (e.g. "SOURCE_S3_" or "DESTINATION_S3_"), so the same secret can carry separate credentials for source and destination.

func ForceReconcilePredicate

func ForceReconcilePredicate() predicate.Predicate

func GDriveCredentialsFromSecret added in v0.8.0

func GDriveCredentialsFromSecret(ctx context.Context, c client.Client, secretName, namespace string) ([]byte, error)

GDriveCredentialsFromSecret reads the Google service account JSON from a K8s Secret. The secret must contain a key named "SOURCE_GOOGLE_DRIVE_SERVICE_ACCOUNT_JSON".

func ParentPipelineNameFromOwnerReference added in v0.8.0

func ParentPipelineNameFromOwnerReference(obj client.Object) (string, error)

ParentPipelineNameFromOwnerReference extracts the pipeline name from the controller owner reference.

func StatusPatch added in v0.8.0

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

StatusPatch snapshots the object, applies mutate, and patches only the status diff via merge-patch. No re-fetch or conflict retry needed.

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

type FilesProcessedChangedPredicate added in v0.8.0

type FilesProcessedChangedPredicate struct{}

FilesProcessedChangedPredicate filters Update events so that only changes to the filesProcessed status field trigger a reconcile.

func (FilesProcessedChangedPredicate) Create added in v0.8.0

func (FilesProcessedChangedPredicate) Delete added in v0.8.0

func (FilesProcessedChangedPredicate) Generic added in v0.8.0

func (FilesProcessedChangedPredicate) Update added in v0.8.0

type FilesProcessedGetter added in v0.8.0

type FilesProcessedGetter interface {
	GetFilesProcessed() int64
}

FilesProcessedGetter is implemented by all stage CRs to expose the filesProcessed counter.

Jump to

Keyboard shortcuts

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