Backport of Consul Connect over IPv6 (except tproxy) into release/1.9.x #24204
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport
This PR is auto-generated from #24203 to be assessed for backporting due to the inclusion of the label backport/1.9.x.
The below text is copied from the body of the original PR.
Mostly resolves #7905 -- #23882 introduced IPv6 support to Nomad's "bridge" network mode, and this extends that to Consul Connect (which also requires "bridge" mode). I say "mostly" because Transparent Proxy still does not work (the Consul CNI plugin does not do any
ip6tables
at the moment for its extra functionality).Along the way, I found that since we were always setting Connect/Envoy's
bind_address
to"0.0.0.0"
, the user couldn't pick anything else (like I had tried"::"
). In particular, even with this PR auto-detecting IPv6, I imagine a user might like to set it to""
(empty), so that Consulproxy-defaults
config can come into play. I did not add a config option for the client along these lines, but an individual job could set it like so:Or set it to whatever they may like.
My preferred way to replicate the behavior is (on a host/network with ipv6 support), enable ipv6 on the Nomad bridge and prefer ipv6 for services on a client (per #23388):
Consul can run in dev mode.
consul agent -dev
Then use the basic countdash example:
example.nomad.hcl
The alloc and service addresses will be ipv6, health checks pass, and the counter counts.
Overview of commits