DRA: relocate extended-resource and device-metadata sections - #56642
Conversation
👷 Deploy Preview for kubernetes-io-vnext-staging processing.
|
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
/wg device-management |
|
/label refactor /lgtm |
|
LGTM label has been added. DetailsGit tree hash: 5bd3ac448fcb14b7aa12bdfd0abfc718f152e503 |
|
LGTM label has been added. DetailsGit tree hash: 968eb0f75a14d51acd5c1fb41286925cfee42569 |
|
Oops, there's a merge conflict. |
…n driver-support framing Signed-off-by: caesarsage <destinyerhabor6@gmail.com>
046cd0a to
f1e18f8
Compare
Thanks, I have rebased |
|
/lgtm /assign @lmktfy |
|
LGTM label has been added. DetailsGit tree hash: 369945105bc58e1879949d9613147504ee945a3b |
lmktfy
left a comment
There was a problem hiding this comment.
This change makes our docs better.
/approve
There was a problem hiding this comment.
(aside)
We could hyperlink to this from https://kubernetes.io/docs/concepts/cluster-administration/observability/
| ### Device metadata protocol {#device-metadata-protocol} | ||
|
|
||
| The protocol consists of four rules: | ||
|
|
||
| 1. **File paths.** Metadata files live inside containers under | ||
| `/var/run/kubernetes.io/dra-device-attributes`. For a directly referenced | ||
| ResourceClaim the path is | ||
| `resourceclaims/<claimName>/<requestName>/<driverName>-metadata.json`; for a | ||
| claim created from a ResourceClaimTemplate the path is | ||
| `resourceclaimtemplates/<podClaimName>/<requestName>/<driverName>-metadata.json` | ||
| (where `podClaimName` is `pod.spec.resourceClaims[].name`). | ||
|
|
||
| In cases where the ResourceClaim request uses the | ||
| [prioritized list](#prioritized-list) feature, only the top-level request | ||
| name is used for the `<requestName>` segment in the file path (that is, | ||
| the `/<subrequest>` portion is dropped). Inside the | ||
| JSON file, the `requests[].name` field carries the full | ||
| `<request>/<subrequest>` reference (for example, `gpu/high-memory`) so | ||
| that consumers can identify which alternative was allocated. | ||
|
|
||
| The path constants are defined in | ||
| [`k8s.io/dynamic-resource-allocation/api/metadata`](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/api/metadata). | ||
|
|
||
| 1. **JSON API.** Each file is a stream of one or more | ||
| [`DeviceMetadata`](https://pkg.go.dev/k8s.io/dynamic-resource-allocation/api/metadata/v1alpha1#DeviceMetadata) | ||
| objects serialized as versioned JSON with `apiVersion` and `kind`, following | ||
| Kubernetes API conventions. The same metadata is encoded once per supported | ||
| API version (newest first). All objects in the stream are semantically | ||
| equivalent; consumers should use the first object they can decode. | ||
|
|
||
| 1. **Generation.** When a driver updates a metadata file the embedded | ||
| `metadata.generation` field must increase so consumers can detect changes. | ||
|
|
||
| 1. **Container exposure.** Files are typically exposed via | ||
| {{< glossary_tooltip text="CDI" term_id="cdi" >}} bind-mounts, but other | ||
| mechanisms are permitted as long as the file appears at the correct path and | ||
| is read-only inside the container. |
There was a problem hiding this comment.
IMO we could eventually move this inside https://kubernetes.io/docs/concepts/extend-kubernetes/compute-storage-net/ - but with a lot of signposting and other work to make the move low friction for people reading the docs.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: lmktfy The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Follow-up to #56295 addressing review feedback.
DeviceTaintRule API version was left out — already handled by #56265.