-
Notifications
You must be signed in to change notification settings - Fork 40.9k
Implement DRA Device Binding Conditions (KEP-5007) #130160
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
base: master
Are you sure you want to change the base?
Implement DRA Device Binding Conditions (KEP-5007) #130160
Conversation
Hi @KobayashiD27. 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. |
We are pleased to share the initial implementation of the KEP-5007 DRA device binding conditions. While this PR aligns with the outlined in the KEP, we recognize that there may be areas for improvement. We invite the community to review the implementation and provide feedback and insights to help refine and enhance this feature. @pohly @johnbelamaric |
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.
Some quick comments. I have looked at the API and allocator, but not the scheduler plugin.
The API lacks validation, but that's of course okay when the main goal for now is to try out the functionality.
const ( | ||
// IsPrepared indicates the device ready state. | ||
// If NeedToPreparing is True and IsPrepared is True, the scheduler proceeds to Bind. | ||
IsPrepared = "dra.example.com/is-prepared" |
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 was just an example in the KEP. It doesn't belong into the upstream API. Same for PreparingFailed
.
}) | ||
} | ||
} | ||
|
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.
Let's add the device status only when needed by a device.
You also have to add feature gate checking: I don't remember whether it was spelled out explicitly in the KEP (if not, please add in a follow-up), but what would make sense to me is to ignore devices which have binding conditions when the feature is turned off. In other words, don't select them because the code which waits during binding wouldn't be active.
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 add allocatedDeviceStatus only when BindingConditions exist.
and I pass the featureGate status of BindingConditions to the allocator and check it.
@pohly
Early feedback on these sections would be very helpful. Additionally, regarding the comment about the lack of API validation, are you referring to |
/milestone v1.33 |
pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go
Outdated
Show resolved
Hide resolved
pkg/scheduler/framework/plugins/dynamicresources/dynamicresources.go
Outdated
Show resolved
Hide resolved
1c36f41
to
f07e273
Compare
…ces.go Co-authored-by: Patrick Ohly <[email protected]>
Co-authored-by: Patrick Ohly <[email protected]>
Co-authored-by: Patrick Ohly <[email protected]>
Co-authored-by: Patrick Ohly <[email protected]>
Co-authored-by: Patrick Ohly <[email protected]>
Co-authored-by: Patrick Ohly <[email protected]>
Co-authored-by: Patrick Ohly <[email protected]>
fd3ec1f
to
607bb1a
Compare
8bd3cc2
to
12320f9
Compare
/retest |
What type of PR is this?
/kind feature
What this PR does / why we need it:
This PR implements the KEP-5007 DRA device binding conditions. This feature ensures that the scheduler waits in the PreBind phase until any DRA devices that need preparation are ready.
Which issue(s) this PR fixes:
Related to kubernetes/enhancements#5007
Special notes for your reviewer:
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: