Change flag used by the xds client example from --secure to --xds-creds. This would be consistent with the user guide https://cloud.google.com/service-mesh/docs/service-routing/security-proxyless-setup#c++_2 where it says to use --xds-creds. It would also make it consistnt with other language examples -x the Python example xds client https://github.com/grpc/grpc/blob/master/examples/python/xds/client.py#L47 and the Java example xds client https://github.com/grpc/grpc-java/blob/master/examples/example-xds/src/main/java/io/grpc/examples/helloworldxds/XdsHelloWorldClient.java#L74

pull/37776/head
Kannan J 2 months ago
parent 571adaf2a0
commit d627d17966
  1. 4
      examples/cpp/xds/xds_greeter_client.cc

@ -34,7 +34,7 @@
#endif
ABSL_FLAG(std::string, target, "xds:///helloworld:50051", "Target string");
ABSL_FLAG(bool, secure, true, "Secure mode");
ABSL_FLAG(bool, xds_creds, true, "Secure mode");
using grpc::Channel;
using grpc::ClientContext;
@ -98,7 +98,7 @@ int main(int argc, char** argv) {
absl::ParseCommandLine(argc, argv);
GreeterClient greeter(grpc::CreateChannel(
absl::GetFlag(FLAGS_target),
absl::GetFlag(FLAGS_secure)
absl::GetFlag(FLAGS_xds_creds)
? grpc::XdsCredentials(grpc::InsecureChannelCredentials())
: grpc::InsecureChannelCredentials()));
std::string user("world");

Loading…
Cancel
Save