envoy icon indicating copy to clipboard operation
envoy copied to clipboard

upstream: Add network namespace for upstream binding

Open tonya11en opened this issue 5 months ago • 6 comments

Add network namespace for upstream binding

This change builds upon #39517 to add network namespace support for client/outbound connections via the upstream bind config.

The UpstreamBindConfig (both at the bootstrap/cluster_manager level and per-cluster) now supports network_namespace_filepath within its source_address. When specified on Linux, connections initiated by the cluster to upstream hosts will attempt to bind to the source_address within the designated network namespace.

Validation has also been added to prevent individual Host definitions (e.g., in static clusters or EDS) from specifying a network namespace directly with their address. Network namespace configuration is intended to be set in the listener or bind configuration- it is meaningless for hosts.

Risk Level: Low. Testing: Unit tests Docs Changes: Proto description updated. Release Notes: Done. Platform Specific Features: Linux.

Fixes https://github.com/envoyproxy/envoy/issues/38947

tonya11en avatar Jun 06 '25 22:06 tonya11en

CC @envoyproxy/api-shepherds: Your approval is needed for changes made to (api/envoy/|docs/root/api-docs/). envoyproxy/api-shepherds assignee is @markdroth CC @envoyproxy/api-watchers: FYI only for changes made to (api/envoy/|docs/root/api-docs/).

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/39782 was opened by tonya11en.

see: more, trace.

/retest

tonya11en avatar Jun 12 '25 15:06 tonya11en

CI failures are likely related to the ongoing GCP outage.. we'll wait it out and try again.

tonya11en avatar Jun 12 '25 19:06 tonya11en

CC @envoyproxy/coverage-shephards: FYI only for changes made to (test/coverage.yaml). envoyproxy/coverage-shephards assignee is @RyanTheOptimist

:cat:

Caused by: https://github.com/envoyproxy/envoy/pull/39782 was synchronize by tonya11en.

see: more, trace.

/lgtm api

markdroth avatar Jun 18 '25 20:06 markdroth

/retest

tonya11en avatar Jun 18 '25 21:06 tonya11en

@wbpcode tests are green, so this is ready for review now

tonya11en avatar Jun 26 '25 19:06 tonya11en

/retest

tonya11en avatar Jul 25 '25 21:07 tonya11en