Skip to content

Commit b083a50

Browse files
committed
wip
Signed-off-by: Daniil Loktev <[email protected]>
1 parent f6b27e6 commit b083a50

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

images/virtualization-artifact/pkg/controller/vd/internal/source/step/create_pvc_from_vdsnapshot_step.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,13 @@ func (s CreatePVCFromVDSnapshotStep) validateStorageClassCompatibility(ctx conte
255255
return fmt.Errorf("cannot fetch target storage class %q: %w", targetSCName, err)
256256
}
257257

258-
pvcName := *vs.Spec.Source.PersistentVolumeClaimName
259-
if pvcName == "" {
258+
if vs.Spec.Source.PersistentVolumeClaimName == nil || *vs.Spec.Source.PersistentVolumeClaimName == "" {
260259
// Can't determine original PVC, skip validation
261260
return nil
262261
}
263262

263+
pvcName := *vs.Spec.Source.PersistentVolumeClaimName
264+
264265
var originalPVC corev1.PersistentVolumeClaim
265266
err = s.client.Get(ctx, types.NamespacedName{Name: pvcName, Namespace: vdSnapshot.Namespace}, &originalPVC)
266267
if err != nil {
80.4 MB
Binary file not shown.

0 commit comments

Comments
 (0)