Open
Description
Today our controllers are implemented like this:
- if object has no deletionTimestamp
- => Ensure finalizer is set
- else
- => execute "reconcileDelete" (remove finalizer at the end of reconcileDelete)
In later reconciles we continue to run "reconcileDelete" even if the finalizer is not set anymore.
I wonder if this should be changed to only execute reconcileDelete as long as the finalizer is on the object.
Pro: always running reconcileDelete:
- reconcileDelete code will always make sure everything is deleted even if the finalizer is not set (but this also means that the object could be removed from etcd in the middle of reconcileDelete)
Pro: running reconcileDelete only when finalizer is set:
- reconcileDelete will only be executed until the finalizer has been removed
- Example: Machine deletion will stop executing reconcileDelete as soon as it completed successfully once (so we stop continuously trying to drain Pods, waiting for volume detach , ...)