-
Notifications
You must be signed in to change notification settings - Fork 4k
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
cluster-api: node template in scale-from-0-nodes scenario with DRA #7804
base: master
Are you sure you want to change the base?
Conversation
|
Welcome @ttsuuubasa! |
Hi @ttsuuubasa. 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-sigs/prow repository. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ttsuuubasa The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
40c71bb
to
b5df22b
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.
this is looking good @ttsuuubasa , i have a few requests.
- add unit tests to confirm the behavior of the new template options for dra in
TestNodeGroupTemplateNodeInfo
, inclusterapi_nodegroup_test.go
. - add unit tests to confirm the behavior of
InstanceResourceSlices
, inclusterapi_unstructured_test.go
. - update the README to include the new annotation name for DRA.
Modify TemplateNodeInfo() to return the template of ResourceSlice. This is to address the DRA expansion of Cluster Autoscaler, allowing users to set the number of GPUs and DRA driver name by specifying the annotation to NodeGroup provided by cluster-api. Signed-off-by: Tsubasa Watanabe <[email protected]>
b5df22b
to
3fbacf0
Compare
@elmiko
I also update the README to explain the new annotation for DRA. Could you please review it again? |
thanks @ttsuuubasa , i will try to review before monday. |
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.
this is looking nice @ttsuuubasa , thank you!
i would like to get one more review on this, cc @jackfrancis might you be able to give a review?
/lgtm
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR makes cluster-api as Cloud Provider enable to return ResourceSlice which users specify of the node template (
NodeInfo
) in scale-from-0-nodes scenario by TemplateNodeInfo(). The node template informs Cluster Autoscaler about how resources the node to be spawned has like CPU, memory and GPU in the NodeGroup where no existing nodes are present. With the DRA expansion, the custom resources of the node like GPU is expressed by ResourceSlice, however, cluster-api as Cloud Provider had no way for users to have NodeInfo possess the ResourceSlice. That's why I added the following annotation to specify the DRA driver name and allow users to specify ResourceSlice of NodeInfo returned by TemplateNodeInfo(). This method by annotating follows the device plugin's way and the original annotations can also be used for the device plugin.Which issue(s) this PR fixes:
Fixes #7724
Special notes for your reviewer:
Although I stated the annotation for DRA pool name is also required in the above issue, the pool name typically is set as the node name. Therefore, I didn't institute the annotation for the pool name and it is configured to the node name internally.
The DRA handles not only GPUs but also other devices.
The current PR's implementation regards the device as GPU when the DRA driver name and GPU count is specified.
This may be no problem for the time being because most DRA drivers treat only GPU at this point but not expandable in the future.
TemplateNodeInfo() returns the slice of ResourceSlice but this modification include one ResourceSlice to the slice per Node.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: