AdguardTeam / AdguardTeam/AdGuardHome

create a way to use default host's resolver

Abierto
#8,326 0 comentarios 0 reacciones 0 asignados Ver en GitHub
feature request
Lenguaje dominante
TypeScript
Estrellas
36.9k
Forks
2.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### Prerequisites

- [x] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) and found no answer

- [x] I have searched other issues and found no duplicates

- [x] I want to request a feature or enhancement and not ask a question

### The problem

I am running AdGuardHome on Kubernetes and I want to use the specific domains with custom upstream. My custom upstream is another DNS server deployed in the same cluster, there I have my internal zones.

The problem is that I, obviously, want to address that DNS upstream by its hostname, which is a Kubernetes DNS name (service.namespace.svc.cluster.local). Which is resolved by the cluster's own DNS server (CoreDNS).

Using cluster's DNS IP address in AdGuardHome configuration is not a good idea as the cluster itself controls it. Yes, it is stable indeed, but changes from one cluster to another, of course.

This is my specific domain config:
```
[/iot.internal/]coredns.coredns-private.svc.cluster.local:53
```
(I use a dedicated deployment of CoreDNS for it, not the cluster's one)

But only the cluster's CoreDNS knows how to resolve that "coredns.coredns-private.svc.cluster.local". And there is no way to use it.

### Proposed solution

Probably, the most elegant option, unless I am missing something, would be to have another upstream config type - the one that uses the default host's (pod's in this case) resolver? Then for Kubernetes deployments, it would be like:

```
[/*.svc.cluster.local/]
```

### Alternatives considered and additional information

At this point, it seems I will have no choice but to use my init container to extract the IP address from /etc/resolv.conf and populate bootstrap_dns value using it.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.