Skip to content

Commit

Permalink
Check for Storage Class Present in Restore Cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
pallav-px committed Oct 23, 2023
1 parent 1701f8d commit a5267e6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/controllers/dataexport/reconcile.go
Original file line number Diff line number Diff line change
Expand Up @@ -1623,6 +1623,11 @@ func (c *Controller) restoreSnapshot(ctx context.Context, snapshotDriver snapsho
return nil, err
}

_, scErr := core.Instance().GetStorageClassForPVC(srcPvc)
if scErr != nil {
return nil, err
}

pvc := &corev1.PersistentVolumeClaim{
ObjectMeta: metav1.ObjectMeta{
Name: toSnapshotPVCName(srcPvc.Name, string(de.UID)),
Expand Down

0 comments on commit a5267e6

Please sign in to comment.