Skip to content

Commit 2ff1ad5

Browse files
sseagoopenshift-cherrypick-robot
authored andcommitted
error out if no pvc for volume
1 parent 0f8814d commit 2ff1ad5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/uploader/run.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,8 @@ func updateVMIndex(
329329
if f.DiskName != "" {
330330
pvcName := volumeMap[f.DiskName]
331331
if pvcName == "" {
332-
pvcName = f.DiskName
332+
// Erroring out if there's a non-PVC volume
333+
return fmt.Errorf("no PVC found for %s", f.DiskName)
333334
}
334335
pvcNames = append(pvcNames, pvcName)
335336
pvc := &corev1.PersistentVolumeClaim{}

0 commit comments

Comments
 (0)