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

Support v0 and v1 nodenetsvc api for ncproxy #1806

Merged

Conversation

katiewasnothere
Copy link
Contributor

This PR adds support for "v0" and "v1" nodenetsvc api. Previously, the proto package name was changed to "nodenetsvc.v1". However, this was never adopted.

This support works by attempting to call the v1 version of the api and if the call returns the grpc code "Unimplemented", then we fall back to the v0 api instead. I considered a different implementation here where we would decide which api was being used when ncproxy is started up. However, there's not a great way other than making a call to determine which api is being used and if the nodenetsvc agent updates to the v1 api, ncproxy would need to be restarted to be used with the new api. This does mean that if using the v0 api, there are two calls made for every one request to ConfigureNetworking.

This PR is currently based on #1797 and will be rebased when that PR is merged.

@katiewasnothere katiewasnothere requested a review from a team as a code owner June 6, 2023 19:46
@katiewasnothere katiewasnothere force-pushed the kabaldau/ncproxy_nodenetsvc branch 2 times, most recently from 4c67bc8 to 23200a4 Compare June 7, 2023 23:13
@kevpar
Copy link
Member

kevpar commented Jun 7, 2023

You have an extraneous commit.

Copy link
Member

@kevpar kevpar left a comment

Choose a reason for hiding this comment

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

What about other calls like ConfigureContainerNetworking, PingNodeNetworkService, and GetHostLocalIpAddress? Do they need similar handling?

@katiewasnothere
Copy link
Contributor Author

What about other calls like ConfigureContainerNetworking, PingNodeNetworkService, and GetHostLocalIpAddress? Do they need similar handling?

They would, but we don't actually use those calls ever.

Signed-off-by: Kathryn Baldauf <kabaldau@microsoft.com>
@katiewasnothere katiewasnothere merged commit 4daa334 into microsoft:main Jun 12, 2023
@katiewasnothere katiewasnothere deleted the kabaldau/ncproxy_nodenetsvc branch June 12, 2023 18:26
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.

3 participants