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:
TomasKohout
2022-08-30 20:59:27 +02:00
committed by GitHub
parent b218b56063
commit 6782b7fb42
15 changed files with 491 additions and 81 deletions

View File

@@ -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