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

Enhance CNI flexibility to read and write deviceInfo by removing the deviceID restriction #1275

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jiayoukun
Copy link

Based on the Device Information Specification described in the provided links
[https://github.com/k8snetworkplumbingwg/device-info-spec/]
[https://github.com/k8snetworkplumbingwg/device-info-spec/blob/main/SPEC.md]

The NPWG Implementation Requirements necessitate checking the deviceID for creating the "CNIDeviceInfoFile", which lacks flexibility. My understanding is that CNIs should also have read and write permissions for deviceInfo. However, in the current Multus code, if the deviceID is not configured in the NetworkAttachmentDefinition (NAD), the "CNIDeviceInfoFile" is not created and passed to the CNI. I believe this part of the code has limitations.

In the current code, I added a condition for generating the "CNIDeviceInfoFile". As long as Capabilities["CNIDeviceInfoFile"] is configured as true in the NAD, an empty file is generated. This way, the "CNIDeviceInfoFile" can be passed to the CNI, allowing CNIs without a deviceID to participate in reading and writing deviceInfo. All the deviceInfo will eventually be returned to the kubelet.

Furthermore, I plan to extend the Device Information Specification in the future to include more adaptable fields, enhancing its flexibility and accommodating a wider range of scenarios.

@dougbtv
Copy link
Member

dougbtv commented May 9, 2024

Any chance you could join our community call to talk about this some more? The connection information can be found in the maintainer's agenda

Thanks for the contribution, we'd love to chat about it some more

@jiayoukun
Copy link
Author

@dougbtv
I apologize for my poor spoken English. I'm afraid that attending the meeting might affect everyone's time. Could we discuss the current PR's content here instead?

The functionality modified in this PR is quite effective and flexible for extending CNI development of more deviceInfo. Wasn't the original intention of using deviceInfo to allow NPWG and CNI to share extended device information? However, the current situation is that CNIs without a deviceID are all limited within NPWG and don't have the opportunity to manipulate deviceInfo.

I hope everyone can provide some assistance! Thank you for the reply!

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

Successfully merging this pull request may close these issues.

None yet

2 participants