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 Multiple DNS domains for service requests #4165

Closed
clly opened this issue May 27, 2018 · 5 comments
Closed

Support Multiple DNS domains for service requests #4165

clly opened this issue May 27, 2018 · 5 comments
Assignees
Labels
good first issue A well-defined bug or improvement with sufficient context which should be approachable for new contr type/enhancement Proposed improvement or new feature
Milestone

Comments

@clly
Copy link
Contributor

clly commented May 27, 2018

This is similar to #2920 and #290 but I don't know if it would work for their use cases.

I've got a branch that seems to work. I've still got to create tests for my changes but I wanted to file this to see if it's something that would be accepted. I've added some examples at the bottom

Feature Description

Allow a service to do a DNS request against consul with a different domain and receive Service and Node responses for that domain. I'm not sure if SOA and NS requests are required but based on what I saw in the consul code it would be more complicated.

Use Case(s)

We're going to want to do a DNS migration and when we change the domain for consul we would need to be able to figure out a migration path. We don't have a way to rewrite DNS requests in our environment now (that I'm aware of) and any that I've been able to find would require implementing new DNS technologies. Configuring consul to respond to multiple domains would allow us to make that change without needing to coordinate that change with the applications using Consul DNS.

./consul agent -dev -domain consul.clly.me -extra-domain "clly.me"
[ raphael connor@7 11:55: ~/go/src/github.com/hashicorp/consul ] $
 ([email protected] connor/multiple-dns-domains) --> nslookup -port=8600 consul.service.consul.clly.me localhost
Server:		localhost
Address:	127.0.0.1#8600

Name:	consul.service.consul.clly.me
Address: 127.0.0.1

[ raphael connor@7 11:56: ~/go/src/github.com/hashicorp/consul ] $
 ([email protected] connor/multiple-dns-domains) --> nslookup -port=8600 consul.service.clly.me localhost
Server:		localhost
Address:	127.0.0.1#8600

Name:	consul.service.clly.me
Address: 127.0.0.1

[ raphael connor@7 11:56: ~/go/src/github.com/hashicorp/consul ] $
 ([email protected] connor/multiple-dns-domains) --> 

SRV records still return the original domain as do SOA and NS requests

[ raphael connor@7 11:57: ~/go/src/github.com/hashicorp/consul ] $
 ([email protected] connor/multiple-dns-domains) --> nslookup -query=SRV -port=8600 consul.service.clly.me localhost
Server:		localhost
Address:	127.0.0.1#8600

consul.service.clly.me	service = 1 1 8300 raphael.node.dc1.consul.clly.me.

[ raphael connor@7 11:57: ~/go/src/github.com/hashicorp/consul ] $
 ([email protected] connor/multiple-dns-domains) --> 
@mnuic
Copy link

mnuic commented Jul 16, 2018

Hi,

That is exactly what we need. We would like to have ability to have multiple DNS domains registered in consul. One domain for internal use, let’s say for services to communicate internally, and one domain for client requests.

Let’s say domain ‘example.internal.com’ for services to be able to reslov each other, and second domain ‘example.external.com’ for external clients to resolv requests on http or https.

Is it possible to have this added in next release?

@mkeeler mkeeler added thinking More time is needed to research by the Consul Contributors type/enhancement Proposed improvement or new feature dns labels Jul 26, 2018
@mkeeler mkeeler added needs-discussion Topic needs discussion with the larger Consul maintainers before committing to for a release and removed thinking More time is needed to research by the Consul Contributors labels Aug 9, 2018
@pearkes pearkes added this to the 1.2.3 milestone Aug 10, 2018
@pearkes pearkes added good first issue A well-defined bug or improvement with sufficient context which should be approachable for new contr and removed needs-discussion Topic needs discussion with the larger Consul maintainers before committing to for a release labels Aug 10, 2018
@pearkes pearkes modified the milestones: 1.2.3, Upcoming Aug 10, 2018
@freddygv freddygv self-assigned this May 14, 2019
@freddygv
Copy link
Contributor

freddygv commented Jun 5, 2019

Hi @clly this is functionality that we would like to add before the 1.6 release.

Are you interested in completing the work from your branch? If so we can get it reviewed, but if not we can implement it.

@freddygv
Copy link
Contributor

freddygv commented Jun 6, 2019

@clly we will be reviewing #5940 since we just heard back from that contributor. Would be great if you could take a look at it as well.

@clly
Copy link
Contributor Author

clly commented Jun 12, 2019

I am very excited. I'm sorry I never finished the work on my branch. life kind of happened :(

@hanshasselberg
Copy link
Member

Will close this issue since the PR has been merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A well-defined bug or improvement with sufficient context which should be approachable for new contr type/enhancement Proposed improvement or new feature
Projects
None yet
Development

No branches or pull requests

6 participants