Resource deletion - no requeue? #1731
-
Hi, I would like to ask for some help in understanding how the deletion event being processed by the controller. It seems that the resource gets removed from the cache on deletion event, and later passed to reconcile. But it doesn't seem that requeue on deletion event would work - there is nothing to fetch from the cache at this point? Is my understanding correct? Shouldn't this behavior be changed to delete resource after successful reconcile? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Yeah, this is correct. If you want to correctly handle deletes, you need finalizers. Otherwise you have no guarantee that you get a delete event. Internally, we don't pass the full event around, just the |
Beta Was this translation helpful? Give feedback.
Yeah, this is correct. If you want to correctly handle deletes, you need finalizers. Otherwise you have no guarantee that you get a delete event.
Internally, we don't pass the full event around, just the
ObjectRef
(possibly mapped from a related object via a mapper / owner refs), so if the object is gone, it is gone. It's perhaps a bit awkward that we do bubble this up as an error, but you can match on this case;Error::ObjectNotFound
(emitted via applier part) in yourerror_policy
if it's expected or something you can handle out-of-bound.