pb-2020: Added check in assigning SnapshotStorageClass in dataexport CR
- Assigng the SnapshotStorageClass in DE CR only when
LocalSnapshotRestore is true, in which case, we will try the
local snapshot restore.
@@ -676,7 +676,9 @@ func (k *kdmp) StartRestore(
dataExport.Status.RestorePVC = pvc
dataExport.Status.LocalSnapshotRestore = k.doLocalRestore(restore, bkpvInfo)
dataExport.Spec.Type = kdmpapi.DataExportKopia
+ if dataExport.Status.LocalSnapshotRestore {
dataExport.Spec.SnapshotStorageClass = getVolumeSnapshotClassFromBackupVolumeInfo(bkpvInfo)
+ }
dataExport.Spec.Source = kdmpapi.DataExportObjectReference{
Kind: reflect.TypeOf(kdmpapi.VolumeBackup{}).Name(),
Name: volBackup.Name,
