mirror of
https://github.com/coredns/coredns.git
synced 2025-12-07 10:55:17 -05:00
Use common TLS parsing routine for etcd (#476)
* Use common TLS parsing routine for etcd Change to use the new common routine, and update the docs to reflect the different options for passing TLS configuration. * Move middleware/tls to middleware/pkg/tls This was put in the wrong place originally.
This commit is contained in:
committed by
Miek Gieben
parent
94c59da577
commit
2e366459c5
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/miekg/coredns/middleware/pkg/singleflight"
|
||||
"github.com/miekg/coredns/middleware/proxy"
|
||||
"github.com/miekg/coredns/middleware/test"
|
||||
"github.com/miekg/coredns/middleware/pkg/tls"
|
||||
|
||||
etcdc "github.com/coreos/etcd/client"
|
||||
"github.com/mholt/caddy"
|
||||
@@ -28,7 +29,8 @@ func newEtcdMiddleware() *Etcd {
|
||||
ctxt, _ = context.WithTimeout(context.Background(), etcdTimeout)
|
||||
|
||||
endpoints := []string{"http://localhost:2379"}
|
||||
client, _ := newEtcdClient(endpoints, "", "", "")
|
||||
tlsc, _ := tls.NewTLSConfigFromArgs()
|
||||
client, _ := newEtcdClient(endpoints, tlsc)
|
||||
|
||||
return &Etcd{
|
||||
Proxy: proxy.New([]string{"8.8.8.8:53"}),
|
||||
|
||||
Reference in New Issue
Block a user