-
Notifications
You must be signed in to change notification settings - Fork 4.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
api: create fresh http client for unix sockets #8602
Conversation
The HTTP client over unix socket needs a special transport object, and in doing so we need to create a fresh HTTP client so that we pickup the environment variable based configuration options.
This problem was uncovered when trying to run a connect-native task in Nomad using bridge networking. Nomad creates a unix socket through which the task can proxy communications with consul. However, it breaks when TLS is enabled.
Note that the environment variable With this change, the same connect native test program works correctly.
Change suggested by @mkeeler, thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Could you add a changelog entry in the .changelog directory. The file name should be 8602.txt
and probably look similar to this one https://github.com/hashicorp/consul/blob/master/.changelog/7628.txt
Actually @shoenig I will just fix up the changelog. |
🍒✅ Cherry pick of commit 9fab3fe onto |
Co-authored-by: Matt Keeler <[email protected]>
The HTTP client over unix socket needs a special transport object,
and in doing so we need to create a fresh HTTP client so that we
pickup the environment variable based configuration options.