prune

package
v1.0.0-20221102-166735... Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PVCPruner

type PVCPruner interface {
	Prune(ctx context.Context, tc *v1alpha1.TiflowCluster) error
}

func NewPersistentVolumePruner

func NewPersistentVolumePruner(clientSet kubernetes.Interface) PVCPruner

NewPersistentVolumePruner return a new PersistentVolumePruner

type PersistentVolumePruner

type PersistentVolumePruner struct {
	ClientSet kubernetes.Interface
}

PersistentVolumePruner provides a Prune() method to remove unused statefulset PVC and their underlying PVs. The underlying PVs SHOULD have their reclaim policy set to delete.

func (*PersistentVolumePruner) Prune

Prune locates and removes all PVCs that belong to a given statefulSet but are not in use. The underlying PVs' reclaim policy should be set to delete, other options may result in leaking volumes which cost us money.

Jump to

Keyboard shortcuts

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