-
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
Implements WAN address translation. #1698
Conversation
`AdvertiseAddrs` has been introduced as a configuration option, which duplicates a few other options, namely `AdvertiseAddrWan`. We need to use this value elsewhere, so rather than doing a precedence check every time we need to access it, rectify the value of `AdvertiseAddrWan` to match
This knob tells consul whether it should prefer the WAN address (if set) when making service lookups in remote datacenters. This enables reachability for remote services which are behind a NAT.
Otherwise, the tests will fail when run on a machine with multiple private addresses
This fixes #1386. |
Implements WAN address translation.
@slackpad thanks for your awesome work on this! We've been trying to use this feature but unfortunately it seems that it's only available through the DNS interface. What I would really like to see is the appropriately translated address available in the I've been chatting with @evan2645 about this, and he thinks that the above should be do-able. I'm ready to start on a patch but wanted to check with you to see if there was any reason this isn't feasible, or if there was any reason it's a Bad Idea. Thanks! |
All of the real work here was done by @evan2645 under #1547. This takes that PR and does the following:
TaggedAddresses
config item. This is populated only with the WAN address for now, but it gives us a good base to expose this as a configurable thing later for additional address tags.Node
structure member fromAddresses
toTaggedAddresses
. HavingAddresses
next toAddress
was too subtle (even though it was my original suggestion to name it that, sorry to change it again).leader.go
, and it doesn't add any new Serf tags where space is limited.