-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Implement API forwarding for podman machine on Windows #12916
Conversation
db22da3
to
46a20ae
Compare
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: n1hility, rhatdan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@containers/podman-maintainers PTAL |
LGTM |
Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
@jwhonce FYI pushed a commit to switch those outputs to stderr |
/lgtm |
Implements API forwarding for podman machine on Windows, providing out of the box Docker API client access (the windows variant of #11462, and portion of #11422)
This support builds on the standalone ssh proxying facility for windows (win-sshproxy.exe) that was contributed to gvproxy (containers/gvisor-tap-vsock#88). A standalone approach is necessary since:
It does however share the same implementation with the ssh facility that was added to gvproxy.
This approach prefers to bind to the default pipe address expected by Docker API clients, if it is available:
\.\pipe\docker_engine
However, if a user is running a process which has it bound (e.g. they are running something like Docker Desktop, or using multiple instances of podman machine), then it will fall back to a machine namespaces pipe name that should be unique.
Helpful messages are provided in both scenarios:
Example Docker API Client Output
win-sshproxy.exe Details
See specific implementation details in containers/gvisor-tap-vsock#88
The ssh proxy is implemented as a background service, so there is no attached console. Logging goes to the windows event log, which can be viewed using either the windows event viewer or powershell commands like the following:
Important Build Process Note
A possible controversial change is the new Makefile target which does a git checkout of a specific SHA of containers/gvisor-tap-vsock to build the helper executable. This action is only performed when building the Windows Installer (podman.msi task) which needs to include the executable with podman.exe (an external dependency would be a major usability hurdle)
The other approach I had first attempted was to just add a dependency on single package in gvisor-tap and use a thin cmd/ impl. However the problem with this approach is the transitive deps conflict and would require alignment between the two projects. This seems like a no-go since the only reason for the dependency is just the single command.
Another alternative approach would be to break out a separate project that both gvisor-tap-vsock and podman could depend on, but this seems like an unnecessary overhead for something with small scope that is likely to have minimal changes.
[NO NEW TESTS NEEDED] , waiting on ephermal azure capabilities in Cirrus CI