backup

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: Apache-2.0 Imports: 38 Imported by: 4

Documentation

Index

Constants

View Source
const (
	AWSAccessKey       = "AWS_ACCESS_KEY_ID"
	AWSSecretKey       = "AWS_SECRET_ACCESS_KEY"
	AWSEndpoints       = "AWS_ENDPOINTS"
	AWSCERT            = "AWS_CERT"
	VirtualHostedStyle = "VIRTUAL_HOSTED_STYLE"
)
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 ConstructEndpoint added in v1.0.0

func ConstructEndpoint(target *settings.BackupTarget) string

func IsBackupTargetSame added in v1.0.0

func IsBackupTargetSame(vmBackupTarget *harvesterv1.BackupTarget, target *settings.BackupTarget) bool

func RegisterBackup

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

RegisterBackup register the vmBackup and volumeSnapshot controller

func RegisterBackupMetadata added in v1.0.0

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

RegisterBackupMetadata register the setting controller and resync vm backup metadata when backup target change

func RegisterBackupTarget

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

RegisterBackupTarget register the setting controller and reconsile longhorn setting when backup target changed

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

func (*Handler) OnBackupRemove added in v1.0.0

OnBackupRemove remove remote vm backup metadata

func (*Handler) OnLHBackupChanged added in v1.0.0

func (h *Handler) OnLHBackupChanged(key string, lhBackup *lhv1beta1.Backup) (*lhv1beta1.Backup, error)

type MetadataHandler added in v1.0.0

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

func (*MetadataHandler) OnBackupTargetChange added in v1.0.0

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

OnBackupTargetChange resync vm metadata files when backup target change

type RestoreHandler

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

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

type VirtualMachineBackupMetadata added in v1.0.0

type VirtualMachineBackupMetadata struct {
	Name          string                                `json:"name"`
	Namespace     string                                `json:"namespace"`
	BackupSpec    harvesterv1.VirtualMachineBackupSpec  `json:"backupSpec,omitempty"`
	VMSourceSpec  *harvesterv1.VirtualMachineSourceSpec `json:"vmSourceSpec,omitempty"`
	VolumeBackups []harvesterv1.VolumeBackup            `json:"volumeBackups,omitempty"`
	SecretBackups []harvesterv1.SecretBackup            `json:"secretBackups,omitempty"`
}

Jump to

Keyboard shortcuts

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