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

Adds CreateNetworkStatuses for CNI results with multiple pod interfaces #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dougbtv
Copy link
Member

@dougbtv dougbtv commented Jul 25, 2024

Essentially, the gist is that the current singular CreateNetworkStatus method isn't aware of CNI results that have multiple pod interfaces returned.

This approach adds a new method (to not break current implementations, as it needs to return a list instead of a single Network Status)

With the existing method, this is somewhat buggy. If multiple pod interfaces are present, it returns the last one -- and groups all of the IP addresses to that address.

This method returns a list, still limited to interface results that have the sandbox present, and it maps the IPs to the interface using the ips.interface index property in the CNI result.

From the spec (in ADD Success):

sandbox (string): The isolation domain reference (e.g. path to network namespace) for the interface, or empty if on the host. For interfaces created inside the container, this should be the value passed via CNI_NETNS.

For replication of the error yourself, and to see the fix in action, see this gist: https://gist.github.com/dougbtv/1eb8ac2d61d494b56d65a6b236a86e61

For the related suggested update to the NPWG net-attach-def specification, see this proposal @ https://docs.google.com/document/d/1DUTV-o6E6zlRTKZkxeDhAeyGrmq03qPgPbU580Rm7-g/edit

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

1 participant