Skip to content

Commit 6637d4e

Browse files
authored
Merge pull request #1224 from leonardoce/annotation-missing
Add the group snapshot bound finalizer when deletionPolicy is set to Retain
2 parents b79aef9 + e81beb3 commit 6637d4e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pkg/common-controller/groupsnapshot_controller_helper.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1315,9 +1315,8 @@ func (ctrl *csiSnapshotCommonController) checkandAddGroupSnapshotFinalizers(grou
13151315
// A bound finalizer is needed ONLY when all following conditions are satisfied:
13161316
// 1. the VolumeGroupSnapshot is bound to a VolumeGroupSnapshotContent
13171317
// 2. the VolumeGroupSnapshot does not have deletion timestamp set
1318-
// 3. the matching VolumeGroupSnapshotContent has a deletion policy to be Delete
13191318
// Note that if a matching VolumeGroupSnapshotContent is found, it must point back to the VolumeGroupSnapshot
1320-
if groupSnapshotContent != nil && utils.NeedToAddGroupSnapshotBoundFinalizer(groupSnapshot) && (groupSnapshotContent.Spec.DeletionPolicy == crdv1.VolumeSnapshotContentDelete) {
1319+
if groupSnapshotContent != nil && utils.NeedToAddGroupSnapshotBoundFinalizer(groupSnapshot) {
13211320
// Snapshot is not being deleted -> it should have the finalizer.
13221321
klog.V(5).Infof("checkandAddGroupSnapshotFinalizers: Add Finalizer for VolumeGroupSnapshot[%s]", utils.GroupSnapshotKey(groupSnapshot))
13231322
return ctrl.addGroupSnapshotFinalizer(groupSnapshot, true)

0 commit comments

Comments
 (0)