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

fix(finalizer): patch finalizers instead of apply #155

Merged

Conversation

itamar-marom
Copy link
Collaborator

Description

Fixes #154

When applying the finalizers, the object generation version is bumped. We don't want that so we're patching the finalizers.


This PR has:

  • been tested on a real K8S cluster to ensure creation of a brand new Druid cluster works.
  • been tested for backward compatibility on a real K*S cluster by applying the changes introduced here on an existing Druid cluster. If there are any backward incompatible changes then they have been noted in the PR description.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added documentation for new or modified features or behaviors.

Key changed/added files in this PR
  • controllers/druid/finalizers.go

When applying the finalizers, the object generation version is bumped. We don't want that so we're patching the finalizers.
Copy link
Contributor

@AdheipSingh AdheipSingh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM , is this tested ?
can we confirm if the bump din't go.

@itamar-marom
Copy link
Collaborator Author

Yes. If you want to feel more confident you can just spawn a kind cluster and create the tiny-cluster.
In the old code you will see generation 2, in the new code you will see generation 1

@AdheipSingh
Copy link
Contributor

@itamar-marom nah man , i trust you !

@AdheipSingh AdheipSingh merged commit b197f03 into datainfrahq:master Apr 17, 2024
1 check passed
dave-mccowan pushed a commit to dave-mccowan/druid-operator that referenced this pull request Apr 20, 2024
When applying the finalizers, the object generation version is bumped. We don't want that so we're patching the finalizers.
@itamar-marom itamar-marom deleted the fix/druid-finalizer-generation branch April 20, 2024 10:36
dave-mccowan pushed a commit to dave-mccowan/druid-operator that referenced this pull request Apr 21, 2024
When applying the finalizers, the object generation version is bumped. We don't want that so we're patching the finalizers.
dave-mccowan pushed a commit to dave-mccowan/druid-operator that referenced this pull request May 3, 2024
When applying the finalizers, the object generation version is bumped. We don't want that so we're patching the finalizers.
AdheipSingh pushed a commit that referenced this pull request May 4, 2024
When applying the finalizers, the object generation version is bumped. We don't want that so we're patching the finalizers.

Co-authored-by: Itamar Marom <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updates to CR Wrongly Bumps Generation Field
2 participants