Documentation ¶
Index ¶
- func ContainsFinalizer(finalizers []string, finalizer string) bool
- func FilterFinalizers(finalizers []string, filter func(f string) bool) []string
- func IsDeleting(object metav1.Object) bool
- func IsFinalFinalizer(prefix string, finalizers []string, finalizer string) bool
- func IsPendingFinalizer(object metav1.Object, finalizer string) bool
- func MergeFinalizers(finalizers1, finalizers2 []string) []string
- func RemoveFinalizer(finalizers []string, finalizer string) []string
- func SetAnnotation(object Annotatable, key, value string)
- func SetLabel(object Labelable, key, value string)
- type Annotatable
- type Labelable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainsFinalizer ¶
ContainsFinalizer returns true if the given finalizer is in the list.
func FilterFinalizers ¶
FilterFinalizers filters a list of finalizers with some filter function.
func IsDeleting ¶
IsDeleting returns true if the object is pending deletion.
func IsFinalFinalizer ¶
IsFinalFinalizer returns whether the list of finalizers does not contain other finalizers with the given prefix. Pass a prefix to filter finalizers, to prevent blocking on other finalizers, e.g. foregroundDeletion.
func IsPendingFinalizer ¶
IsPendingFinalizer returns true if the object is pending deletion and contains the given finalizer. Use this to determine when to remove the finalizer.
func MergeFinalizers ¶
MergeFinalizers merges the list of finalizers, removing duplicates if any.
func RemoveFinalizer ¶
RemoveFinalizer removes the given finalizer from the list of finalizers.
func SetAnnotation ¶
func SetAnnotation(object Annotatable, key, value string)
SetAnnotation updates the object's annotations, setting the annotation given by key to be value. The Annotations map is updated in-place, if needed please DeepCopy before calling this function.