nsdeleter

package
v0.0.0-...-b5abb6b Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: BSD-3-Clause Imports: 18 Imported by: 0

README

Copy of: https://github.com/kubernetes/kubernetes/tree/v1.18.2/pkg/controller/namespace/deletion This code is from the kubernetes repository. Since it was not a good idea to import the whole kubernetes as dependency, this dir has a copy of the namespace deleter func.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NamespaceConditionUpdater

type NamespaceConditionUpdater interface {
	ProcessDiscoverResourcesErr(e error)
	ProcessGroupVersionErr(e error)
	ProcessDeleteContentErr(e error)
	Update(*v1.Namespace) bool
}

NamespaceConditionUpdater interface that translates namespace deleter errors into namespace status conditions.

type NamespacedResourcesDeleterInterface

type NamespacedResourcesDeleterInterface interface {
	Delete(nsName string) error
}

NamespacedResourcesDeleterInterface is the interface to delete a namespace with all resources in it.

func NewNamespacedResourcesDeleter

func NewNamespacedResourcesDeleter(nsClient v1clientset.NamespaceInterface,
	metadataClient metadata.Interface, podsGetter v1clientset.PodsGetter,
	discoverResourcesFn func() ([]*metav1.APIResourceList, error),
	finalizerToken v1.FinalizerName) NamespacedResourcesDeleterInterface

NewNamespacedResourcesDeleter returns a new NamespacedResourcesDeleter.

type ResourcesRemainingError

type ResourcesRemainingError struct {
	Estimate int64
}

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

func (*ResourcesRemainingError) Error

func (e *ResourcesRemainingError) Error() string

Jump to

Keyboard shortcuts

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