Skip to content

Commit 872a6f1

Browse files
authored
xds/c2p: fix default client resource template, and xds-client target scheme (#5010)
1 parent 58beff1 commit 872a6f1

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

xds/googledirectpath/googlec2p.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import (
4949
const (
5050
c2pScheme = "google-c2p"
5151

52-
tdURL = "directpath-pa.googleapis.com"
52+
tdURL = "dns:///directpath-pa.googleapis.com"
5353
httpReqTimeout = 10 * time.Second
5454
zoneURL = "http://metadata.google.internal/computeMetadata/v1/instance/zone"
5555
ipv6URL = "http://metadata.google.internal/computeMetadata/v1/instance/network-interfaces/0/ipv6s"
@@ -110,6 +110,7 @@ func (c2pResolverBuilder) Build(t resolver.Target, cc resolver.ClientConn, opts
110110
TransportAPI: version.TransportV3,
111111
NodeProto: newNode(<-zoneCh, <-ipv6CapableCh),
112112
},
113+
ClientDefaultListenerResourceNameTemplate: "%s",
113114
}
114115

115116
// Create singleton xds client with this config. The xds client will be

xds/googledirectpath/googlec2p_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ func TestBuildXDS(t *testing.T) {
217217
TransportAPI: version.TransportV3,
218218
NodeProto: wantNode,
219219
},
220+
ClientDefaultListenerResourceNameTemplate: "%s",
220221
}
221222
if tt.tdURI != "" {
222223
wantConfig.XDSServer.ServerURI = tt.tdURI

0 commit comments

Comments
 (0)