Auto-populated protocol-specific tagged addresses do not respect default tags
- Dominant language
- Go
- Stars
- 30.1k
- Forks
- 4.6k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 43
Description
We currently populate the tagged addresses for ipv4 and ipv6 from the service address if the service address is ipv4/6 and there is no existing address tagged as `wan_ipv4/6`.
That means that if someone adds a plain `wan` tagged address, the `wan_ipv4/6` will be inherited from the service address and not the user-provided `wan` address.
Repro steps:
0. `consul agent -dev`
1. `consul connect envoy -gateway=mesh -register -wan-address 192.168.0.4:8080 -address '{{ GetInterfaceIP "en0" }}'`
2. `curl http://127.0.0.1:8500/v1/agent/services`
Notice that the `wan` and `wan_ipv4` addresses differ.
One potential solution here is to revert the tagged address defaulting in `addServiceInternal` that was added in #6640. This way only addresses specified by the user are present in the `TaggedAddresses` map. Modifying a provided service registration has been surprising to some users.
Contributor guide
Assessment
This issue has not been assessed yet.