diff --git a/changelogs/unreleased/8261-msfrucht b/changelogs/unreleased/8261-msfrucht new file mode 100644 index 0000000000..dce88fc5e5 --- /dev/null +++ b/changelogs/unreleased/8261-msfrucht @@ -0,0 +1 @@ +Expose VSC SourceVolumeMode \ No newline at end of file diff --git a/pkg/exposer/csi_snapshot.go b/pkg/exposer/csi_snapshot.go index 4dcc50d129..908c2d9c68 100644 --- a/pkg/exposer/csi_snapshot.go +++ b/pkg/exposer/csi_snapshot.go @@ -368,6 +368,7 @@ func (e *csiSnapshotExposer) createBackupVSC(ctx context.Context, ownerObject co DeletionPolicy: snapshotv1api.VolumeSnapshotContentDelete, Driver: snapshotVSC.Spec.Driver, VolumeSnapshotClassName: snapshotVSC.Spec.VolumeSnapshotClassName, + SourceVolumeMode: snapshotVSC.Spec.SourceVolumeMode, }, } diff --git a/pkg/exposer/csi_snapshot_test.go b/pkg/exposer/csi_snapshot_test.go index 0cbe65ffb4..250aea6e55 100644 --- a/pkg/exposer/csi_snapshot_test.go +++ b/pkg/exposer/csi_snapshot_test.go @@ -522,6 +522,7 @@ func TestExpose(t *testing.T) { assert.Equal(t, expectedVSC.Spec.DeletionPolicy, vscObj.Spec.DeletionPolicy) assert.Equal(t, expectedVSC.Spec.Driver, vscObj.Spec.Driver) assert.Equal(t, *expectedVSC.Spec.VolumeSnapshotClassName, *vscObj.Spec.VolumeSnapshotClassName) + assert.Equal(t, *expectedVSC.Spec.SourceVolumeMode, *vscObj.Spec.SourceVolumeMode) if test.expectedVolumeSize != nil { assert.Equal(t, *test.expectedVolumeSize, backupPVC.Spec.Resources.Requests[corev1.ResourceStorage])