mirror of
https://github.com/coredns/coredns.git
synced 2025-10-31 18:23:13 -04:00
plugin/k8s_external: Resolve headless services (#5505)
*add option for resolving headless Services without external IPs in k8s_external Signed-off-by: Tomas Kohout <tomas.kohout1995@gmail.com>
This commit is contained in:
@@ -27,6 +27,7 @@ func TestTransferAXFR(t *testing.T) {
|
||||
k.APIConn = &external{}
|
||||
|
||||
e := New()
|
||||
e.headless = true
|
||||
e.Zones = []string{"example.com."}
|
||||
e.externalFunc = k.External
|
||||
e.externalAddrFunc = externalAddress // internal test function
|
||||
@@ -64,6 +65,7 @@ func TestTransferAXFR(t *testing.T) {
|
||||
if ans.Header().Rrtype == dns.TypePTR {
|
||||
continue
|
||||
}
|
||||
|
||||
expect = append(expect, ans)
|
||||
}
|
||||
}
|
||||
@@ -92,6 +94,7 @@ func TestTransferIXFR(t *testing.T) {
|
||||
|
||||
e := New()
|
||||
e.Zones = []string{"example.com."}
|
||||
e.headless = true
|
||||
e.externalFunc = k.External
|
||||
e.externalAddrFunc = externalAddress // internal test function
|
||||
e.externalSerialFunc = externalSerial // internal test function
|
||||
|
||||
Reference in New Issue
Block a user