Documentation ¶
Index ¶
- func CleanupVolumeSnapshot(volSnap *snapshotv1api.VolumeSnapshot, crClient crclient.Client, ...)
- func DeleteVolumeSnapshot(vs snapshotv1api.VolumeSnapshot, vsc snapshotv1api.VolumeSnapshotContent, ...)
- func DeleteVolumeSnapshotContentIfAny(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, ...)
- func DeleteVolumeSnapshotIfAny(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, ...)
- func DiagnoseVS(vs *snapshotv1api.VolumeSnapshot) string
- func DiagnoseVSC(vsc *snapshotv1api.VolumeSnapshotContent) string
- func EnsureDeleteVS(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, ...) error
- func EnsureDeleteVSC(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, ...) error
- func GetVolumeSnapshotClass(provisioner string, backup *velerov1api.Backup, ...) (*snapshotv1api.VolumeSnapshotClass, error)
- func GetVolumeSnapshotClassForStorageClass(provisioner string, snapshotClasses *snapshotv1api.VolumeSnapshotClassList) (*snapshotv1api.VolumeSnapshotClass, error)
- func GetVolumeSnapshotClassFromBackupAnnotationsForDriver(backup *velerov1api.Backup, provisioner string, ...) (*snapshotv1api.VolumeSnapshotClass, error)
- func GetVolumeSnapshotClassFromPVCAnnotationsForDriver(pvc *corev1api.PersistentVolumeClaim, provisioner string, ...) (*snapshotv1api.VolumeSnapshotClass, error)
- func GetVolumeSnapshotContentForVolumeSnapshot(volSnap *snapshotv1api.VolumeSnapshot, ...) (*snapshotv1api.VolumeSnapshotContent, error)
- func IsVolumeSnapshotClassHasListerSecret(vc *snapshotv1api.VolumeSnapshotClass) bool
- func IsVolumeSnapshotContentHasDeleteSecret(vsc *snapshotv1api.VolumeSnapshotContent) bool
- func IsVolumeSnapshotExists(ns, name string, crClient crclient.Client) bool
- func RemoveVSCProtect(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, ...) error
- func RetainVSC(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, ...) (*snapshotv1api.VolumeSnapshotContent, error)
- func SetVolumeSnapshotContentDeletionPolicy(vscName string, crClient crclient.Client) error
- func ShouldSkipAction(actionName string) bool
- func WaitUntilVSCHandleIsReady(volSnap *snapshotv1api.VolumeSnapshot, crClient crclient.Client, ...) (*snapshotv1api.VolumeSnapshotContent, error)
- func WaitVolumeSnapshotReady(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, ...) (*snapshotv1api.VolumeSnapshot, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanupVolumeSnapshot ¶
func CleanupVolumeSnapshot( volSnap *snapshotv1api.VolumeSnapshot, crClient crclient.Client, log logrus.FieldLogger, )
func DeleteVolumeSnapshot ¶
func DeleteVolumeSnapshot( vs snapshotv1api.VolumeSnapshot, vsc snapshotv1api.VolumeSnapshotContent, backup *velerov1api.Backup, client crclient.Client, logger logrus.FieldLogger, )
DeleteVolumeSnapshot handles the VolumeSnapshot instance deletion.
func DeleteVolumeSnapshotContentIfAny ¶
func DeleteVolumeSnapshotContentIfAny( ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, vscName string, log logrus.FieldLogger, )
DeleteVolumeSnapshotContentIfAny deletes a VSC by name if it exists, and log an error when the deletion fails.
func DeleteVolumeSnapshotIfAny ¶
func DeleteVolumeSnapshotIfAny( ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, vsName string, vsNamespace string, log logrus.FieldLogger, )
DeleteVolumeSnapshotIfAny deletes a VS by name if it exists, and log an error when the deletion fails
func DiagnoseVS ¶
func DiagnoseVS(vs *snapshotv1api.VolumeSnapshot) string
func DiagnoseVSC ¶
func DiagnoseVSC(vsc *snapshotv1api.VolumeSnapshotContent) string
func EnsureDeleteVS ¶
func EnsureDeleteVS(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, vsName string, vsNamespace string, timeout time.Duration, ) error
EnsureDeleteVS asserts the existence of a VS by name, deletes it and waits for its disappearance and returns errors on any failure.
func EnsureDeleteVSC ¶
func EnsureDeleteVSC(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, vscName string, timeout time.Duration, ) error
EnsureDeleteVSC asserts the existence of a VSC by name, deletes it and waits for its disappearance and returns errors on any failure.
func GetVolumeSnapshotClass ¶
func GetVolumeSnapshotClass( provisioner string, backup *velerov1api.Backup, pvc *corev1api.PersistentVolumeClaim, log logrus.FieldLogger, crClient crclient.Client, ) (*snapshotv1api.VolumeSnapshotClass, error)
func GetVolumeSnapshotClassForStorageClass ¶
func GetVolumeSnapshotClassForStorageClass( provisioner string, snapshotClasses *snapshotv1api.VolumeSnapshotClassList, ) (*snapshotv1api.VolumeSnapshotClass, error)
GetVolumeSnapshotClassForStorageClass returns a VolumeSnapshotClass for the supplied volume provisioner/ driver name.
func GetVolumeSnapshotClassFromBackupAnnotationsForDriver ¶
func GetVolumeSnapshotClassFromBackupAnnotationsForDriver( backup *velerov1api.Backup, provisioner string, snapshotClasses *snapshotv1api.VolumeSnapshotClassList, ) (*snapshotv1api.VolumeSnapshotClass, error)
GetVolumeSnapshotClassFromAnnotationsForDriver returns a VolumeSnapshotClass for the supplied volume provisioner/driver name from the annotation of the backup.
func GetVolumeSnapshotClassFromPVCAnnotationsForDriver ¶
func GetVolumeSnapshotClassFromPVCAnnotationsForDriver( pvc *corev1api.PersistentVolumeClaim, provisioner string, snapshotClasses *snapshotv1api.VolumeSnapshotClassList, ) (*snapshotv1api.VolumeSnapshotClass, error)
func GetVolumeSnapshotContentForVolumeSnapshot ¶
func GetVolumeSnapshotContentForVolumeSnapshot( volSnap *snapshotv1api.VolumeSnapshot, snapshotClient snapshotter.SnapshotV1Interface, ) (*snapshotv1api.VolumeSnapshotContent, error)
GetVolumeSnapshotContentForVolumeSnapshot returns the VolumeSnapshotContent object associated with the VolumeSnapshot.
func IsVolumeSnapshotClassHasListerSecret ¶
func IsVolumeSnapshotClassHasListerSecret(vc *snapshotv1api.VolumeSnapshotClass) bool
IsVolumeSnapshotClassHasListerSecret returns whether a volumesnapshotclass has a snapshotlister secret
func IsVolumeSnapshotContentHasDeleteSecret ¶
func IsVolumeSnapshotContentHasDeleteSecret(vsc *snapshotv1api.VolumeSnapshotContent) bool
IsVolumeSnapshotContentHasDeleteSecret returns whether a volumesnapshotcontent has a deletesnapshot secret
func IsVolumeSnapshotExists ¶
IsVolumeSnapshotExists returns whether a specific volumesnapshot object exists.
func RemoveVSCProtect ¶
func RemoveVSCProtect(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, vscName string, timeout time.Duration) error
func RetainVSC ¶
func RetainVSC(ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, vsc *snapshotv1api.VolumeSnapshotContent, ) (*snapshotv1api.VolumeSnapshotContent, error)
RetainVSC updates the VSC's deletion policy to Retain and then return the update VSC
func ShouldSkipAction ¶
func WaitUntilVSCHandleIsReady ¶
func WaitUntilVSCHandleIsReady( volSnap *snapshotv1api.VolumeSnapshot, crClient crclient.Client, log logrus.FieldLogger, shouldWait bool, csiSnapshotTimeout time.Duration, ) (*snapshotv1api.VolumeSnapshotContent, error)
WaitUntilVSCHandleIsReady returns the VolumeSnapshotContent object associated with the volumesnapshot
func WaitVolumeSnapshotReady ¶
func WaitVolumeSnapshotReady( ctx context.Context, snapshotClient snapshotter.SnapshotV1Interface, volumeSnapshot string, volumeSnapshotNS string, timeout time.Duration, log logrus.FieldLogger, ) (*snapshotv1api.VolumeSnapshot, error)
WaitVolumeSnapshotReady waits a VS to become ready to use until the timeout reaches
Types ¶
This section is empty.