Skip to content
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

Support .consul in go-dnsmasq stubzones #31

Closed
matthewvalimaki opened this issue Mar 17, 2016 · 5 comments
Closed

Support .consul in go-dnsmasq stubzones #31

matthewvalimaki opened this issue Mar 17, 2016 · 5 comments

Comments

@matthewvalimaki
Copy link
Contributor

Related to #24.

Could we add stubzones support in alpine-consul?
According to https://github.com/janeczku/go-dnsmasq Use different nameservers for specific domains domain[,domain]/host[:port] so I'm thinking the following might work for https://github.com/smebberson/docker-alpine/blob/master/alpine-base/root/etc/services.d/resolver/run:

exec go-dnsmasq --default-resolver --append-search-domains --hostsfile=/etc/hosts --stubzones=.consul/127.0.0.1:8600 >> $GO_DNSMASQ_LOG_FILE 2>&1
@smebberson
Copy link
Owner

@matthewvalimaki, yeah this looks good. I'm half way through approving and checking #13, post that, we can integrate this for sure. Nice and simple ;)

@matthewvalimaki
Copy link
Contributor Author

Sweet. I have not looked into this but there was significant delay with
response when consul was only nameserver. Perhaps I missed an option,
perhaps newer consul doesn't experience that. Something to test :)
On Mar 17, 2016 3:55 PM, "Scott Mebberson" notifications@github.com wrote:

@matthewvalimaki https://github.com/matthewvalimaki, yeah this looks
good. I'm half way through approving and checking #13
#13, post that, we can
integrate this for sure. Nice and simple ;)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#31 (comment)

@matthewvalimaki
Copy link
Contributor Author

Actually I propose we'll introduce ENV CONSUL_DOMAIN=consul to alpine-base which then is used with go-dnsmasq --stubzones=$CONSUL_DOMAIN/127.0.0.1:8600 and consul -domain $CONSUL_DOMAIN. That way it's easy to change it if necessary and no need to write over default /etc/services.d/consul/run.

@smebberson
Copy link
Owner

@matthewvalimaki, sounds good. I really like that refinement. If you want to implement in PR #34, I'll merge straight away :)

@matthewvalimaki
Copy link
Contributor Author

@smebberson done. I also updated the ENV styling a bit to be more readable. I also updated go-dnsmasq version to latest while I was touching that spot.

So with this configuration we still default to consul domain and all should work as they used to. But if you want/need to change the domain all one needs to do is re-declare ENV CONSUL_DOMAIN=<my domain>.

matthewvalimaki added a commit to matthewvalimaki/docker-alpine that referenced this issue Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants