From 3f1fd6d08c440be1961a9f6dbd0d24d2c538deb6 Mon Sep 17 00:00:00 2001 From: Miek Gieben Date: Mon, 3 Feb 2020 19:46:41 +0100 Subject: [PATCH] fixes Signed-off-by: Miek Gieben --- plugin/traffic/xds/client.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugin/traffic/xds/client.go b/plugin/traffic/xds/client.go index e9b593412..18be84a49 100644 --- a/plugin/traffic/xds/client.go +++ b/plugin/traffic/xds/client.go @@ -42,8 +42,8 @@ import ( var log = clog.NewWithPlugin("traffic: xds") const ( - cdsURL = "type.googleapis.com/envoy.api.v2.Cluster" - edsURL = "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment" + cdsURL = "type.googleapis.com/envoy.config.cluster.v3.Cluster" + edsURL = "type.googleapis.com/envoy.config.endpoint.v3.ClusterLoadAssignment" ) type adsStream xdspb.AggregatedDiscoveryService_StreamAggregatedResourcesClient @@ -74,6 +74,7 @@ func New(addr, node string, opts ...grpc.DialOption) (*Client, error) { Metadata: &structpb.Struct{ Fields: map[string]*structpb.Value{ "HOSTNAME": {Kind: &structpb.Value_StringValue{StringValue: hostname}}, + "BUILDV": {Kind: &structpb.Value_StringValue{StringValue: "CoreDNS"}}, "BUILDVERSION": {Kind: &structpb.Value_StringValue{StringValue: coremain.CoreVersion}}, }, }, @@ -165,7 +166,7 @@ func (c *Client) endpointDiscovery(stream adsStream, version, nonce string, clus return stream.Send(req) } -// receive receives from the stream, it handled both cluster and endpoint DiscoveryResponses. +// receive receives from the stream, it handles both cluster and endpoint DiscoveryResponses. func (c *Client) receive(stream adsStream) error { for { resp, err := stream.Recv()