Documentation ¶
Index ¶
- Constants
- func CreateRestorePVCDef(restorePVCName string, volumeSnapshot *vsv1.VolumeSnapshot, ...) (*corev1.PersistentVolumeClaim, error)
- func CreateRestorePVCDefFromVMRestore(vmRestoreName, restorePVCName string, volumeSnapshot *vsv1.VolumeSnapshot, ...) (*corev1.PersistentVolumeClaim, error)
- func GetSnapshotContents(vmSnapshot *snapshotv1.VirtualMachineSnapshot, client kubecli.KubevirtClient) (*snapshotv1.VirtualMachineSnapshotContent, error)
- func GetVMSnapshotContentName(vmSnapshot *snapshotv1.VirtualMachineSnapshot) string
- func VmRestoreProgressing(vmRestore *snapshotv1.VirtualMachineRestore) bool
- func VmSnapshotReady(vmSnapshot *snapshotv1.VirtualMachineSnapshot) bool
- type VMRestoreController
- type VMSnapshotController
- type VolumeSnapshotProvider
Constants ¶
View Source
const (
RestoreNameAnnotation = "restore.kubevirt.io/name"
)
Variables ¶
This section is empty.
Functions ¶
func CreateRestorePVCDef ¶
func CreateRestorePVCDef(restorePVCName string, volumeSnapshot *vsv1.VolumeSnapshot, volumeBackup *snapshotv1.VolumeBackup) (*corev1.PersistentVolumeClaim, error)
func CreateRestorePVCDefFromVMRestore ¶
func CreateRestorePVCDefFromVMRestore(vmRestoreName, restorePVCName string, volumeSnapshot *vsv1.VolumeSnapshot, volumeBackup *snapshotv1.VolumeBackup, sourceVmName, sourceVmNamespace string) (*corev1.PersistentVolumeClaim, error)
func GetSnapshotContents ¶ added in v0.59.0
func GetSnapshotContents(vmSnapshot *snapshotv1.VirtualMachineSnapshot, client kubecli.KubevirtClient) (*snapshotv1.VirtualMachineSnapshotContent, error)
func GetVMSnapshotContentName ¶ added in v0.59.0
func GetVMSnapshotContentName(vmSnapshot *snapshotv1.VirtualMachineSnapshot) string
func VmRestoreProgressing ¶
func VmRestoreProgressing(vmRestore *snapshotv1.VirtualMachineRestore) bool
func VmSnapshotReady ¶
func VmSnapshotReady(vmSnapshot *snapshotv1.VirtualMachineSnapshot) bool
Types ¶
type VMRestoreController ¶
type VMRestoreController struct { Client kubecli.KubevirtClient VMRestoreInformer cache.SharedIndexInformer VMSnapshotInformer cache.SharedIndexInformer VMSnapshotContentInformer cache.SharedIndexInformer VMInformer cache.SharedIndexInformer VMIInformer cache.SharedIndexInformer DataVolumeInformer cache.SharedIndexInformer PVCInformer cache.SharedIndexInformer StorageClassInformer cache.SharedIndexInformer CRInformer cache.SharedIndexInformer VolumeSnapshotProvider VolumeSnapshotProvider Recorder record.EventRecorder VMRestoreStatusUpdater *status.VMRestoreStatusUpdater // contains filtered or unexported fields }
VMRestoreController is resonsible for restoring VMs
func (*VMRestoreController) Init ¶
func (ctrl *VMRestoreController) Init() error
Init initializes the restore controller
func (*VMRestoreController) Run ¶
func (ctrl *VMRestoreController) Run(threadiness int, stopCh <-chan struct{}) error
Run the controller
type VMSnapshotController ¶
type VMSnapshotController struct { Client kubecli.KubevirtClient VMSnapshotInformer cache.SharedIndexInformer VMSnapshotContentInformer cache.SharedIndexInformer VMInformer cache.SharedIndexInformer VMIInformer cache.SharedIndexInformer StorageClassInformer cache.SharedIndexInformer PVCInformer cache.SharedIndexInformer CRDInformer cache.SharedIndexInformer PodInformer cache.SharedIndexInformer DVInformer cache.SharedIndexInformer CRInformer cache.SharedIndexInformer Recorder record.EventRecorder ResyncPeriod time.Duration // contains filtered or unexported fields }
VMSnapshotController is resonsible for snapshotting VMs
func (*VMSnapshotController) GetVolumeSnapshot ¶
func (ctrl *VMSnapshotController) GetVolumeSnapshot(namespace, name string) (*vsv1.VolumeSnapshot, error)
func (*VMSnapshotController) Init ¶
func (ctrl *VMSnapshotController) Init() error
Init initializes the snapshot controller
func (*VMSnapshotController) Run ¶
func (ctrl *VMSnapshotController) Run(threadiness int, stopCh <-chan struct{}) error
Run the controller
type VolumeSnapshotProvider ¶
type VolumeSnapshotProvider interface {
GetVolumeSnapshot(string, string) (*vsv1.VolumeSnapshot, error)
}
Click to show internal directories.
Click to hide internal directories.