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 priority class values to be updated. #99205
Comments
@ravisantoshgudimetla: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The 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. |
I don't see how in-cluster guards around PriorityClass manipulation can have any bearing on whether Pod specs are portable between clusters. An admin could set up an admission webhook or RBAC that blocks the removal of a set of well-known PriorityClass names to ensure that Pods consuming those names are portable, but that's not something you can build into a cluster by default outside of a few, baked-in
This sounds like an argument for allowing And my main concern over delete/recreate isn't "might accidentally delete or recreate the wrong PriorityClass" as much as the following flow:
By comparison, an in-place |
I agree with Ravi on the 3rd point, allowing updates directly is safer and in my opinion the more expected outcome. In other words, right now if I deleted and recreated a priority class the average user would probably just expect pods using that priority class to use the new value, which is not the case. |
I think it's important to manage this expectation via godocs on |
What will ensure all pods with old value of priority class will get eventually recreated? Keeping some portion of pods with old priority and the rest with a new one might e.g. make descheduler stop/start evicting pods which were/were not supposed to be evicted. |
What needs to be properly documented is that changing the priority value of a priority class doesn't change the priority of running or pending pods. This has implications for unscheduled pods, but more importantly for eviction by kubelet. I don't think this requires a KEP, but definitely an API review and a notice to sig node. |
cc @Huang-Wei |
Given that we don't change the semantics that how a recreated/updated PriorityClass impacts existing/upcoming pods, this proposal looks good to me. Just one concern: 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. |
I agree and this is concern I share too. If all of us agree on the above approach, I can send a notice to kubernetes-dev/ & sig-scheduling mailing list and get feedback. We can also go with the approach of having a feature flag and disable this feature before making it a default choice. |
Sounds like starting a KEP is the best next step |
I am fine opening a KEP. I hope it is general consensus. |
cc @ahg-g |
@liggitt - A question for you, would it be ok to |
Allowing a previously immutable value to be mutable can be reasonable as long as the things consuming that value are well understood and react to changes correctly. IIUC, about the only in-tree actor that makes use of this value is the admission plugin, which pulls from an informer, so would use the value for future pods, right? |
That is correct, the priority admission plugin intercepts the pod creation request and translates priority class to priority value. For the pods that are already running, the priority value would still point to old one, say if priority value has been modified or the priority class has been deleted and re-created. |
It sounds like you could proceed. I would still advice a KEP, because of the production readiness questionnaire and to have the change properly documented. Note that this means that you would have to do this next release, as enhancements freeze already happened. Unless people think a KEP is an overkill for this. |
I think KEP may be an overkill considering we were doing the same with deletion and re-creation pattern but I think it atleast warrants an e-mail to devel community and docs update. |
This is changing a stable API, so PRR and a proper documentation is in place, imo. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
@ravisantoshgudimetla do you plan to work on a KEP for this for 1.23? |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-contributor-experience at kubernetes/community. |
/reopen |
@denkensk: Reopened this issue. 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. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. This bot triages issues and 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 issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /close |
@k8s-triage-robot: Closing this issue. 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. |
Hi, for now, is it still not able to use |
Correct. There are not enough contributors to work on this. |
/reopen |
@denkensk: Reopened this issue. 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. |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/help |
@alculquicondor: GuidelinesPlease ensure that the issue body includes answers to the following questions:
For more details on the requirements of such an issue, please see here and ensure that they are met. If this request no longer meets these requirements, the label can be removed 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. |
/lifecycle stale |
I want to help fix it |
What would you like to be added:
I wish to revisit the topic of priority classes being immutable. We made priority classes immutable so that once a priority class is created, we will not be able to update the name or value because of the following reasons:
While I agree with the first 2 points on changing priority class names, I feel that 3rd point of changing priority class values can be re-visited, considering we noticed a lot of people are anyways deleting and re-creating priority classes just to update the value and the updated priority class value is not reflected for existing pods.
Why is this needed:
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 value update.
Ref: https://stupefied-goodall-e282f7.netlify.app/contributors/design-proposals/scheduling/pod-priority-api/#modifying-priority-classes
/sig scheduling
The text was updated successfully, but these errors were encountered: