backup

package
v0.3.0-preview1 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 40 Imported by: 4

Documentation

Index

Constants

View Source
const (
	KIND                     = "nfs"
	MountDir                 = "/var/lib/harvester/harvester-backupstore-mounts"
	UnsupportedProtocolError = "Protocol not supported"
)

Variables

View Source
var (
	MinorVersions = []string{"4.2", "4.1", "4.0"}
)

nfs class help to validate the nfs server

Functions

func RegisterBackup

func RegisterBackup(ctx context.Context, management *config.Management, opts config.Options) error

RegisterBackup register the vmBackup and volumeSnapshot controller

func RegisterBackupTarget

func RegisterBackupTarget(ctx context.Context, management *config.Management, opts config.Options) error

RegisterBackupTarget register the setting controller and validate the configured backup target server

func RegisterRestore

func RegisterRestore(ctx context.Context, management *config.Management, opts config.Options) error

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func (*Handler) OnBackupChange

OnBackupChange handles vm backup object on change and reconcile vm backup status

type RestoreHandler

type RestoreHandler struct {
	// contains filtered or unexported fields
}

func (*RestoreHandler) GetNewVolumes added in v0.3.0

func (h *RestoreHandler) GetNewVolumes(vm *kv1.VirtualMachineSpec, vmRestore *harvesterv1.VirtualMachineRestore) ([]kv1.Volume, error)

func (*RestoreHandler) PersistentVolumeClaimOnChange

func (h *RestoreHandler) PersistentVolumeClaimOnChange(key string, pvc *corev1.PersistentVolumeClaim) (*corev1.PersistentVolumeClaim, error)

PersistentVolumeClaimOnChange watching the PVCs on change and enqueue the vmRestore if it has the restore annotation

func (*RestoreHandler) RestoreOnChanged

RestoreOnChanged handles vmRestore CRD object on change, it will help to create the new PVCs and either replace them with existing VM or used for the new VM.

func (*RestoreHandler) VMOnChange

func (h *RestoreHandler) VMOnChange(key string, vm *kv1.VirtualMachine) (*kv1.VirtualMachine, error)

VMOnChange watching the VM on change and enqueue the vmRestore if it has the restore annotation

type StoreDriver

type StoreDriver struct {
	*fsops.FileSystemOperator
	// contains filtered or unexported fields
}

func (*StoreDriver) GetURL

func (b *StoreDriver) GetURL() string

func (*StoreDriver) Kind

func (b *StoreDriver) Kind() string

func (*StoreDriver) LocalPath

func (b *StoreDriver) LocalPath(path string) string

type TargetHandler

type TargetHandler struct {
	// contains filtered or unexported fields
}

func (*TargetHandler) OnBackupTargetChange

func (h *TargetHandler) OnBackupTargetChange(key string, setting *harvesterv1.Setting) (*harvesterv1.Setting, error)

OnBackupTargetChange handles backupTarget setting object on change

Jump to

Keyboard shortcuts

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