-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add --services flag to start API without using --listen flag #429
base: main
Are you sure you want to change the base?
Conversation
This makes use of the new gvproxy parameter added in containers/gvisor-tap-vsock#429
At this point, a gvproxy binary built from containers/gvisor-tap-vsock#429 is required. Let's check for it as this requirement is easy to miss.
At this point, a gvproxy binary built from containers/gvisor-tap-vsock#429 is required. Let's check for it as this requirement is easy to miss.
In the current implementation when gvproxy is started with the --listen option, it exposes a HTTP API with several endpoints like /connect, /stats, /services ... The /connect endpoint, however, is only used when the gvforwarder tool is running on the guest, and, when using different connectivities like --listen-vfkit or --listen-qemu, it is not really necessary. This commit adds a new flag --services that allows to start the HTTP API without the /connect endpoint. It could be used when using different network connectivity and still wanting a lighter HTTP API. It accepts the endpoint where it will be reachable E.g. gvproxy --listen-vfkit .... --services unix:///tmp/svc_gvproxy.sock Signed-off-by: Luca Stocchi <[email protected]>
Signed-off-by: Luca Stocchi <[email protected]>
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: lstocchi The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
In the current implementation when gvproxy is started with the --listen option, it exposes a HTTP API with several endpoints like /connect, /stats, /services ...
The /connect endpoint, however, is only used when the gvforwarder tool is running on the guest, and, when using different connectivities like --listen-vfkit or --listen-qemu, it is not really necessary.
This commit adds a new flag --services that allows to start the HTTP API without the /connect endpoint.
I was not sure how to implement it as I saw 3 possible use cases:
/connect
endpoint)/connect
endpoint)I went with the third to stick with the same behavior but open to discuss.
I'll add some test in a follow-up PR as I'd like to leverage the code from #427