utils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IgnoreCRDNotFound

func IgnoreCRDNotFound(err error) error

IgnoreCRDNotFound returns nil on "CRD not found" errors. All other values that are not "CRD not found" errors or nil are returned unmodified.

func IgnoreObjectOrCRDNotFound

func IgnoreObjectOrCRDNotFound(err error) error

IgnoreObjectOrCRDNotFound returns nil on NotFound and "CRD not found" errors. All other values that are not NotFound or "CRD not found" errors or nil are returned unmodified.

func IsCRDNotFoundError

func IsCRDNotFoundError(err error) bool

IsCRDNotFoundError checks if the given error is a CRD not found error.

func IsRemainingResourcesError

func IsRemainingResourcesError(err error) bool

func NewRemainingResourcesError

func NewRemainingResourcesError(requeueAfter time.Duration, objs ...client.Object) error

NewRemainingResourcesError creates a new RemainingResourcesError wrapped in a RetryableError.

func NewRetryableError

func NewRetryableError(err error, requeueAfter time.Duration) error

func ObjectIdentifier

func ObjectIdentifier(obj client.Object) string

Types

type RemainingResourcesError

type RemainingResourcesError struct {
	Objects []client.Object
}

RemainingResourcesError occurs when an operation could not be finished because there are resources pending deletion, usually during uninstall processes.

func (*RemainingResourcesError) Error

func (r *RemainingResourcesError) Error() string

RemainingResourcesError implements error.

func (*RemainingResourcesError) Is

func (*RemainingResourcesError) Is(target error) bool

type RetryableError

type RetryableError struct {
	// Err is the wrapped error.
	Err error

	// RequeueAfter if greater than 0, tells the Controller to requeue the reconcile key after the Duration.
	RequeueAfter time.Duration
}

RetryableError is an error that can be resolved by retrying after a certain time (`RequeueAfter`).

func (*RetryableError) Error

func (e *RetryableError) Error() string

func (*RetryableError) Is

func (*RetryableError) Is(target error) bool

func (*RetryableError) Unwrap

func (e *RetryableError) Unwrap() error

Jump to

Keyboard shortcuts

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