@@ -680,6 +680,10 @@ func GetDynamicSnapshotContentNameForGroupSnapshot(groupSnapshot *crdv1beta1.Vol
680
680
// If the VolumeSnapshotContent object still contains other changes after this sanitization, the changes
681
681
// are potentially meaningful and the object is enqueued to be considered for syncing
682
682
func ShouldEnqueueContentChange (old * crdv1.VolumeSnapshotContent , new * crdv1.VolumeSnapshotContent ) bool {
683
+ // Always enqueue resyncs, which show up as an update with no change (thus no new version)
684
+ if old .ResourceVersion == new .ResourceVersion {
685
+ return true
686
+ }
683
687
sanitized := new .DeepCopy ()
684
688
// ResourceVersion always changes between revisions
685
689
sanitized .ResourceVersion = old .ResourceVersion
@@ -693,7 +697,7 @@ func ShouldEnqueueContentChange(old *crdv1.VolumeSnapshotContent, new *crdv1.Vol
693
697
if sanitized .Annotations == nil {
694
698
sanitized .Annotations = map [string ]string {}
695
699
}
696
- for annotation , _ := range sidecarControlledContentAnnotations {
700
+ for annotation := range sidecarControlledContentAnnotations {
697
701
if value , ok := old .Annotations [annotation ]; ok {
698
702
sanitized .Annotations [annotation ] = value
699
703
} else {
@@ -702,7 +706,7 @@ func ShouldEnqueueContentChange(old *crdv1.VolumeSnapshotContent, new *crdv1.Vol
702
706
}
703
707
} else {
704
708
// Old content has no annotations, so delete any sidecar-controlled annotations present on the new content
705
- for annotation , _ := range sidecarControlledContentAnnotations {
709
+ for annotation := range sidecarControlledContentAnnotations {
706
710
delete (sanitized .Annotations , annotation )
707
711
}
708
712
}
0 commit comments