utils

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssureDeleting

func AssureDeleting(ctx context.Context, clt client.Client, object client.Object) error

AssureDeleting ensures that the object is in deletion mode

func AssureFinalizer

func AssureFinalizer(ctx context.Context, client client.Client, finalizerName string, object client.Object) error

AssureFinalizer ensures that a finalizer is on a given runtime object

func AssureFinalizerRemoved

func AssureFinalizerRemoved(ctx context.Context, client client.Client, finalizerName string, object client.Object) error

AssureFinalizerRemoved ensures that a finalizer does not exist anymore for a given runtime object

func ContainsString

func ContainsString(slice []string, s string) bool

ContainsString is a helper functions to check and remove string from a slice of strings.

func GetLabel

func GetLabel(object client.Object, name string, defs ...string) string

GetLabel returns the value of a given object and label name

func Requeue

func Requeue(err error) (ctrl.Result, error)

Requeue requeues the object with given error

func Succeeded

func Succeeded() (ctrl.Result, error)

Succeeded returns a success result with no error

func SucceededIfNotFound

func SucceededIfNotFound(err error) (ctrl.Result, error)

SucceededIfNotFound returns a requeue result if the error is not a "NotFound" error

Types

This section is empty.

Jump to

Keyboard shortcuts

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