diff --git a/pkg/kube_events_manager/resource_informer.go b/pkg/kube_events_manager/resource_informer.go index 2c174f51..4fa17722 100644 --- a/pkg/kube_events_manager/resource_informer.go +++ b/pkg/kube_events_manager/resource_informer.go @@ -324,10 +324,9 @@ func (ei *resourceInformer) HandleWatchEvent(oldObject, object interface{}, even if !ei.Monitor.KeepFullObjectsInMemory { objFilterRes.RemoveFullObject() - } else if ei.Monitor.KeepFullObjectsInMemory { - if oldObj != nil { - objFilterRes.OldObject = oldObj - } + } else if oldObj != nil { + objFilterRes.OldObject = oldObj + } } // Do not fire Added or Modified if object is in cache and its checksum is equal to the newChecksum.