controller

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: Apache-2.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GCSyncPeriod = 60 * time.Minute
)

Variables

This section is empty.

Functions

func NewScheduleController

func NewScheduleController(
	namespace string,
	schedulesClient velerov1client.SchedulesGetter,
	backupsClient velerov1client.BackupsGetter,
	schedulesInformer informers.ScheduleInformer,
	logger logrus.FieldLogger,
	metrics *metrics.ServerMetrics,
) *scheduleController

func NewServerStatusRequestController

func NewServerStatusRequestController(
	logger logrus.FieldLogger,
	client velerov1client.ServerStatusRequestsGetter,
	informer velerov1informers.ServerStatusRequestInformer,
	pluginRegistry clientmgmt.Registry,
) *statusRequestController

Types

type BackupTracker

type BackupTracker interface {
	// Add informs the tracker that a backup is in progress.
	Add(ns, name string)
	// Delete informs the tracker that a backup is no longer in progress.
	Delete(ns, name string)
	// Contains returns true if the tracker is tracking the backup.
	Contains(ns, name string) bool
}

BackupTracker keeps track of in-progress backups.

func NewBackupTracker

func NewBackupTracker() BackupTracker

NewBackupTracker returns a new BackupTracker.

type Interface

type Interface interface {
	// Run runs the component.
	Run(ctx context.Context, workers int) error
}

Interface represents a runnable component.

func NewBackupController

func NewBackupController(
	backupInformer informers.BackupInformer,
	client velerov1client.BackupsGetter,
	backupper pkgbackup.Backupper,
	logger logrus.FieldLogger,
	backupLogLevel logrus.Level,
	newPluginManager func(logrus.FieldLogger) clientmgmt.Manager,
	backupTracker BackupTracker,
	backupLocationInformer informers.BackupStorageLocationInformer,
	defaultBackupLocation string,
	defaultBackupTTL time.Duration,
	volumeSnapshotLocationInformer informers.VolumeSnapshotLocationInformer,
	defaultSnapshotLocations map[string]string,
	metrics *metrics.ServerMetrics,
	formatFlag logging.Format,
) Interface

func NewBackupDeletionController

func NewBackupDeletionController(
	logger logrus.FieldLogger,
	deleteBackupRequestInformer informers.DeleteBackupRequestInformer,
	deleteBackupRequestClient velerov1client.DeleteBackupRequestsGetter,
	backupClient velerov1client.BackupsGetter,
	restoreInformer informers.RestoreInformer,
	restoreClient velerov1client.RestoresGetter,
	backupTracker BackupTracker,
	resticMgr restic.RepositoryManager,
	podvolumeBackupInformer informers.PodVolumeBackupInformer,
	backupLocationInformer informers.BackupStorageLocationInformer,
	snapshotLocationInformer informers.VolumeSnapshotLocationInformer,
	newPluginManager func(logrus.FieldLogger) clientmgmt.Manager,
	metrics *metrics.ServerMetrics,
) Interface

NewBackupDeletionController creates a new backup deletion controller.

func NewBackupSyncController

func NewBackupSyncController(
	backupClient velerov1client.BackupsGetter,
	backupLocationClient velerov1client.BackupStorageLocationsGetter,
	podVolumeBackupClient velerov1client.PodVolumeBackupsGetter,
	backupInformer informers.BackupInformer,
	backupStorageLocationInformer informers.BackupStorageLocationInformer,
	podVolumeBackupInformer informers.PodVolumeBackupInformer,
	syncPeriod time.Duration,
	namespace string,
	defaultBackupLocation string,
	newPluginManager func(logrus.FieldLogger) clientmgmt.Manager,
	logger logrus.FieldLogger,
) Interface

func NewDownloadRequestController

func NewDownloadRequestController(
	downloadRequestClient velerov1client.DownloadRequestsGetter,
	downloadRequestInformer informers.DownloadRequestInformer,
	restoreInformer informers.RestoreInformer,
	backupLocationInformer informers.BackupStorageLocationInformer,
	backupInformer informers.BackupInformer,
	newPluginManager func(logrus.FieldLogger) clientmgmt.Manager,
	logger logrus.FieldLogger,
) Interface

NewDownloadRequestController creates a new DownloadRequestController.

func NewGCController

func NewGCController(
	logger logrus.FieldLogger,
	backupInformer informers.BackupInformer,
	deleteBackupRequestInformer informers.DeleteBackupRequestInformer,
	deleteBackupRequestClient velerov1client.DeleteBackupRequestsGetter,
	backupLocationInformer informers.BackupStorageLocationInformer,
) Interface

NewGCController constructs a new gcController.

func NewPodVolumeBackupController

func NewPodVolumeBackupController(
	logger logrus.FieldLogger,
	podVolumeBackupInformer informers.PodVolumeBackupInformer,
	podVolumeBackupClient velerov1client.PodVolumeBackupsGetter,
	podInformer cache.SharedIndexInformer,
	secretInformer cache.SharedIndexInformer,
	pvcInformer corev1informers.PersistentVolumeClaimInformer,
	pvInformer corev1informers.PersistentVolumeInformer,
	backupLocationInformer informers.BackupStorageLocationInformer,
	nodeName string,
) Interface

NewPodVolumeBackupController creates a new pod volume backup controller.

func NewPodVolumeRestoreController

func NewPodVolumeRestoreController(
	logger logrus.FieldLogger,
	podVolumeRestoreInformer informers.PodVolumeRestoreInformer,
	podVolumeRestoreClient velerov1client.PodVolumeRestoresGetter,
	podInformer cache.SharedIndexInformer,
	secretInformer cache.SharedIndexInformer,
	pvcInformer corev1informers.PersistentVolumeClaimInformer,
	pvInformer corev1informers.PersistentVolumeInformer,
	backupLocationInformer informers.BackupStorageLocationInformer,
	nodeName string,
) Interface

NewPodVolumeRestoreController creates a new pod volume restore controller.

func NewResticRepositoryController

func NewResticRepositoryController(
	logger logrus.FieldLogger,
	resticRepositoryInformer informers.ResticRepositoryInformer,
	resticRepositoryClient velerov1client.ResticRepositoriesGetter,
	backupLocationInformer informers.BackupStorageLocationInformer,
	repositoryManager restic.RepositoryManager,
	defaultMaintenanceFrequency time.Duration,
) Interface

NewResticRepositoryController creates a new restic repository controller.

func NewRestoreController

func NewRestoreController(
	namespace string,
	restoreInformer informers.RestoreInformer,
	restoreClient velerov1client.RestoresGetter,
	podVolumeBackupClient velerov1client.PodVolumeBackupsGetter,
	restorer pkgrestore.Restorer,
	backupInformer informers.BackupInformer,
	backupLocationInformer informers.BackupStorageLocationInformer,
	snapshotLocationInformer informers.VolumeSnapshotLocationInformer,
	logger logrus.FieldLogger,
	restoreLogLevel logrus.Level,
	newPluginManager func(logrus.FieldLogger) clientmgmt.Manager,
	defaultBackupLocation string,
	metrics *metrics.ServerMetrics,
	logFormat logging.Format,
) Interface

Jump to

Keyboard shortcuts

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