deletion

package
v0.26.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// LogicalClusterDeletionFinalizer is the name of the finalizer on LogicalClusters that
	// delay deletion until all content is removed.
	LogicalClusterDeletionFinalizer = "core.kcp.io/logicalcluster-deletion"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ResourcesRemainingError

type ResourcesRemainingError struct {
	Estimate int64
	Message  string
}

ResourcesRemainingError is used to inform the caller that all resources are not yet fully removed from the logical cluster.

func (*ResourcesRemainingError) Error

func (e *ResourcesRemainingError) Error() string

type WorkspaceResourcesDeleterInterface

type WorkspaceResourcesDeleterInterface interface {
	Delete(ctx context.Context, cluster *corev1alpha1.LogicalCluster) error
}

WorkspaceResourcesDeleterInterface is the interface to delete a logical cluster with all resources in it. This is a copy from namespace deleteor in k8s with some modification: - change the condition update code - remove opCache - update deleteCollection to delete resources from all namespaces.

func NewWorkspacedResourcesDeleter

func NewWorkspacedResourcesDeleter(
	metadataClusterClient kcpmetadata.ClusterInterface,
	discoverResourcesFn func(clusterName logicalcluster.Path) ([]*metav1.APIResourceList, error),
	isBoundResource func(clusterName logicalcluster.Name, group, resource string) (bool, error),
) WorkspaceResourcesDeleterInterface

NewWorkspacedResourcesDeleter returns a new NamespacedResourcesDeleter.

Jump to

Keyboard shortcuts

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