-
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
Confusing explanation for ResourceQuota concept #42605
Comments
/language en |
/retitle Confusing explanation for ResourceQuota concept |
/assign @pegasas I will reword or add some information about the meaning and comes out with a solution for community review. |
## Description This PR addresses a clarity issue in the documentation regarding the usage of the `count/*` syntax for object count quotas. The current description might lead to confusion about the syntax and its distinction with other forms. The proposed changes reword the relevant section to provide a more accurate and straightforward understanding of how to use `count/*` syntax and differentiate between different resource types. ## Changes Made - Reworded the section about object count quotas to emphasize the correct syntax usage. - Clarified the distinction between `count/<resource>.<group>` and `count/<resource>` for different resource types. - Ensured the language is consistent with the context and style of the surrounding documentation. ## Impact These changes aim to improve the clarity and accuracy of the documentation. Users will have a better understanding of how to use the `count/*` syntax for object count quotas and the nuances associated with it. ## Additional Notes - This PR is related to Issue kubernetes#42605.
## Description This PR addresses a clarity issue in the documentation regarding the usage of the `count/*` syntax for object count quotas. The current description might lead to confusion about the syntax and its distinction with other forms. The proposed changes reword the relevant section to provide a more accurate and straightforward understanding of how to use `count/*` syntax and differentiate between different resource types. ## Changes Made - Reworded the section about object count quotas to emphasize the correct syntax usage. - Clarified the distinction between `count/<resource>.<group>` and `count/<resource>` for different resource types. - Ensured the language is consistent with the context and style of the surrounding documentation. ## Impact These changes aim to improve the clarity and accuracy of the documentation. Users will have a better understanding of how to use the `count/*` syntax for object count quotas and the nuances associated with it. ## Additional Notes - This PR is related to Issue kubernetes#42605.
Hi, @nnlkcncff It seems owner @whitebear009 has solved #1 by by whitebeard10#2. |
I've familiarized myself with PRs and here's what I think:
I try to restate to emphasize. There is no ambiguity in using
kubectl create --namespace=default --filename /dev/stdin <<-EOF
apiVersion: v1
kind: ResourceQuota
metadata:
name: count-syntax
spec:
hard:
count/pods: 1
EOF
# or the same thing, but with a group
kubectl create --namespace=default --filename /dev/stdin <<-EOF
apiVersion: v1
kind: ResourceQuota
metadata:
name: count-syntax-group
spec:
hard:
count/pods.v1: 1
EOF
kubectl create --namespace=default --filename /dev/stdin <<-EOF
apiVersion: v1
kind: ResourceQuota
metadata:
name: countless-syntax
spec:
hard:
pods: 1
EOF Then look at two quotes:
It sound like the first quote is talking about one type of quota and the second quote is talking about another one. It looks like it could be a different quota type, but in both options it is still the same limit on the number of objects for one particular resource. Also before you see the table, you might think that both quotes are talking about different types of resources. It'll be much more clear If you reword that something like this:
Then look at another quote:
One might think this is an explanation of the special syntax It'll be much clearer If you reword that something like this:
An interesting thing turned up while writing this comment: kubectl create --namespace=default --filename /dev/stdin <<-EOF
apiVersion: v1
kind: ResourceQuota
metadata:
name: countless-syntax-unsupported-resource
spec:
hard:
v1/deployments: 1
EOF This command with |
Thanks @nnlkcncff for clarification! |
/close |
@pegasas: 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. |
Two things are confusing in this section:
count/*
— it's precieved as a wildcard mask as if it contains all the resources such as a pods, services, persistentvolumeclaims. But this doesn’t not work that way. Consider rewording or adding some information about the meaning, maybe as a warning block or as a note block.quota for the total number of certain resources
andgeneric object count quota
means the same, so there could be two syntaxes for the same object, for examplecount/pods
andpods
. I found the only difference — you cannot set any quota incount/
-less syntax except what mentioned in the table. The problem is the wording — it looks like you can specify something different using different syntaxes, but in fact it's the same things with some limitations forcount/
-less syntax. Consider rewording to highlight that this is just another syntax for the same resources (if I'm not mistaken).P.S. Maybe I've mistaken about
count/services.nodeports
andcount/services.loadbalancers
— you could create a policy using these resources, but I didn't find them among the cluster resources in the command output (perhaps this is not the complete list of resources):The text was updated successfully, but these errors were encountered: