aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Miek Gieben <miek@miek.nl> 2020-07-14 13:55:19 +0200
committerGravatar Miek Gieben <miek@miek.nl> 2020-07-14 13:55:19 +0200
commite177ae25a47a7b241993b2e74b876a1072bd2a9e (patch)
tree2b30a196892c3244411b419ceb15c2ad4118c163
parent45ff6dd1c497d98642c66cf979e40a01c88f45e8 (diff)
downloadcoredns-e177ae25a47a7b241993b2e74b876a1072bd2a9e.tar.gz
coredns-e177ae25a47a7b241993b2e74b876a1072bd2a9e.tar.zst
coredns-e177ae25a47a7b241993b2e74b876a1072bd2a9e.zip
Fully go to v2 of the xds proto
Signed-off-by: Miek Gieben <miek@miek.nl>
-rw-r--r--plugin/traffic/README.md2
-rw-r--r--plugin/traffic/setup.go4
-rw-r--r--plugin/traffic/traffic.go4
3 files changed, 5 insertions, 5 deletions
diff --git a/plugin/traffic/README.md b/plugin/traffic/README.md
index abb95eae6..51e4c16e0 100644
--- a/plugin/traffic/README.md
+++ b/plugin/traffic/README.md
@@ -11,7 +11,7 @@ of clusters. A cluster is defined as: "A group of logically similar endpoints th
connects to." Each cluster has a name, which *traffic* extends to be a domain name. See "Naming
Clusters" below.
-The use case for this plugin is when a cluster has endpoints running in multiple (Kubernetes?)
+The use case for this plugin is when a cluster has endpoints running in multiple (e.g. Kubernetes)
clusters and you need to steer traffic to (or away) from these endpoints, i.e. endpoint A needs to
be upgraded, so all traffic to it is drained. Or the entire Kubernetes needs to upgraded, and *all*
endpoints need to be drained from it.
diff --git a/plugin/traffic/setup.go b/plugin/traffic/setup.go
index dfe6b0ccb..853557165 100644
--- a/plugin/traffic/setup.go
+++ b/plugin/traffic/setup.go
@@ -12,7 +12,7 @@ import (
"github.com/coredns/coredns/plugin/metrics"
clog "github.com/coredns/coredns/plugin/pkg/log"
"github.com/coredns/coredns/plugin/pkg/parse"
- pkgtls "github.com/coredns/coredns/plugin/pkg/tls"
+ ctls "github.com/coredns/coredns/plugin/pkg/tls"
"github.com/coredns/coredns/plugin/pkg/transport"
"github.com/coredns/coredns/plugin/traffic/xds"
@@ -121,7 +121,7 @@ func parseTraffic(c *caddy.Controller) (*Traffic, error) {
return nil, c.ArgErr()
}
- tlsConfig, err = pkgtls.NewTLSConfigFromArgs(args...)
+ tlsConfig, err = ctls.NewTLSConfigFromArgs(args...)
if err != nil {
return nil, err
}
diff --git a/plugin/traffic/traffic.go b/plugin/traffic/traffic.go
index 1bf36006d..f18842a1b 100644
--- a/plugin/traffic/traffic.go
+++ b/plugin/traffic/traffic.go
@@ -13,7 +13,7 @@ import (
"github.com/coredns/coredns/plugin/traffic/xds"
"github.com/coredns/coredns/request"
- corepb "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
+ corepb2 "github.com/envoyproxy/go-control-plane/envoy/api/v2/core"
"github.com/miekg/dns"
)
@@ -129,7 +129,7 @@ func (t *Traffic) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg
m.Answer = append(m.Answer, &dns.TXT{
Hdr: dns.RR_Header{Name: state.QName(), Rrtype: dns.TypeTXT, Class: dns.ClassINET, Ttl: 5},
- Txt: []string{"100", "100", strconv.Itoa(int(sa.Port())), target, corepb.HealthStatus_name[int32(sa.Health)]}})
+ Txt: []string{"100", "100", strconv.Itoa(int(sa.Port())), target, corepb2.HealthStatus_name[int32(sa.Health)]}})
m.Extra = append(m.Extra, &dns.TXT{Hdr: dns.RR_Header{Name: target, Rrtype: dns.TypeTXT, Class: dns.ClassINET, Ttl: 5}, Txt: []string{sa.Address().String()}})
}
default: