Documentation
¶
Overview ¶
Package controllerhelper contains common helper for controllers.
Index ¶
- func HandleObjectDeletion(ctx context.Context, cl client.Client, am *artifact.Manager, finalizer string, ...) (bool, error)
- func NodeMatchesSelector(ctx context.Context, cl client.Client, nodeName string, ...) (bool, error)
- func RemoveLocalResources(ctx context.Context, cl client.Client, am *artifact.Manager, finalizer string, ...) (bool, error)
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.
Click to show internal directories.
Click to hide internal directories.