controller

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFinalizerIfNotPresent

func AddFinalizerIfNotPresent(client client.Client, obj client.Object) error

AddFinalizerIfNotPresent adds a finalizer an object to avoid instant deletion of the object without finalizing it.

func GetControllerObjectOwnerReference

func GetControllerObjectOwnerReference(object metav1.Object, scheme *runtime.Scheme) (*metav1.OwnerReference, error)

GetControllerObjectOwnerReference returns the owner reference that should be used by all child objects of a given controller

func RemoveFinalizer

func RemoveFinalizer(client client.Client, obj client.Object) error

RemoveFinalizer removes a finalizer from an object

Types

type OwnerMatcher

type OwnerMatcher struct {
	// contains filtered or unexported fields
}

OwnerMatcher is a struct representing the controller owner reference to use for comparison with child objects

func NewOwnerReferenceMatcher

func NewOwnerReferenceMatcher(owner runtime.Object, scheme *runtime.Scheme) (*OwnerMatcher, error)

NewOwnerReferenceMatcher initializes a new owner reference matcher

func (*OwnerMatcher) Match

func (e *OwnerMatcher) Match(object runtime.Object) (bool, metav1.Object, error)

Jump to

Keyboard shortcuts

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