Documentation ¶
Index ¶
- Constants
- func GetPvbRepositoryType(pvb *velerov1api.PodVolumeBackup) string
- func GetPvrRepositoryType(pvr *velerov1api.PodVolumeRestore) string
- func GetSnapshotIdentifier(podVolumeBackups *velerov1api.PodVolumeBackupList) []repository.SnapshotIdentifier
- func GetVolumeBackupsForPod(podVolumeBackups []*velerov1api.PodVolumeBackup, pod *corev1api.Pod, ...) map[string]string
- func GetVolumesByPod(pod *corev1api.Pod, defaultVolumesToFsBackup bool) []string
- func GetVolumesToBackup(obj metav1.Object) []string
- type Backupper
- type BackupperFactory
- type RestoreData
- type Restorer
- type RestorerFactory
Constants ¶
const ( // PVCNameAnnotation is the key for the annotation added to // pod volume backups when they're for a PVC. PVCNameAnnotation = "velero.io/pvc-name" // VolumesToBackupAnnotation is the annotation on a pod whose mounted volumes // need to be backed up using pod volume backup. VolumesToBackupAnnotation = "backup.velero.io/backup-volumes" // VolumesToExcludeAnnotation is the annotation on a pod whose mounted volumes // should be excluded from pod volume backup. VolumesToExcludeAnnotation = "backup.velero.io/backup-volumes-excludes" // DefaultVolumesToFsBackup specifies whether pod volume backup should be used, by default, to // take backup of all pod volumes. DefaultVolumesToFsBackup = false )
Variables ¶
This section is empty.
Functions ¶
func GetPvbRepositoryType ¶
func GetPvbRepositoryType(pvb *velerov1api.PodVolumeBackup) string
GetPvbRepositoryType returns the repositoryType according to the PVB information
func GetPvrRepositoryType ¶
func GetPvrRepositoryType(pvr *velerov1api.PodVolumeRestore) string
GetPvrRepositoryType returns the repositoryType according to the PVR information
func GetSnapshotIdentifier ¶
func GetSnapshotIdentifier(podVolumeBackups *velerov1api.PodVolumeBackupList) []repository.SnapshotIdentifier
GetSnapshotIdentifier returns the snapshots represented by SnapshotIdentifier for the given PVBs
func GetVolumeBackupsForPod ¶
func GetVolumeBackupsForPod(podVolumeBackups []*velerov1api.PodVolumeBackup, pod *corev1api.Pod, sourcePodNs string) map[string]string
GetVolumeBackupsForPod returns a map, of volume name -> snapshot id, of the PodVolumeBackups that exist for the provided pod.
func GetVolumesByPod ¶
GetVolumesByPod returns a list of volume names to backup for the provided pod.
func GetVolumesToBackup ¶
GetVolumesToBackup returns a list of volume names to backup for the provided pod. Deprecated: Use GetVolumesByPod instead.
Types ¶
type Backupper ¶
type Backupper interface { // BackupPodVolumes backs up all specified volumes in a pod. BackupPodVolumes(backup *velerov1api.Backup, pod *corev1api.Pod, volumesToBackup []string, resPolicies *resourcepolicies.Policies, log logrus.FieldLogger) ([]*velerov1api.PodVolumeBackup, []error) }
Backupper can execute pod volume backups of volumes in a pod.
type BackupperFactory ¶
type BackupperFactory interface { // NewBackupper returns a pod volumes backupper for use during a single Velero backup. NewBackupper(context.Context, *velerov1api.Backup, string) (Backupper, error) }
BackupperFactory can construct pod volumes backuppers.
func NewBackupperFactory ¶
func NewBackupperFactory( repoLocker *repository.RepoLocker, repoEnsurer *repository.RepositoryEnsurer, veleroClient clientset.Interface, pvcClient corev1client.PersistentVolumeClaimsGetter, pvClient corev1client.PersistentVolumesGetter, podClient corev1client.PodsGetter, log logrus.FieldLogger, ) BackupperFactory
type RestoreData ¶
type RestoreData struct { Restore *velerov1api.Restore Pod *corev1api.Pod PodVolumeBackups []*velerov1api.PodVolumeBackup SourceNamespace, BackupLocation string }
type Restorer ¶
type Restorer interface { // RestorePodVolumes restores all annotated volumes in a pod. RestorePodVolumes(RestoreData) []error }
Restorer can execute pod volume restores of volumes in a pod.
type RestorerFactory ¶
type RestorerFactory interface { // NewRestorer returns a pod volumes restorer for use during a single Velero restore. NewRestorer(context.Context, *velerov1api.Restore) (Restorer, error) }
RestorerFactory can construct pod volumes restorers.
func NewRestorerFactory ¶
func NewRestorerFactory(repoLocker *repository.RepoLocker, repoEnsurer *repository.RepositoryEnsurer, veleroClient clientset.Interface, pvcClient corev1client.PersistentVolumeClaimsGetter, podClient corev1client.PodsGetter, kubeClient kubernetes.Interface, log logrus.FieldLogger) RestorerFactory