Skip to content

Add gRPC API proxy

Axel von Bertoldi requested to merge avonbertoldi/43/proxy into main

This (sub)-command will let us tunnel gRPC requests through text-stream based protocols like ssh, docker exec and kubectl exec. This will be used by each runner executor to connect to the steps gRPC service (running locally on the target machine) via the protocol native to the executor.

The Proxy method connects the specified read and writer with the specified connection. It copies everything from the source to the connection's io.Writer, and the connection's io.Reader to the sink. Under typical usage the connection will be to the steps gRPC service listening on api.DefaultSocketPath, and the source and sink will be the stdin and stdout (respectively) of a streaming-text based protocol like ssh or docker exec.

@ajwalker This might look familiar to you. It's based on code you gave me a while back, but simplified slightly.

After Implement Steps service FollowLogs API (!67 - merged) , Implement Steps service Status API (!70 - merged), and Add step-runner gRPC service Client (!77 - merged), the is the final piece necessary to start implementing runner integration.

Edited by Axel von Bertoldi

Merge request reports

Loading