Skip to content

Finalizers behavior on Exception #226

Answered by erin-allison
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

I don't have anything set up right now to properly test this, but from digging through the code, I am relatively confident that the event will be re-queued and your finalizer will be called again.

Based on the logic in FinalizerManager<TEntity>, we can see that if any of your registered IResourceFinalizer<TEntity> instances throw an exception, they will not be removed from the resource, continuing to block deletion.

https://github.com/buehler/dotnet-operator-sdk/blob/02bb7ecd4309cd26ec4b3cdd60b40584fd633b94/src/KubeOps/Operator/Finalizer/FinalizerManager%7BTEntity%7D.cs#L83-L91

Tracing up the call stack to ManagedResourceController<TEntity>, we can see WatcherEvents has logic specifically…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@buehler
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants