Skip to content
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

CFP: add Device convention #1070

Open
squeed opened this issue Feb 26, 2024 · 4 comments
Open

CFP: add Device convention #1070

squeed opened this issue Feb 26, 2024 · 4 comments

Comments

@squeed
Copy link
Member

squeed commented Feb 26, 2024

After talking with @ajoea, we realized that a convention / capability arg for the runtime to pass devices to CNI plugins would be extremely useful.

The most obvious use-case would be for the result of Kubernetes device plugins to be automatically made available to a CNI plugin. Something like

{
    "capabilities": { "devices": true }
}
// leads to
{
  "runtimeConfig": {
    "devices": [
      {
        "pciID": "0000:00:12.0"
      }
    ]
  }
}

To be determined is merely the format of the information. What do k8s runtimes have available? Do we do the full CDI type?

@squeed
Copy link
Member Author

squeed commented Feb 26, 2024

FYI @aojea, @dougbtv, I would love your input here.

@aojea
Copy link

aojea commented Feb 26, 2024

I wrote about it a bit more here opencontainers/runtime-spec#1239, so the kernel identifier for netdevices is the "name", that will be the part we need to pass.

I´m not much into the SRIOV use cases, but afaik the pciID is needed to do some driver binding, I expect that part of configuration/provisioning to be happening before we are in the CNI ADD situation

"devices" is ambigues and is traditionally used for "block devices" , that already has a concept with that name in the OCI spec and in kuberntes, however, we are talking here about "netdevices"

@s1061123
Copy link
Contributor

As containernetworking/plugins#1003, sr-iov case, user may want to specify other way than pciID, such as Auxiliary Bus (see pr 1003 in plugin).

@adrianchiris
Copy link
Contributor

as an FYI : device ID is already defined in CNI conventions

https://github.com/containernetworking/cni/blob/main/CONVENTIONS.md#well-known-capabilities

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants