mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 04:55:22 +00:00
Add warning message for volume snapshotter in data mover case.
Signed-off-by: Xun Jiang <jxun@vmware.com>
This commit is contained in:
1
changelogs/unreleased/6377-blackpiglet
Normal file
1
changelogs/unreleased/6377-blackpiglet
Normal file
@@ -0,0 +1 @@
|
||||
Add warning message for volume snapshotter in data mover case.
|
||||
@@ -480,6 +480,13 @@ func (ib *itemBackupper) takePVSnapshot(obj runtime.Unstructured, log logrus.Fie
|
||||
return nil
|
||||
}
|
||||
|
||||
// TODO: Snapshot data mover is only supported for CSI plugin scenario by now.
|
||||
// Need to add a mechanism to choose running which plugin for resources.
|
||||
// After that, this warning can be removed.
|
||||
if boolptr.IsSetToTrue(ib.backupRequest.Spec.SnapshotMoveData) {
|
||||
log.Warnf("VolumeSnapshotter plugin doesn't support data movement.")
|
||||
}
|
||||
|
||||
if ib.backupRequest.ResPolicies != nil {
|
||||
if action, err := ib.backupRequest.ResPolicies.GetMatchAction(pv); err != nil {
|
||||
log.WithError(err).Errorf("Error getting matched resource policies for pv %s", pv.Name)
|
||||
|
||||
@@ -27,7 +27,7 @@ type VolumeSnapshotClassBuilder struct {
|
||||
}
|
||||
|
||||
// ForVolumeSnapshotClass is the constructor of VolumeSnapshotClassBuilder.
|
||||
func (b *VolumeSnapshotClassBuilder) ForVolumeSnapshotClass(name string) *VolumeSnapshotClassBuilder {
|
||||
func ForVolumeSnapshotClass(name string) *VolumeSnapshotClassBuilder {
|
||||
return &VolumeSnapshotClassBuilder{
|
||||
object: &snapshotv1api.VolumeSnapshotClass{
|
||||
TypeMeta: metav1.TypeMeta{
|
||||
|
||||
Reference in New Issue
Block a user