-
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
Add support for '--address' in ConsulDNS like dnsmasq have #810
Comments
I'm not entirely sure I understand. You want to hardcode the response for services? |
yes - but only A record response - thats a trick. |
so A record will point to IP of HAproxy. HAproxy will do the rest. |
I think its easier to register "foo-docs.service.consul" as an external service. Otherwise we'd have some very specialized logic for hardcoding in this one scenario. I don't see this as a common use case we'd support. |
just to make it clear, how it works, because we do not change SRV answers,
|
registering an external service is easy, but it require twice more work to keep up to date from consul-template side and according to our developers there is "an inconsistence in naming convention". I know, our developers have very sophisticated requirements :) I thought also that this doesn't change any logic of consul |
The problem is that many (most) Consul deployments actually do depend on the A records. So in this way, it's a pretty major change. Effectively it would suppress the normal serving and filtering logic to return a hard coded result. I think this can be better solved outside of Consul. If you guys are using consul-template, then you can always setup a specific |
Yea we solve it outside with dnsmasq which was the easiest method I suppose. Can you elaborate little bit the solution you proposed ? I still don't get it, how end-user using browser gonna get HAproxy IP, when consul is his main DNS , knowing only service name? EDIT: this is same output from dig, when dnsmasq is in front with
|
Sorry that was unclear, my solution requires a layer of indirection being used, such that you can do HTTP path based routing. A reverse proxy of some sort. If you are using Consul directly my suggestion will not work. In that case either the DNSMasq trick or external services solution makes more sense. |
thx @armon, you can close ticket. out of topic:
Might be, that we are doing something wrong here, thats why ask for more details :), so sorry for being so picky. Can you just tell me how only A record is being used for Consul deployments? I thought that only SRV is needed since it contains a important couple of real IP and PORT? |
@sielaq Most deployments depend on well-known ports, so the port is hardcoded and the A record is used for IP discovery. Hope that helps! |
This commit deprecates helm value lifecycleSidecarContainer and replaces it with consulSidecarContainer. It also replaces all uses of lifecycle sidecar with consul sidecar, including container names, commands, and flags. This is to enable future functionality within the consul-sidecar container, since it may no longer be only responsible for managing lifecycle.
Hello,
There is a nice functionality of dnsmasq (--address) that
force an IP address for specific domain like:
so A record is resolved as 10.20.30.40
and SRV stays as it was.
I'm not sure if this is a part of functionality which exists already (done by #570).
if yes then - what is needed is a possibility to add "wild card" like all *.service.consul.
A record is needed for humans 😄 like HAproxy+browser
Missing this stuff forcing us to use still dnsmasq just for this small feature.
I would love to use consul only 😄
If this is already possible please correct me 😄
The text was updated successfully, but these errors were encountered: