Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Propose binding priority and preemption #4993
base: master
Are you sure you want to change the base?
Propose binding priority and preemption #4993
Changes from all commits
0246005
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
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 guess we can present a complete design in this proposal, and notes, currently we only implement xxx.
I mean we can have a field
PriorityClassSource
, the valid options could beFederatedPriorityClass
,KubePriorityClass
,PodPriorityClass
, defaults toKubePriorityClass
.Note that, we might don't add this filed when implementing this feature at alpha maturity.
Another thing open for discussion is where the filed should be placed, under
spec.placement
orspec
.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.
sounds good, I know that
KubePriorityClass
should bepriorityclasses.scheduling.k8s.io
, but what'sPodPriorityClass
?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.
The
PriorityClassSource
represents where to find the priority class, there will be 3 ways:So, the
PodPriorityClass
means parsing the priority from the pod template.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.
so, you mean, for CRDs, we still need a ResourceInterpreter interface to determine priority?
and this rule requires the priority class must exist in Karmada control plane. so in my opinion, it is not much different from
KubePriorityClass
, and the API becomes more difficult to understand.I don't know if I understand correctly. if not, please correct me.
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 where validates the existence of PriorityClass in Kubernetes, but karmada-apiserver doesn't have such a restriction. People can apply Deployment and specify a non-existent PriorityClass.
Note: The idea of
FederatedPriorityClass
andPodPriorityClass
is still not mature, just like a placeholder in this proposal, for extension purpose.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.
not K8s, I mean Karmada should do this. that's weird - Karmada can find the priority class name from the Pod template, but this priority class doesn't exist.
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.
The PriorityClass is a kind of cluster-lever configuration, it is usually managed by the infra team, and it might synced from the legacy metadata system. In other words, that configuration might not propagated by Karmada.
By the way, Kubernetes doesn't require the PriorityClass to exist. I just ran a test with it, it shows that everything works fine:
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.
@RainbowMango first, sorry for the slow response.
I mean, Karmada should understand the priority class to apply it to ResourceBinding.
as your example shows, the deployment
nginx
did work fine, but it cannot co-work with ResourceBinding priority & preemption because the priority classhoren
doesn't exist in Karmada.in plain words, when people set the field
PriorityClassSource
toPodPriorityClass
, Karmada will parse the priority class name from the pod template, then find the priority class by name to apply it to ResourceBinding.