Documentation ¶
Index ¶
- Constants
- func GetBackupCSIResources(client kbclient.Client, globalCRClient kbclient.Client, ...) (volumeSnapshots []snapshotv1api.VolumeSnapshot, ...)
- func NewBackedUpItemsMap() *backedUpItemsMap
- func NewDeleteBackupRequest(name string, uid string) *velerov1api.DeleteBackupRequest
- func NewDeleteBackupRequestListOptions(name, uid string) metav1.ListOptions
- func NewSkipPVTracker() *skipPVTracker
- type BackupItemBlock
- type Backupper
- type FileForArchive
- type PVSkipReason
- type Request
- type SkippedPV
- type VolumeSnapshotterGetter
Constants ¶
const ArgoCDManagedByNamespaceLabel = "argocd.argoproj.io/managed-by"
ArgoCD managed by namespace label key
const BackupFormatVersion = "1.1.0"
BackupFormatVersion is the current backup version for Velero, including major, minor, and patch.
const BackupVersion = 1
BackupVersion is the current backup major version for Velero. Deprecated, use BackupFormatVersion
Variables ¶
This section is empty.
Functions ¶
func GetBackupCSIResources ¶
func GetBackupCSIResources( client kbclient.Client, globalCRClient kbclient.Client, backup *velerov1api.Backup, backupLog logrus.FieldLogger, ) ( volumeSnapshots []snapshotv1api.VolumeSnapshot, volumeSnapshotContents []snapshotv1api.VolumeSnapshotContent, volumeSnapshotClasses []snapshotv1api.VolumeSnapshotClass, )
GetBackupCSIResources is used to get CSI snapshot related resources. Returns VolumeSnapshot, VolumeSnapshotContent, VolumeSnapshotClasses referenced
func NewBackedUpItemsMap ¶
func NewBackedUpItemsMap() *backedUpItemsMap
func NewDeleteBackupRequest ¶
func NewDeleteBackupRequest(name string, uid string) *velerov1api.DeleteBackupRequest
NewDeleteBackupRequest creates a DeleteBackupRequest for the backup identified by name and uid.
func NewDeleteBackupRequestListOptions ¶
func NewDeleteBackupRequestListOptions(name, uid string) metav1.ListOptions
NewDeleteBackupRequestListOptions creates a ListOptions with a label selector configured to find DeleteBackupRequests for the backup identified by name and uid.
func NewSkipPVTracker ¶
func NewSkipPVTracker() *skipPVTracker
Types ¶
type BackupItemBlock ¶
func NewBackupItemBlock ¶
func NewBackupItemBlock(log logrus.FieldLogger, itemBackupper *itemBackupper) *BackupItemBlock
type Backupper ¶
type Backupper interface { // Backup takes a backup using the specification in the velerov1api.Backup and writes backup and log data // to the given writers. Backup( logger logrus.FieldLogger, backup *Request, backupFile io.Writer, actions []biav2.BackupItemAction, itemBlockActions []ibav1.ItemBlockAction, volumeSnapshotterGetter VolumeSnapshotterGetter, ) error BackupWithResolvers( log logrus.FieldLogger, backupRequest *Request, backupFile io.Writer, backupItemActionResolver framework.BackupItemActionResolverV2, itemBlockActionResolver framework.ItemBlockActionResolver, volumeSnapshotterGetter VolumeSnapshotterGetter, ) error FinalizeBackup( log logrus.FieldLogger, backupRequest *Request, inBackupFile io.Reader, outBackupFile io.Writer, backupItemActionResolver framework.BackupItemActionResolverV2, asyncBIAOperations []*itemoperation.BackupOperation, backupStore persistence.BackupStore, ) error }
Backupper performs backups.
func NewKubernetesBackupper ¶
func NewKubernetesBackupper( kbClient kbclient.Client, discoveryHelper discovery.Helper, dynamicFactory client.DynamicFactory, podCommandExecutor podexec.PodCommandExecutor, podVolumeBackupperFactory podvolume.BackupperFactory, podVolumeTimeout time.Duration, defaultVolumesToFsBackup bool, clientPageSize int, uploaderType string, pluginManager func(logrus.FieldLogger) clientmgmt.Manager, backupStoreGetter persistence.ObjectBackupStoreGetter, ) (Backupper, error)
NewKubernetesBackupper creates a new kubernetesBackupper.
type FileForArchive ¶
type PVSkipReason ¶
type Request ¶
type Request struct { *velerov1api.Backup StorageLocation *velerov1api.BackupStorageLocation SnapshotLocations []*velerov1api.VolumeSnapshotLocation NamespaceIncludesExcludes *collections.IncludesExcludes ResourceIncludesExcludes collections.IncludesExcludesInterface ResourceHooks []hook.ResourceHook ResolvedActions []framework.BackupItemResolvedActionV2 ResolvedItemBlockActions []framework.ItemBlockResolvedAction VolumeSnapshots []*volume.Snapshot PodVolumeBackups []*velerov1api.PodVolumeBackup BackedUpItems *backedUpItemsMap ResPolicies *resourcepolicies.Policies SkippedPVTracker *skipPVTracker VolumesInformation volume.BackupVolumesInformation // contains filtered or unexported fields }
Request is a request for a backup, with all references to other objects materialized (e.g. backup/snapshot locations, includes/excludes, etc.)
func (*Request) BackupResourceList ¶
BackupResourceList returns the list of backed up resources grouped by the API Version and Kind
func (*Request) FillVolumesInformation ¶
func (r *Request) FillVolumesInformation()
func (*Request) GetItemOperationsList ¶
func (r *Request) GetItemOperationsList() *[]*itemoperation.BackupOperation
GetItemOperationsList returns ItemOperationsList, initializing it if necessary
type SkippedPV ¶
type SkippedPV struct { Name string `json:"name"` Reasons []PVSkipReason `json:"reasons"` }
func (*SkippedPV) SerializeSkipReasons ¶
type VolumeSnapshotterGetter ¶
type VolumeSnapshotterGetter interface {
GetVolumeSnapshotter(name string) (vsv1.VolumeSnapshotter, error)
}