-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Clarify ResourceQuota limit for PriorityClass #26273
Clarify ResourceQuota limit for PriorityClass #26273
Conversation
Deploy preview for kubernetes-io-master-staging ready! Built with commit 188ccc2 https://deploy-preview-26273--kubernetes-io-master-staging.netlify.app |
047864a
to
beb6ea5
Compare
Done. Please review again. |
beb6ea5
to
91ecacf
Compare
91ecacf
to
3e2e272
Compare
This comment has been minimized.
This comment has been minimized.
/lgtm |
LGTM label has been added. Git tree hash: c1ccb1280402ff9cb98480ae27bfa89d7a0c72be
|
/sig scheduling I'd like to get technical review on these changes. |
(@ydFu - are you providing LGTM on behalf of SIG Scheduling?) |
|
||
{{< codenew file="policy/priority-class-resourcequota.yaml" >}} | ||
|
||
```shell script |
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.
should this be "shell" rather than "shell script"?
@@ -610,16 +610,23 @@ plugins: | |||
values: ["cluster-services"] | |||
``` | |||
|
|||
Now, "cluster-services" pods will be allowed in only those namespaces where a quota object with a matching `scopeSelector` is present. | |||
For example: | |||
Then, create a corresponding resource quota object in `kube-system` namespace: |
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.
Then, create a corresponding resource quota object in `kube-system` namespace: | |
Then, create a resource quota object in the `kube-system` namespace: |
``` | ||
|
||
In this case, a pod creation will be allowed if: | ||
1. Pod has no priority class and created in any namespace. |
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.
1. Pod has no priority class and created in any namespace. | |
1. the Pod's `priorityClassName` is not specified, or |
|
||
In this case, a pod creation will be allowed if: | ||
1. Pod has no priority class and created in any namespace. | ||
2. Pod has priority class other than `cluster-services` and created in any namespace. |
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.
2. Pod has priority class other than `cluster-services` and created in any namespace. | |
1. the Pod's `priorityClassName` is specified to a value other than "`cluster-services`", or |
In this case, a pod creation will be allowed if: | ||
1. Pod has no priority class and created in any namespace. | ||
2. Pod has priority class other than `cluster-services` and created in any namespace. | ||
3. Pod has priority class `cluster-services` and created in `kube-system` namespace, and passed resource quota check. |
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.
3. Pod has priority class `cluster-services` and created in `kube-system` namespace, and passed resource quota check. | |
1. the Pod's `priorityClassName` is set to "`cluster-services`", it is to be created | |
in the `kube-system` namespace, and it has passed the resource quota check. |
1. Pod has no priority class and created in any namespace. | ||
2. Pod has priority class other than `cluster-services` and created in any namespace. | ||
3. Pod has priority class `cluster-services` and created in `kube-system` namespace, and passed resource quota check. | ||
Pod creation will be rejected if pod has priority class `cluster-services` and created in namespace other than `kube-system`. |
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.
Pod creation will be rejected if pod has priority class `cluster-services` and created in namespace other than `kube-system`. | |
A Pod creation request is rejected if its `priorityClassName` is set to "`cluster-services`" | |
and it is to be created in a namespace other than `kube-system`. |
@sftim |
Signed-off-by: Weiping Cai <[email protected]>
3e2e272
to
188ccc2
Compare
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
/sig scheduling
LGTM label has been added. Git tree hash: 97b6abf229777050660b21cb8ed11a24f553acf3
|
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.
/approve
{{< codenew file="policy/priority-class-resourcequota.yaml" >}} | ||
|
||
```shell | ||
$ kubectl apply -f https://k8s.io/examples/policy/priority-class-resourcequota.yaml -n kube-system |
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.
nit:
$ kubectl apply -f https://k8s.io/examples/policy/priority-class-resourcequota.yaml -n kube-system | |
kubectl apply -f https://k8s.io/examples/policy/priority-class-resourcequota.yaml -n kube-system |
matchExpressions: | ||
- operator : In | ||
scopeName: PriorityClass | ||
values: ["cluster-services"] |
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 would add a newline at the end of this manifest so that it looks OK no matter what OS you download it on.
1. the Pod's `priorityClassName` is set to `cluster-services`, it is to be created | ||
in the `kube-system` namespace, and it has passed the resource quota check. | ||
|
||
A Pod creation request is rejected if its `priorityClassName` is set to `cluster-services` |
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.
nit: What rejects the request?
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sftim, ydFu 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 |
/retitle Clarify ResourceQuota limit for PriorityClass |
According to the
priorityClass
design document, improve thepriorityClass
that can be configured by users throughResourcequota
.Reference proposal doc: https://github.com/kubernetes/community/blob/master/contributors/design-proposals/scheduling/pod-priority-resourcequota.md#sample-user-story-1
/kind feature
/language en