volumebinding: handle special delete event in AssumeCache

Sometimes an informer might not directly send the deleted object to the
OnDelete callback, but rather a DeletedFinalStateUnknown. The AssumeCache did
not handle that case.
This commit is contained in:
Patrick Ohly 2022-09-02 09:41:25 +02:00
parent baf6014e0c
commit c70203bda3

View File

@ -206,7 +206,7 @@ func (c *assumeCache) delete(obj interface{}) {
return
}
name, err := cache.MetaNamespaceKeyFunc(obj)
name, err := cache.DeletionHandlingMetaNamespaceKeyFunc(obj)
if err != nil {
klog.ErrorS(&errObjectName{err}, "Failed to delete")
return