-
Notifications
You must be signed in to change notification settings - Fork 39.7k
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
Update v1.Taint parser to accept the form key:effect
and key=:effect-
#74159
Update v1.Taint parser to accept the form key:effect
and key=:effect-
#74159
Conversation
/sig scheduling |
/cc @kubernetes/sig-scheduling-bugs |
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.
thanks @dlipovetsky
/priority important-longterm
could you please add a user facing release note instead of NONE? e.g.
Support parsing v1.Taint forms such as xx, yy
2899f57
to
ce41194
Compare
Thanks @neolit123! Added release note. |
72fc753
to
ef0c768
Compare
I added two new invalid spec tests and fixed a bug in the updated parser. (I also verified that the original parser passed these new tests) |
Once the changes to |
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.
LGTM for the pkg/util/taints/ part.
LGTM for |
Thanks @kevin-wangzefeng and @Huang-Wei. After I updated
I did not realize that
This use case was introduced in #30590. To be backward compatible, this PR should not break this use case. There was no test in
|
The last commit passes the tests in I have changed |
I'm fine with it. Empty/null value and effect should not block parsing, though taints with only keys indicated should not be used for creating. |
I reviewed and it looks fine. I have only a few minor comments. If @dlipovetsky addresses them sooner, we can get it merged. |
@bsalamat Thanks a lot for your review. My apologies for taking a while to address your comments. I address them using separate commits for the code in |
I also added a test to verify that the empty string is an invalid Taint spec. |
Test failed due to known flake, see #74931 /retest |
Thanks, @dlipovetsky! Looks good. Could you please squash commits? /lgtm |
I updated the release note. Please check it. |
… and `key-` forms Also add missing tests for `key=:value` form.
- Explain that the value is optional. - Add example of adding a taint with no value to kubectl taint usage.
3402228
to
ab6d901
Compare
@bsalamat Squashed. As for the release note, I'm not sure it needs to mention the |
@dlipovetsky Thanks again. I fixed the release notes. /lgtm |
@liggitt Back to you for approval. |
/assign @liggitt (So that this PR shows up in your dashboard 😄) |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bsalamat, dlipovetsky, liggitt The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@ravisantoshgudimetla Please cancel the hold. Thanks! |
/hold cancel Done @dlipovetsky. Thanks for working on this PR. |
/retest Review the full test history for this PR. Silence the bot with an |
2 similar comments
/retest Review the full test history for this PR. Silence the bot with an |
/retest Review the full test history for this PR. Silence the bot with an |
/kind bug
What this PR does / why we need it:
Updates v1.Taint parser to accept the form
key:effect
, which is the string representation of a v1.Taint that has a nil Value (the empty string).Also updates the parser to accept the form
key=:effect-
, sincekey=:effect
is a valid string representation of a v1.Taint with a nil Value.pkg/util/taints/
pkg/kubectl/cmd/taint/
kubectl taint
usageWhich issue(s) this PR fixes:
Fixes #73249
Does this PR introduce a user-facing change?:
/cc @liggitt