controllerhelper

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package controllerhelper contains common helper for controllers.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleObjectDeletion

func HandleObjectDeletion(ctx context.Context, cl client.Client, am *artifact.Manager, finalizer string, obj client.Object) (bool, error)

HandleObjectDeletion handles the deletion of an object. It removes the finalizer and cleans up the local resources associated with the object.

func NodeMatchesSelector

func NodeMatchesSelector(ctx context.Context, cl client.Client, nodeName string, labelSelector *metav1.LabelSelector) (bool, error)

NodeMatchesSelector checks if a selector matches the node labels.

func RemoveLocalResources

func RemoveLocalResources(ctx context.Context, cl client.Client, am *artifact.Manager, finalizer string, obj client.Object) (bool, error)

RemoveLocalResources removes local resources associated with the object. Helps to clean up local resources when the object is not targeting the current node anymore. It also removes the finalizer from the object.

Types

This section is empty.

Jump to

Keyboard shortcuts

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