Documentation
¶
Index ¶
- Constants
- func AWSConfigFromSecret(ctx context.Context, c client.Client, secretName, namespace, prefix string) (*awsclienthandler.AWSConfig, error)
- func ForceReconcilePredicate() predicate.Predicate
- func GDriveCredentialsFromSecret(ctx context.Context, c client.Client, secretName, namespace string) ([]byte, error)
- func ParentPipelineNameFromOwnerReference(obj client.Object) (string, error)
- func StatusPatch(ctx context.Context, c client.Client, obj client.Object, mutate func()) error
- type CustomLabelKeyChangedPredicate
- type FilesProcessedChangedPredicate
- type FilesProcessedGetter
Constants ¶
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 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
ParentPipelineNameFromOwnerReference extracts the pipeline name from the controller owner reference.
func StatusPatch ¶ added in v0.8.0
StatusPatch snapshots the object, applies mutate, and patches only the status diff via merge-patch. The patch is applied to a copy so that the caller's in-memory object is not overwritten by the API server response (which would reset any spec defaults applied earlier). Only the resource version is copied back so that subsequent API calls don't conflict.
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
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) Create(_ event.CreateEvent) bool
func (FilesProcessedChangedPredicate) Delete ¶ added in v0.8.0
func (FilesProcessedChangedPredicate) Delete(_ event.DeleteEvent) bool
func (FilesProcessedChangedPredicate) Generic ¶ added in v0.8.0
func (FilesProcessedChangedPredicate) Generic(_ event.GenericEvent) bool
func (FilesProcessedChangedPredicate) Update ¶ added in v0.8.0
func (FilesProcessedChangedPredicate) Update(e event.UpdateEvent) bool
type FilesProcessedGetter ¶ added in v0.8.0
type FilesProcessedGetter interface {
GetFilesProcessed() int64
}
FilesProcessedGetter is implemented by all stage CRs to expose the filesProcessed counter.