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

Updates to use CreateNetworkStauses from net-attach-def client, bump to v1.7.1 #1314

Merged

Conversation

dougbtv
Copy link
Member

@dougbtv dougbtv commented Jul 25, 2024

NOTE: This functionality is dependent on k8snetworkplumbingwg/network-attachment-definition-client#68 and will require a library update in this PR in order to be complete.

This functionality properly represents Network Status for CNI ADD results that return multiple interfaces themselves.

This approach uses a new method from the net-attach-def-client -- CreateNetworkStatuses, and refactors to account for the array return.

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

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

@maiqueb
Copy link
Collaborator

maiqueb commented Jul 29, 2024

/cc

@dougbtv dougbtv changed the title [WIP] Updates to use CreateNetworkStauses from net-attach-def client Updates to use CreateNetworkStauses from net-attach-def client, bump to v1.7.1 Aug 1, 2024
@coveralls
Copy link

Coverage Status

coverage: 63.857% (+0.7%) from 63.116%
when pulling a28d1e4 on dougbtv:client-lib-multiple-if-cni-result
into 8587734 on k8snetworkplumbingwg:master.

Copy link
Contributor

@adrianchiris adrianchiris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Copy link
Contributor

@SchSeba SchSeba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM great!

Copy link
Collaborator

@maiqueb maiqueb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this.

@dougbtv dougbtv merged commit 3c33f6f into k8snetworkplumbingwg:master Aug 5, 2024
24 checks passed
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.

5 participants