Skip to content

Commit

Permalink
Do not add PVC BlockOwnerDeletion on DV GC
Browse files Browse the repository at this point in the history
Signed-off-by: Arnon Gilboa <agilboa@redhat.com>
  • Loading branch information
arnongilboa committed Aug 30, 2022
1 parent 7b7ca5f commit b29d5fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/controller/datavolume-controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2830,6 +2830,9 @@ func updatePvcOwnerRefs(pvc *corev1.PersistentVolumeClaim, dv *cdiv1.DataVolume)
break
}
}
for i := range dv.OwnerReferences {
dv.OwnerReferences[i].BlockOwnerDeletion = nil
}
pvc.OwnerReferences = append(pvc.OwnerReferences, dv.OwnerReferences...)
}

Expand Down

0 comments on commit b29d5fe

Please sign in to comment.