google-c2p resolver: add authority entry to bootstrap config (#29732)

* google-c2p resolver: add authority entry to bootstrap config

* clang-format
This commit is contained in:
Mark D. Roth 2022-05-19 14:17:10 -07:00 committed by GitHub
parent ef6a5b92c9
commit 82935bdb2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 12 deletions

View File

@ -381,19 +381,26 @@ void GoogleCloud2ProdResolver::StartXdsResolver() {
override_server != nullptr && strlen(override_server.get()) > 0
? override_server.get()
: "directpath-pa.googleapis.com";
Json xds_server = Json::Array{
Json::Object{
{"server_uri", server_uri},
{"channel_creds",
Json::Array{
Json::Object{
{"type", "google_default"},
},
}},
{"server_features", Json::Array{"xds_v3"}},
},
};
Json bootstrap = Json::Object{
{"xds_servers",
Json::Array{
Json::Object{
{"server_uri", server_uri},
{"channel_creds",
Json::Array{
Json::Object{
{"type", "google_default"},
},
}},
{"server_features", Json::Array{"xds_v3"}},
},
{"xds_servers", xds_server},
{"authorities",
Json::Object{
{"traffic-director-c2p.xds.googleapis.com",
Json::Object{
{"xds_servers", std::move(xds_server)},
}},
}},
{"node", std::move(node)},
};