-
Notifications
You must be signed in to change notification settings - Fork 40.4k
DRA 1.32 API: promotion to beta #127511
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
DRA 1.32 API: promotion to beta #127511
Conversation
858689f
to
e45a53c
Compare
Using 1.0 was a workaround to grant Kubernetes 1.31 access to things introduce in that same release. In Kubernetes 1.32 we don't need that workaround anymore because everything is still available after a downgrade and thus usable.
The version bump is an opportunity to pick a name that is a bit more descriptive. It matches the "DevicePlugin" service name.
Listing supported gRPC services (e.g. drav1alpha3.Node, drav1beta1.DRAPlugin) during registration enables the kubelet to determine in advance which methods it can call. Versioning by Kubernetes release makes less sense because it doesn't say anything about which gRPC service is supported. New ones might get added and obsolete ones removed. Some services might be optional. In the past, this versioning support wasn't really used. At least one version had to be provided and kubelet tried to use the plugin with the highest version. This version comparison gets dropped. In the unlikely situation that different plugins register under the same name, the most recent one is used. Because advertising gRPC services is a new convention, plugins only reporting some version are treated as providing the old alpha gRPC service.
Supporting the alpha gRPC interface isn't enough anymore to be compatible with kubelet 1.31: the "supported versions" must contain version numbers, otherwise the older kubelet refuses to register the driver. With this change, a DRA driver can decide to support both kubelet 1.31 and kubelet 1.32 by registering *only* the alpha gRPC interface (NodeV1alpha4(true) and NodeV1beta1(false) as options for Start). The default is to provide both interfaces and using the registration mechanism for 1.32, which makes DRA drivers compatible only with Kubernetes >= 1.32.
Deleting slices was not covered to begin with and the recent registration changes also could have been covered better. Now coverage is at 91%.
…location This makes a configuration with --feature-gates=AllAlpha=true valid again. Without this change, that flag enabled DRAAdminAccess without DynamicResourceAllocation being enabled (default off!) and the kube-apiserver refused to start. While DRAAdminAccess isn't usable without DynamicResourceAllocation, it's also not really wrong to allow it - it simply won't matter.
Some additional updates where needed due to behavioral changes in master:
|
/lgtm |
LGTM label has been added. Git tree hash: d7c5e70d4fc11d1de9598998e05d7bdd32dc406a
|
@pohly: 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-sigs/prow repository. I understand the commands that are listed here. |
This job is broken before this PR, we need to investigate what has broken it , but is not related to this |
Amazing work @pohly ! |
Based on review feedback (kubernetes/kubernetes#127511 (comment)). Kubernetes-commit: 30f52826560129839922e1756730b02f184f0ef9
Based on review feedback (kubernetes/kubernetes#127511 (comment)). Kubernetes-commit: 30f52826560129839922e1756730b02f184f0ef9
Based on review feedback (kubernetes/kubernetes#127511 (comment)). Kubernetes-commit: 30f52826560129839922e1756730b02f184f0ef9
This was an exemplary PR for "easy to review". Thank you for the extra work. |
/triage accepted |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Beta APIs for DRA in 1.32.
Fixes: #123687, #127386
Does this PR introduce a user-facing change?