AdguardTeam / AdguardTeam/AdGuardHome

create a way to use default host's resolver

オープン
#8,326 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
feature request
主要言語
TypeScript
スター
36.9k
フォーク
2.5k
PR マージ指標
30日以内にマージされた PR はありません

説明

### 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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。