plugin/kubernetes: Add upstream @self and loop count (#1484)

* add upstream @self and loop count

* 1st round of feedback

* allow argless upstream

* update test

* readmes

* feedback
This commit is contained in:
Chris O'Haver
2018-02-14 15:11:26 -05:00
committed by Miek Gieben
parent ee8084a08f
commit 71ee323651
15 changed files with 177 additions and 58 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/coredns/coredns/plugin/etcd/msg"
"github.com/coredns/coredns/plugin/pkg/dnstest"
"github.com/coredns/coredns/plugin/pkg/tls"
"github.com/coredns/coredns/plugin/pkg/upstream"
"github.com/coredns/coredns/plugin/proxy"
"github.com/coredns/coredns/plugin/test"
@@ -227,8 +228,9 @@ func newEtcdPlugin() *Etcd {
tlsc, _ := tls.NewTLSConfigFromArgs()
client, _ := newEtcdClient(endpoints, tlsc)
p := proxy.NewLookup([]string{"8.8.8.8:53"})
return &Etcd{
Proxy: proxy.NewLookup([]string{"8.8.8.8:53"}),
Upstream: upstream.Upstream{Forward: &p},
PathPrefix: "skydns",
Ctx: context.Background(),
Zones: []string{"skydns.test.", "skydns_extra.test.", "in-addr.arpa."},