Resolve TXT records via CNAME (#3557)

* Add test case for TXT lookup via CNAME

Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com>

* Return HostType of explicit TXT records

Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com>

* Adapt TXT method lookup to allow lookup via CNAME

Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com>

* Implement lookup of TXT records via CNAME

Signed-off-by: Jonathan Nagy <nagytech@users.noreply.github.com>
This commit is contained in:
Jonathan Nagy 2020-01-04 00:16:04 +11:00 committed by Miek Gieben
parent acac649c1b
commit e3266d24f7
6 changed files with 80 additions and 12 deletions

View file

@ -35,7 +35,7 @@ func (k Kubernetes) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.M
case dns.TypeAAAA:
records, err = plugin.AAAA(ctx, &k, zone, state, nil, plugin.Options{})
case dns.TypeTXT:
records, err = plugin.TXT(ctx, &k, zone, state, plugin.Options{})
records, err = plugin.TXT(ctx, &k, zone, state, nil, plugin.Options{})
case dns.TypeCNAME:
records, err = plugin.CNAME(ctx, &k, zone, state, plugin.Options{})
case dns.TypePTR: