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

Enhance --domain-filter to match parent zones too #2040

Closed
euven opened this issue Apr 7, 2021 · 3 comments · Fixed by #2113
Closed

Enhance --domain-filter to match parent zones too #2040

euven opened this issue Apr 7, 2021 · 3 comments · Fixed by #2113
Labels
kind/feature Categorizes issue or PR as related to a new feature.

Comments

@euven
Copy link
Contributor

euven commented Apr 7, 2021

What would you like to be added:

Currently it is not possible to use the --domain-filter to match against a parent zone. For example, if we had a registered "parent" zone example.com and we then set --domain-filter=x.example.com, then example.com will not be determined as a matching zone here.

It would provide more flexibility if --domain-filter could consider parent zones as matches too.

Why is this needed:

Having --domain-filter match parent zones:

  1. would allow the providers to apply finer-grained control over DNS generation for sub domains within the same zone, i.e --domain-filter=x.example.com would create a DNS entry for x.example.com (and subdomains thereof), but y.example.com could be blocked/ignored;
  2. would mean that one wouldn't be required to register "child" zones

Please let me know if this is something that sounds feasible and would be worth adding, or if I'm totally missing the point :)

Thanks for this great tool!

@euven euven added the kind/feature Categorizes issue or PR as related to a new feature. label Apr 7, 2021
@rektide
Copy link

rektide commented Apr 12, 2021

I feel like I'm missing something (but I'm very new here)? Why not just set --domain-filter=example.com ?

@evhan
Copy link

evhan commented May 2, 2021

We have a use case where this would help. In our situation we have a single zone, and we want to manage multiple domains within that zone using separate instances of ExternalDNS so that we can configure their behaviours differently (different TXT owner details, publishing settings, etc.).

We'd expected the --domain-filter flag to let us do this, but like @bynare says it seems to instead behave more like a "zone filter" in that it will only consider whether a given record is in a zone argument; if the argument is a domain it will not work. Ideally we'd be able to run two instances of ExternalDNS, one for each of (for example) --domain-filter=x.example.com and --domain-filter=y.example.com, and their effects would be scoped to those domains regardless of whether they represent separate zones or are just two domains in the same zone.

@rafatio
Copy link

rafatio commented May 7, 2021

We have a similar scenario here, we want to only enable the creation of specific subdomains for different ExternalDNS instances. For example, we are using the aws provider with the hosted zone example.com. In instance A we want to use --domain-filter=a.example.com to only enable the creation of *.a.example.com. In instance B we want to use --domain-filter=b.example.com to only enable the creation of *.b.example.com. But the --domain-filter is also being applied in the zones here, because of that it fails without any available zones.
It really needs to apply this --domain-filter in the zones? Shouldn't the suitableZones function be enough to filter the zones?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
4 participants