backup

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BackupNameLabel is the label key used to identify a schedule by name.
	BackupNameLabel = "kurator.dev/backup-name"
	// RestoreNameLabel is the label key used to identify a restore by name.
	RestoreNameLabel = "kurator.dev/restore-name"
	// MigrateNameLabel is the label key used to identify a migrate by name.
	MigrateNameLabel = "kurator.dev/migrate-name"

	BackupKind  = "backup"
	RestoreKind = "restore"
	MigrateKind = "migrate"

	// VeleroNamespace defines the default namespace where all Velero resources are created. It's a constant namespace used by Velero.
	VeleroNamespace = "velero"

	BackupFinalizer  = "backup.kurator.dev"
	RestoreFinalizer = "restore.kurator.dev"
	MigrateFinalizer = "migrate.kurator.dev"

	// StatusSyncInterval specifies the interval for requeueing when synchronizing status. It determines how frequently the status should be checked and updated.
	StatusSyncInterval = 30 * time.Second
)

Variables

View Source
var ErrNoCompletedBackups = errors.New("No completed Velero backups available for restore.")

Functions

func GetCronInterval

func GetCronInterval(cronExpr string) (time.Duration, error)

GetCronInterval return the cron interval of a cron expression。

func MostRecentCompletedBackup

func MostRecentCompletedBackup(backups []velerov1.Backup) velerov1.Backup

MostRecentCompletedBackup returns the most recent backup that's completed from a list of backups. origin from https://github.com/vmware-tanzu/velero/blob/release-1.12/pkg/controller/restore_controller.go

Types

type BackupManager

type BackupManager struct {
	client.Client
	Scheme *runtime.Scheme
}

BackupManager reconciles a Backup object

func (*BackupManager) Reconcile

func (b *BackupManager) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*BackupManager) SetupWithManager

func (b *BackupManager) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error

SetupWithManager sets up the controller with the Manager.

type MigrateManager

type MigrateManager struct {
	client.Client
	Scheme *runtime.Scheme
}

MigrateManager reconciles a Migrate object

func (*MigrateManager) Reconcile

func (m *MigrateManager) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*MigrateManager) SetupWithManager

func (m *MigrateManager) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error

SetupWithManager sets up the controller with the Manager.

type RestoreManager

type RestoreManager struct {
	client.Client
	Scheme *runtime.Scheme
}

RestoreManager reconciles a Restore object

func (*RestoreManager) Reconcile

func (r *RestoreManager) Reconcile(ctx context.Context, req ctrl.Request) (_ ctrl.Result, reterr error)

func (*RestoreManager) SetupWithManager

func (r *RestoreManager) SetupWithManager(ctx context.Context, mgr ctrl.Manager, options controller.Options) error

SetupWithManager sets up the controller with the Manager.

Jump to

Keyboard shortcuts

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