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
RFC: dra: support skipping NodePrepareResource and NodeUnprepareResource #118203
Conversation
This enables writing DRA drivers where the part local to a node isn't using CDI and CRI. For example, an NRI plugin might act upon the allocated resource. Using a new special value for the DriverName is simple. However, like any alternative (for example, a separate field) it will cause problems when the kubelet handling the pod does not know about it: then the kubelet will try to find a non-existent "nop.k8s.io" plugin and fail to prepare.
Skipping CI for Draft Pull Request. |
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. |
// | ||
// The special "nop.k8s.io" constant may be used here. This tells the | ||
// kubelet that it does no resource driver is required when starting or | ||
// stopping containers that use this resource. |
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.
The alternative that I had considered was something like:
Usage []string
where the empty set is the default behavior (call plugin). The same could also be specified explicitly with usage: [ cdi ]
.
usage: [ nop ]
could indicate "do nothing".
If we ever do something with CNI, usage: [ cni ]
could be added, perhaps even in combination (usage: [ cdi, cni ]
).
I got stuck a bit when wondering whether all strings need to be pre-defined. Probably, otherwise we have a problem when a future release adds a new value that an old kubelet doesn't support. We want that old kubelet to fail when encountering an unknown value instead of silently ignoring it.
NRI doesn't know anything about the high level objects like claims or allocation. To pass information to NRI something on kubelet should get info from claim object and convert it to something that will be passed down to runtime. |
/cc |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mimani68, pohly 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 |
/remove-sig api-machinery |
@pohly do we still need this PR? If not, please consider to close it, thanks. |
There is an alternative that should work without any changes: just declaring Before we close this PR, let me add an E2E test for this and a KEP update which documents this. |
See #118786 |
/close We agreed that just declaring |
@pohly: Closed this PR. 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 type of PR is this?
/kind feature
/kind api-change
What this PR does / why we need it:
This enables writing DRA drivers where the part local to a node isn't using CDI and CRI. For example, an NRI plugin might act upon the allocated resource.
Special notes for your reviewer:
Using a new special value for the DriverName is simple. However, like any alternative (for example, a separate field) it will cause problems when the kubelet handling the pod does not know about it: then the kubelet will try to find a non-existent "nop.k8s.io" plugin and fail to prepare.
Does this PR introduce a user-facing change?
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: