ownerhandling

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMultipleKinds = errors.New("multiple kinds error: expected exactly one kind")

Functions

This section is empty.

Types

type AnnotationEnqueueRequestForOwner

type AnnotationEnqueueRequestForOwner struct {
	// OwnerType is the type of the Owner object to look for in OwnerReferences.  Only Group and Kind are compared.
	OwnerType client.Object

	// IsController if set will only look at the first OwnerReference with Controller: true.
	IsController bool
	// contains filtered or unexported fields
}

func (*AnnotationEnqueueRequestForOwner) Create

Create implements EventHandler.

func (*AnnotationEnqueueRequestForOwner) Delete

Delete implements EventHandler.

func (*AnnotationEnqueueRequestForOwner) Generic

Generic implements EventHandler.

func (*AnnotationEnqueueRequestForOwner) Update

Update implements EventHandler.

type OwnerStrategyAnnotation

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

AnnotationOwner handling strategy uses .metadata.annotations. Allows cross-namespace owner references.

func NewAnnotation

func NewAnnotation(scheme *runtime.Scheme) *OwnerStrategyAnnotation

func (*OwnerStrategyAnnotation) EnqueueRequestForOwner

func (s *OwnerStrategyAnnotation) EnqueueRequestForOwner(
	ownerType client.Object, _ meta.RESTMapper, isController bool,
) handler.EventHandler

func (*OwnerStrategyAnnotation) IsController

func (s *OwnerStrategyAnnotation) IsController(
	owner, obj metav1.Object,
) bool

func (*OwnerStrategyAnnotation) IsOwner

func (s *OwnerStrategyAnnotation) IsOwner(owner, obj metav1.Object) bool

func (*OwnerStrategyAnnotation) OwnerPatch

func (s *OwnerStrategyAnnotation) OwnerPatch(owner metav1.Object) ([]byte, error)

func (*OwnerStrategyAnnotation) ReleaseController

func (s *OwnerStrategyAnnotation) ReleaseController(obj metav1.Object)

func (*OwnerStrategyAnnotation) RemoveOwner

func (s *OwnerStrategyAnnotation) RemoveOwner(owner, obj metav1.Object)

func (*OwnerStrategyAnnotation) SetControllerReference

func (s *OwnerStrategyAnnotation) SetControllerReference(owner, obj metav1.Object) error

func (*OwnerStrategyAnnotation) SetOwnerReference

func (s *OwnerStrategyAnnotation) SetOwnerReference(owner, obj metav1.Object) error

type OwnerStrategyNative

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

NativeOwner handling strategy uses .metadata.ownerReferences.

func NewNative

func NewNative(scheme *runtime.Scheme) *OwnerStrategyNative

func (*OwnerStrategyNative) EnqueueRequestForOwner

func (s *OwnerStrategyNative) EnqueueRequestForOwner(
	ownerType client.Object, mapper meta.RESTMapper, isController bool,
) handler.EventHandler

func (*OwnerStrategyNative) IsController

func (s *OwnerStrategyNative) IsController(
	owner, obj metav1.Object,
) bool

func (*OwnerStrategyNative) IsOwner

func (s *OwnerStrategyNative) IsOwner(owner, obj metav1.Object) bool

func (*OwnerStrategyNative) OwnerPatch

func (s *OwnerStrategyNative) OwnerPatch(owner metav1.Object) ([]byte, error)

func (*OwnerStrategyNative) ReleaseController

func (s *OwnerStrategyNative) ReleaseController(obj metav1.Object)

func (*OwnerStrategyNative) RemoveOwner

func (s *OwnerStrategyNative) RemoveOwner(owner, obj metav1.Object)

func (*OwnerStrategyNative) SetControllerReference

func (s *OwnerStrategyNative) SetControllerReference(owner, obj metav1.Object) error

func (*OwnerStrategyNative) SetOwnerReference

func (s *OwnerStrategyNative) SetOwnerReference(owner, obj metav1.Object) error

Jump to

Keyboard shortcuts

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