util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrGetProfile                = "cannot get security profile"
	HasActivePodsFinalizerString = "in-use-by-active-pods"
)

Variables

This section is empty.

Functions

func AddFinalizer

func AddFinalizer(ctx context.Context, c client.Client, pol client.Object, finalizer string) error

addFinalizer attempts to add a finalizer to an object if not present and update the object.

func IgnoreNotFound

func IgnoreNotFound(err error) error

func IsNotFoundOrConflict

func IsNotFoundOrConflict(err error) bool

func NamespacedName

func NamespacedName(name, namespace string) types.NamespacedName

func RemoveFinalizer

func RemoveFinalizer(ctx context.Context, c client.Client, pol client.Object, finalizer string) error

removeFinalizer attempts to remove a finalizer from an object if present and update the object.

func Retry

func Retry(fn func() error, retryCondition func(error) bool) error

retry attempts to execute fn up to 5 times if its failure meets retryCondition.

Types

This section is empty.

Jump to

Keyboard shortcuts

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