Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Finalizers from other controllers conflicting with kopf finalizer #1107

Open
mkjpryor opened this issue Feb 20, 2024 · 0 comments
Open

Finalizers from other controllers conflicting with kopf finalizer #1107

mkjpryor opened this issue Feb 20, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mkjpryor
Copy link

mkjpryor commented Feb 20, 2024

Long story short

I have been chasing down a frustrating bug that I think might be down to the way that kopf applies its finalizer.

I have a number of custom operators based on kopf, and it is great. However I have some common cleanup functionality that I need to apply to a number of CRDs - some from my kopf operators and some from third-party operators written using the Go SDK.

In order to avoid replicating code in all my operators, and possibly having to implement changes in third-party operators, I have written a generic operator, again using kopf, that adds an additional finalizer to the objects that is removed once the cleanup is done. This operator uses exclusively kopf.on.event handlers, with changes made by a Kubernetes client outside of kopf's remit.

This is working perfectly for the third-party operators that use the Go SDK. However with the kopf-based operators I am seeing my generic operator fighting with kopf as to which finalizers are present - the kopf finalizer comes and goes from the object, and in particular does not seem to be present at some critical times such as when the object is deleted.

Is this expected behaviour? If not, is there something better I can do?

Kopf version

1.37.1

Kubernetes version

1.29

Python version

3.10

Code

No response

Logs

No response

Additional information

No response

@mkjpryor mkjpryor added the bug Something isn't working label Feb 20, 2024
@mkjpryor mkjpryor changed the title Custom finalizers from other controllers conflicting with kopf finalizer Finalizers from other controllers conflicting with kopf finalizer Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant