migrate

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: Apache-2.0 Imports: 16 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DesiredAccessModeAnnotation = baseAnnotation + "-destinationaccessmode"
)
View Source
const IsDefaultStorageClassAnnotation = "storageclass.kubernetes.io/is-default-class"

IsDefaultStorageClassAnnotation - this is also exported by https://github.com/kubernetes/kubernetes/blob/v1.21.3/pkg/apis/storage/v1/util/helpers.go#L25 but that would require adding the k8s import overrides to our go.mod

Variables

This section is empty.

Functions

func GetDestAccessModes added in v0.10.0

func GetDestAccessModes(srcPVC corev1.PersistentVolumeClaim) ([]corev1.PersistentVolumeAccessMode, error)

func Migrate

func Migrate(ctx context.Context, w *log.Logger, clientset k8sclient.Interface, options Options) error

Migrate moves data and PVCs from one StorageClass to another

Types

type LineReader added in v0.8.0

type LineReader interface {
	ReadLine() ([]byte, bool, error)
}

LineReader is a helper so we can easily implement tests using concrete implementations. This is implemented by bufio.Reader type and that is the type we are targeting here.

type Options added in v0.4.0

type Options struct {
	SourceSCName         string
	DestSCName           string
	RsyncImage           string
	RsyncFlags           []string
	Namespace            string
	SetDefaults          bool
	VerboseCopy          bool
	SkipSourceValidation bool
	PodReadyTimeout      time.Duration
	DeletePVTimeout      time.Duration
}

Options is the set of options that should be provided to Migrate

Jump to

Keyboard shortcuts

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