-
Notifications
You must be signed in to change notification settings - Fork 38.8k
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
ResourceList
's Cpu()
function claim to return "the CPU limit if specified" while returning the content of "cpu"
instead of "limits.cpu"
#94831
Comments
/sig api-machinery |
I could work on this issue if this is a valid bug @ArchangelX360 |
/sig node |
/label api-review |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale |
I would recommend:
/remove-label api-review |
I'm willing to fix documentation and audit the use of this function. |
/assign |
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. |
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. |
Rotten issues close after 30d of inactivity. Send feedback to sig-contributor-experience at kubernetes/community. |
@fejta-bot: 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. |
What happened:
ResourceList
'sCpu()
function claim to return "the CPU limit if specified" while returning the content ofResourceName
"cpu"
instead ofResourceName
"limits.cpu"
.What you expected to happen:
I would expect
Cpu()
to return"limits.cpu"
key content instead of"cpu"
key content. Meaning usingResourceLimitsCPU
ResourceName
instead ofResourceCPU
ResourceName
.It could be that the documentation of the function is invalid.
It seems as well that the confusion is coming from the fact that
ResourceList
struct is both used in the context ofResourceQuotaSpec
but also inResourceRequirements
. Even though the manifest overall structure of these two is a little bit different.Indeed, the information about wether the key is a limit or a request is fundamentally different in the two contexts:
ResourceQuotaSpec
withing theResourceList
we need to prefix the keys bylimits.
orrequests.
.ResourceRequirements
, the manifest itself is declaringLimits
andRequests
being two differentResourceLists
s.How to reproduce it (as minimally and precisely as possible):
Non relevant.
Anything else we need to know?:
This is linked to the issue reported on the (I assume) wrong issue board: kubernetes/api#31
Environment:
kubectl version
): non relevantcat /etc/os-release
): non relevantuname -a
): non relevantThe text was updated successfully, but these errors were encountered: