-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Allow mutating priority classes #4129
Conversation
You are the author of this proposal, could you help review or give some suggestions? |
/assign @alculquicondor |
you should start a new KEP |
c5873ef
to
81ed9ad
Compare
53aefa8
to
da8c5e0
Compare
da8c5e0
to
1185c19
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wackxu The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
1185c19
to
4857d68
Compare
Signed-off-by: wackxu <xushiwei5@huawei.com>
4857d68
to
c2a5194
Compare
Done, /assign @Huang-Wei @kerthcet |
Hi @alculquicondor @Huang-Wei @ahg-g Could you take a look at this? Since It is a small change to loose the validation of priority class |
/assign |
/unassign |
At present, we cannot update the priorityClass value directly. This enhancement proposes | ||
to relax update validation on priorityClass and make priorityClass value to be mutable. |
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.
At present, we cannot update the priorityClass value directly. This enhancement proposes | |
to relax update validation on priorityClass and make priorityClass value to be mutable. | |
This enhancement proposes to make PriorityClass's `value` field mutable. |
|
||
## Motivation | ||
|
||
We'd like priority classes value to be mutable going from release 1.29 because of we're technically achieving the |
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.
Avoid mentioning release info here. That's part of the metadata file (kep.yaml).
same effect with re-creation. Reasons for making priority classes immutable are mentioned in this | ||
[proposal](https://github.com/kubernetes/design-proposals-archive/blob/main/scheduling/pod-priority-api.md#drawbacks-of-changing-priority-classes). | ||
But we noticed that people are anyways deleting/creating priority classes despite the reasons mentioned above. | ||
While the deletion and re-creation seems like lesser of both the evils, our experience says that the deletion |
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.
In a motivation section, I think you should elaborate why recreating PriorityClass is necessary here, like what's radical problems end-users stomped on and they have to recreate.
Only by clarifying the fundamental use cases, we can know whether making PC's value field mutable is the right approach. Maybe PC is not the problem realm.
But we noticed that people are anyways deleting/creating priority classes despite the reasons mentioned above. | ||
While the deletion and re-creation seems like lesser of both the evils, our experience says that the deletion | ||
and re-creation of priority classes is more dangerous and error prone, considering people might delete another | ||
priority class, instead of doing just an update where an update can be rejected if there is a name mismatch or |
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.
I'm not sure I fully understand "re-creation of priority classes is more dangerous and error prone". Are you trying to say PC might be deleted by manual mistake like typo, while update is safer upon typo-ed PC name? If so, I don't think it's a strong motivation.
For some integrators (not default scheduler), they may rely on PriorityClass deletion to | ||
trigger some customized behavior (like recreating/updating pending pods). This proposal may get them impacted. | ||
|
||
## Design Details |
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.
I think some aspects need to illustrated:
- will PC's admission plugin's logic change? do pods carry pre-updated PC's value get populated after PC's update? if so, does it impact unschedulable pods only?
- is system/cluster reserved PC mutable? (although you gave a snippet, but it's always better illustrated it explicitly)
- clear document that other fields like
preemptionPolicy
is still immutable
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.
I think we need more work on this especially the use cases and motivations? 🤔
### Non-Goals | ||
|
||
- Allow mutating priorityClass other immutable filed like `PreemptionPolicy` | ||
- Change the priority of running or pending pods when changing the priority value of a priority class |
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.
Can you also sort out the risks to running pods with the changed priority. Maybe at the ### Risks and Mitigations
|
||
#### Story 1 | ||
|
||
As a cluster administrator, I wish I could directly adjust the priority class value instead of re-creation. |
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.
I'm not quite convinced by this use case because I hope we can have a real case here rather than just emphasizing that I want it. You can explain in which case you want to adjust the priority class directly and what we can benefit from it.
More stories is also welcomed.
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
|
||
## Summary | ||
|
||
At present, we cannot update the priorityClass value directly. This enhancement proposes |
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.
At present, we cannot update the priorityClass value directly. This enhancement proposes | |
At present, we cannot update the `value` of a PriorityClass directly. This enhancement proposes |
The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle rotten |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closed this PR. In response to this:
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. |
take over #2851 and Push this feature forward