Adds CreateNetworkStatuses for CNI results with multiple pod interfaces #68
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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):
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