Documentation
¶
Index ¶
- func AddAndPatchFinalizer(ctx context.Context, writer client.Writer, obj client.Object, finalizer string) error
- func GetPodClique(ctx context.Context, cl client.Client, logger logr.Logger, ...) grovectrl.ReconcileStepResult
- func GetPodCliqueScalingGroup(ctx context.Context, cl client.Client, logger logr.Logger, ...) grovectrl.ReconcileStepResult
- func GetPodCliqueSet(ctx context.Context, cl client.Client, logger logr.Logger, ...) grovectrl.ReconcileStepResult
- func HasExpectedOwner(expectedOwnerKind string, ownerRefs []metav1.OwnerReference) bool
- func IsManagedByGrove(labels map[string]string) bool
- func IsManagedPodClique(obj client.Object, expectedOwnerKinds ...string) bool
- func RemoveAndPatchFinalizer(ctx context.Context, writer client.Writer, obj client.Object, finalizer string) error
- func ShouldContinueReconcileAndRequeue(err error) bool
- func ShouldRequeueAfter(err error) bool
- func VerifyNoResourceAwaitsCleanup[T component.GroveCustomResourceType](ctx context.Context, logger logr.Logger, ...) grovectrl.ReconcileStepResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddAndPatchFinalizer ¶
func AddAndPatchFinalizer(ctx context.Context, writer client.Writer, obj client.Object, finalizer string) error
AddAndPatchFinalizer uses merge-patch strategy to patch the given object with the given finalizer.
func GetPodClique ¶
func GetPodClique(ctx context.Context, cl client.Client, logger logr.Logger, objectKey client.ObjectKey, pclq *v1alpha1.PodClique, ignoreNotFound bool) grovectrl.ReconcileStepResult
GetPodClique gets the latest PodClique object. It will usually hit the informer cache. If the object is not found, it will log a message and return DoNotRequeue.
func GetPodCliqueScalingGroup ¶
func GetPodCliqueScalingGroup(ctx context.Context, cl client.Client, logger logr.Logger, objectKey client.ObjectKey, pcsg *v1alpha1.PodCliqueScalingGroup) grovectrl.ReconcileStepResult
GetPodCliqueScalingGroup gets the latest PodCliqueScalingGroup object. It will usually hit the informer cache. If the object is not found, it will log a message and return DoNotRequeue.
func GetPodCliqueSet ¶
func GetPodCliqueSet(ctx context.Context, cl client.Client, logger logr.Logger, objectKey client.ObjectKey, pcs *v1alpha1.PodCliqueSet) grovectrl.ReconcileStepResult
GetPodCliqueSet gets the latest PodCliqueSet object. It will usually hit the informer cache. If the object is not found, it will log a message and return DoNotRequeue.
func HasExpectedOwner ¶
func HasExpectedOwner(expectedOwnerKind string, ownerRefs []metav1.OwnerReference) bool
HasExpectedOwner checks if the owner references of a resource match the expected owner kind.
func IsManagedByGrove ¶
IsManagedByGrove checks if the pod is managed by Grove by inspecting its labels. All grove managed resources will have a standard set of default labels.
func IsManagedPodClique ¶
IsManagedPodClique checks if the PodClique is managed by Grove.
func RemoveAndPatchFinalizer ¶
func RemoveAndPatchFinalizer(ctx context.Context, writer client.Writer, obj client.Object, finalizer string) error
RemoveAndPatchFinalizer uses merge-patch strategy to patch the given object thereby resulting in removal of the given finalizer.
func ShouldContinueReconcileAndRequeue ¶
ShouldContinueReconcileAndRequeue checks if an error is a Grove error, and if it is, returns true when the error code is groveerr.ErrCodeContinueReconcileAndRequeue.
func ShouldRequeueAfter ¶
ShouldRequeueAfter checks if an error is a GroveError and if yes then returns true when the error code is groveerr.ErrCodeRequeueAfter along with the GroveError.Message, else it returns false and an empty message.
func VerifyNoResourceAwaitsCleanup ¶
func VerifyNoResourceAwaitsCleanup[T component.GroveCustomResourceType](ctx context.Context, logger logr.Logger, operatorRegistry component.OperatorRegistry[T], objMeta metav1.ObjectMeta) grovectrl.ReconcileStepResult
VerifyNoResourceAwaitsCleanup ensures no resources that are to be cleaned up are still present in the cluster.
Types ¶
This section is empty.