pb-2125: Added check for nil SC in getRestorePVCs
@@ -518,9 +518,11 @@ func (k *kdmp) getRestorePVCs(
// default storageclass configured on the cluster.
// Default storage class will not selected, if the storageclass
// is empty. So setting it to nil.
+ if pvc.Spec.StorageClassName != nil {
if len(*pvc.Spec.StorageClassName) == 0 {
pvc.Spec.StorageClassName = nil
}
+ }
pvc.Spec.VolumeName = ""
if pvc.Annotations != nil {
delete(pvc.Annotations, bindCompletedKey)
