Skip to content

Support v0 and v1 nodenetsvc api for ncproxy #1806

Merged
katiewasnothere merged 1 commit intomicrosoft:mainfrom
katiewasnothere:kabaldau/ncproxy_nodenetsvc
Jun 12, 2023
Merged

Support v0 and v1 nodenetsvc api for ncproxy #1806
katiewasnothere merged 1 commit intomicrosoft:mainfrom
katiewasnothere:kabaldau/ncproxy_nodenetsvc

Conversation

@katiewasnothere
Copy link
Copy Markdown

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
Copy Markdown
Member

kevpar commented Jun 7, 2023

You have an extraneous commit.

Copy link
Copy Markdown
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
Copy Markdown
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.

@katiewasnothere katiewasnothere force-pushed the kabaldau/ncproxy_nodenetsvc branch from 23200a4 to 160e477 Compare June 7, 2023 23:48
Comment thread cmd/ncproxy/run.go
@katiewasnothere katiewasnothere force-pushed the kabaldau/ncproxy_nodenetsvc branch from 160e477 to 10c29fc Compare June 9, 2023 20:18
@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