-
Notifications
You must be signed in to change notification settings - Fork 38.9k
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
Refactor kubectl scale
to patch scale subresource
#81342
Refactor kubectl scale
to patch scale subresource
#81342
Conversation
Hi @knight42. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
9a7e23d
to
7d86c21
Compare
/assign @smarterclayton |
@seans3 @smarterclayton all tests passed now, PTAL |
/uncc |
/cc @apelisse for more context |
5147a8b
to
66d8056
Compare
/retest |
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.
Few style nits, but otherwise looks good. Feel free to fix or not
/lgtm
/approve
/hold
66d8056
to
92c4c2e
Compare
@apelisse all fixed now |
Thanks, I think it looks much better this way, |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: apelisse, knight42, smarterclayton 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 |
@apelisse @smarterclayton would you mind unholding this PR? |
/hold cancel |
…cale Refactor `kubectl scale` to patch scale subresource Kubernetes-commit: f81ab5a
What type of PR is this?
/kind feature
What this PR does / why we need it:
Currently
kubectl scale
would send a PUT request withoutResourceVersion
, which is introduced in #75210, and because of that custom resource cannot be scaled since custom resource could not be updated unconditionally.Considered that PUT without resource version is not a best practice and we are not willing to do a GET before the request, so I choose to update kubectl to use PATCH instead of PUT.
Which issue(s) this PR fixes:
Part of #80515
Special notes for your reviewer:
Although I have created another PR to fix the problem, which requires changes on apiserver, the apiserver would not be updated as frequently as kubectl in reality, so it may be best to update both apiserver(make old kubectls work) and kubectl.
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: