-
Notifications
You must be signed in to change notification settings - Fork 40k
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 Namespace Termination #6246
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/. If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits. Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name. |
d2c7afe
to
bb4bc3b
Compare
Assigning @smarterclayton, feel free to reassign. |
@smarterclayton - i will ping to review this PR, want to add a little more testing. |
K, was about to ask for that |
bb4bc3b
to
275f459
Compare
@smarterclayton - this should be good to go now functionally, i added an extra validation test with mutiple finalizers... if we want to unblock the bug, we can merge this now, and i will follow-up tomorrow with more testing to ensure no future regression. |
oldNamespace.Spec.Finalizers = namespace.Spec.Finalizers | ||
|
||
oldNamespace.Labels = namespace.Labels | ||
oldNamespace.Annotations = namespace.Annotations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is what happens when you are rushing to fix something before leaving work ;-)
cleaning this up more this morning and getting more tests for various strategies.
275f459
to
b745f51
Compare
@smarterclayton - added tests for each of the strategies that they are doing the right thing, and fixed where we had flipped old and new on validateNamespaceUpdate call. |
LGTM |
Fix Namespace Termination
There was a regression as part of the PrepareForUpdate changes that prevented deletion of a namespace because the list of finalizers was never being reduced because we were always taking the input from the client and overriding it with the old value from the server.
This change fixes the following:
/cc @smarterclayton