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
podresources APIs: concrete resources apis: implement GetAllocatableResources #95734
podresources APIs: concrete resources apis: implement GetAllocatableResources #95734
Conversation
@fromanirh: 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. |
Hi @fromanirh. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. 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. |
/sig node |
56dcb6b
to
78cd196
Compare
this PR is now reviewable! please note it depends on the changes made in #93243 (hence 7aaef8a is duplicated here) The Watch() implementation is missing as we are still tuning the implementation and fixing the e2e tests. Please let me know (@RenaudWasTaken and anyone which wants to review!) if is better to add the Watch implementation here, as I plan to do, or better a separate PR. Please note that PR would depend on #93243 and on this one, which can make the review awkward - this is the reason why I'm inclined to add the missing changes here. |
/ok-to-test |
This PR may require API review. If so, when the changes are ready, complete the pre-review checklist and request an API review. Status of requested reviews is tracked in the API Review project. |
It's legal for device plugins to not expose topology informations. Previously, the code was just skipping these devices. Review highlighted is better to report them anyway and let the client application decide if they still want somehow to track them or skip them entirely. Signed-off-by: Francesco Romani <fromani@redhat.com>
From kubernetes#96553 we are reminded we need to handle the case on which a device plugin reports nil Topology, which is legal. Add unit test to ensure this case is handled. Signed-off-by: Francesco Romani <fromani@redhat.com>
Add test to reflect the correct behaviour according to review comments. Most notably, we should consider that -as the device plugin API allows to express- a device ID can have multiple "NUMA" node IDs. (example: AMD Rome). More details: kubernetes#95734 (comment) Signed-off-by: Francesco Romani <fromani@redhat.com>
Add feature gate to disable the GetAllocatableResources API. The feature gate isd alpha stage, disabled by default. Add e2e test to demonstrate the behaviour with feature gate disabled. Signed-off-by: Francesco Romani <fromani@redhat.com>
Before the addition of GetAllocatableResources, the podresources API had just one endpoint `List()`, thus we could just account for the total of the calls to have a good pulse of the API usage. Now that we extend the API with more endpoints (`GetAlloctableResources`), in order to improve the observability we add per-endpoint counters, in addition to the existing counter of the total API calls. Signed-off-by: Francesco Romani <fromani@redhat.com>
Hi @fromanirh, a friendly reminder that the code freeze for 1.21 is today. |
ad74ff9
to
1e7bb20
Compare
rebased to fix the conflict. No code changes besides the confict fix itself. |
/lgtm |
/test pull-kubernetes-e2e-kind |
/test pull-kubernetes-integration |
/test pull-kubernetes-e2e-azure-disk-windows |
/retest |
@fromanirh: The following tests failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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 understand the commands that are listed here. |
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.
thank you for making the terminology updates.
/approve
/lgtm
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: AlexeyPerevalov, dchen1107, derekwaynecarr, fromanirh, klueska, RenaudWasTaken 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 |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Implement the GetAllocatableResources endpoint proposed in https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/2043-pod-resource-concrete-assigments
Which issue(s) this PR fixes:
Fixes # N/A
Special notes for your reviewer:
This PR depends on the changes implemented in #93243
Replaces #94478
The original plan is to also implement the Watch endpoint, also replacing and #94612, but this needs to be postponed to 1.21 for capacity reasons.
KEP amendment PR: kubernetes/enhancements#2125
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: