[CSM Observability] Add option to use Xds server (#38194)

We already have the option to use Xds credentials based on `secure_mode`
flag, this PR add the ability to create Xds server based on the same
flag.
<!--

If you know who should review your pull request, please assign it to
that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the
appropriate
lang label.

-->
pull/38200/head
Xuan Wang 3 months ago committed by GitHub
parent fb03c50c28
commit a428e2cea0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      examples/python/observability/csm/csm_greeter_server.py

@ -69,7 +69,8 @@ def _run(
csm_plugin = _prepare_csm_observability_plugin(prometheus_endpoint)
csm_plugin.register_global()
server = grpc.server(
futures.ThreadPoolExecutor(max_workers=_THREAD_POOL_SIZE)
futures.ThreadPoolExecutor(max_workers=_THREAD_POOL_SIZE),
xds=secure_mode,
)
_configure_test_server(server, port, secure_mode, server_id)
server.start()

Loading…
Cancel
Save