ctrlutil

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateWork

func CreateOrUpdateWork(ctx context.Context, c client.Client, workMeta metav1.ObjectMeta, resource *unstructured.Unstructured, options ...WorkOption) error

CreateOrUpdateWork creates a Work object if not exist, or updates if it already exists.

Types

type WorkOption

type WorkOption func(work *workv1alpha1.Work)

WorkOption is a function that applies changes to a Work object. It is used to configure Work fields for clients of CreateOrUpdateWork.

func WithPreserveResourcesOnDeletion

func WithPreserveResourcesOnDeletion(preserveResourcesOnDeletion bool) WorkOption

WithPreserveResourcesOnDeletion sets the PreserveResourcesOnDeletion field of the Work Spec.

func WithSuspendDispatching

func WithSuspendDispatching(suspendDispatching bool) WorkOption

WithSuspendDispatching sets the SuspendDispatching field of the Work Spec.

Jump to

Keyboard shortcuts

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