feat(dns): NXDOMAIN fallback to an upstream resolver#1979
Conversation
carbide-dns answered only from carbide-api's zone, so names outside it (public hostnames a VM needs) returned NXDOMAIN. Add an upstream_resolver config field + --upstream-resolver flag, and on NXDOMAIN/Refused consult that resolver before returning the negative answer. Wire the value through the nico-dns chart. Signed-off-by: s3rj1k <evasive.gyron@gmail.com>
69ab098 to
2156705
Compare
|
carbide-dns is intended to only be authoritative for nico zones. It is not a recursive DNS server. It is also not good practice that you have your authoritative DNS server act as a recursive DNS server, so I am not comfortable merging this feature. If you need recursive DNS, you can use something like unbound and forward nico-related queries to carbide-dns. |
Use-case here is to be able to resolve I've tried using unbound with charts setup, but it looks like this does not work without rebuilding both unbound and unbound exporter images. |
|
Anyone can really use any recursive resolver they want, if they're willing to add the couple of hostnames that are the same in every site that map to the site specific IP addresses on Kubernetes services. Maybe we should think about documenting the hostnames required and not try to ship an unbound. But yeah, carbide-dns is only intended to be an authoritative service and not do recursor functions; so I think this problem is better solved at the recursor service. |
I would also prefer a working solution based on unbound vs maintaining some extra code. Let's keep this PR around for reference, until correct solution evolves. |
Do you mean you expect NICo helm charts to include an unbound deployment? |
I mean they are already no? No images but unbound placeholders exist already, but I guess it would be enough to have setup documented and CI tested at some level so the next possible rebase/refactor will not break this feature. |
Description
carbide-dns answered only from carbide-api's zone, so names outside it (public hostnames a VM needs) returned NXDOMAIN. Add an upstream_resolver config field + --upstream-resolver flag, and on NXDOMAIN/Refused consult that resolver before returning the negative answer. Wire the value through the nico-dns chart.
Type of Change
Related Issues (Optional)
Breaking Changes
Testing
Additional Notes