nomad
nomad copied to clipboard
[agent] Serve API over Unix domain sockets
This PR pairs with #16872 to provide the server side configuration and implementation for serving the Nomad API over unix domain sockets.
For local testing, you can use socat to provide a suitable proxy
nomad agent -dev -api-socket-path /tmp/run/nomad.sock &
socat -d -d TCP4-LISTEN:14646,reuseaddr,fork UNIX:/tmp/run/nomad.sock
In another terminal
export NOMAD_ADDR=http://127.0.0.1:14646
nomad namespace list
Contents:
- Add api_socket config
- Update tests for new config
- Enable socket listener
- Add flags to agent for socket config
Fixes: https://github.com/hashicorp/nomad/issues/1639
Ref: https://hashicorp.atlassian.net/browse/NET-10375