finalize

package
v0.51.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddFinalizer

func AddFinalizer(ctx context.Context, rclient client.Client, instance client.Object) error

AddFinalizer adds finalizer to instance if needed.

func FreeIfNeeded

func FreeIfNeeded(ctx context.Context, rclient client.Client, object client.Object) error

FreeIfNeeded checks if resource must be freed from finalizer and garbage collected by kubernetes

func OnVLogsDelete added in v0.47.0

func OnVLogsDelete(ctx context.Context, rclient client.Client, crd *vmv1beta1.VLogs) error

OnVLogsDelete deletes all vlogs related resources

func OnVMAgentDelete

func OnVMAgentDelete(ctx context.Context, rclient client.Client, crd *vmv1beta1.VMAgent) error

OnVMAgentDelete deletes all vmagent related resources

func OnVMAlertDelete

func OnVMAlertDelete(ctx context.Context, rclient client.Client, crd *vmv1beta1.VMAlert) error

OnVMAlertDelete deletes all vmalert related resources

func OnVMAlertManagerDelete

func OnVMAlertManagerDelete(ctx context.Context, rclient client.Client, crd *vmv1beta1.VMAlertmanager) error

OnVMAlertManagerDelete deletes all alertmanager related resources

func OnVMAuthDelete

func OnVMAuthDelete(ctx context.Context, rclient client.Client, crd *vmv1beta1.VMAuth) error

OnVMAuthDelete deletes all vmauth related resources

func OnVMClusterDelete

func OnVMClusterDelete(ctx context.Context, rclient client.Client, crd *vmv1beta1.VMCluster) error

OnVMClusterDelete deletes all vmcluster related resources

func OnVMClusterLoadBalancerDelete added in v0.49.0

func OnVMClusterLoadBalancerDelete(ctx context.Context, rclient client.Client, cr *vmv1beta1.VMCluster) error

OnVMClusterLoadBalancerDelete removes vmauth loadbalancer components for vmcluster

func OnVMInsertDelete added in v0.48.0

func OnVMInsertDelete(ctx context.Context, rclient client.Client, crd *vmv1beta1.VMCluster, obj *vmv1beta1.VMInsert) error

OnVMInsertDelete removes all objects related to vminsert component

func OnVMSelectDelete added in v0.48.0

func OnVMSelectDelete(ctx context.Context, rclient client.Client, crd *vmv1beta1.VMCluster, obj *vmv1beta1.VMSelect) error

OnVMInsertDelete removes all objects related to vminsert component

func OnVMSingleDelete

func OnVMSingleDelete(ctx context.Context, rclient client.Client, crd *vmv1beta1.VMSingle) error

OnVMSingleDelete deletes all vmsingle related resources

func OnVMStorageDelete added in v0.48.0

func OnVMStorageDelete(ctx context.Context, rclient client.Client, crd *vmv1beta1.VMCluster, obj *vmv1beta1.VMStorage) error

OnVMInsertDelete removes all objects related to vminsert component

func OnVMUserDelete

func OnVMUserDelete(ctx context.Context, rclient client.Client, crd *v1beta1.VMUser) error

OnVMUserDelete deletes all vmuser related resources

func RemoveFinalizer

func RemoveFinalizer(ctx context.Context, rclient client.Client, instance client.Object) error

RemoveFinalizer removes finalizer from instance if needed.

func RemoveOrphanedDeployments

func RemoveOrphanedDeployments(ctx context.Context, rclient client.Client, cr orphanedCRD, keepDeployments map[string]struct{}) error

RemoveOrphanedDeployments removes deployments detached from given object

func RemoveOrphanedSTSs

func RemoveOrphanedSTSs(ctx context.Context, rclient client.Client, cr orphanedCRD, keepSTSNames map[string]struct{}) error

RemoveOrphanedSTSs removes deployments detached from given object

func SafeDelete

func SafeDelete(ctx context.Context, rclient client.Client, r client.Object) error

SafeDelete removes object, ignores notfound error.

func SafeDeleteWithFinalizer added in v0.48.0

func SafeDeleteWithFinalizer(ctx context.Context, rclient client.Client, r client.Object) error

SafeDeleteWithFinalizer removes object, ignores notfound error.

Types

type RemoveSvcArgs

type RemoveSvcArgs struct {
	PrefixedName   func() string
	SelectorLabels func() map[string]string
	GetNameSpace   func() string
}

RemoveSvcArgs defines interface for service deletion

Jump to

Keyboard shortcuts

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