Add pipe address support for xDS endpoints#6708
Conversation
📝 WalkthroughWalkthroughAdds support for domain socket (pipe) endpoints in xDS client endpoint conversion with a runtime guard rejecting pipes for STRICT_DNS clusters. Introduces comprehensive integration tests validating pipe routing, error handling, and mTLS communication over domain sockets. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as HTTP Client
participant Preprocessor as XdsHttpPreprocessor
participant Converter as XdsEndpointUtil
participant XDS as xDS Control Plane
participant Backend as Backend Server<br/>(Domain Socket)
Client->>Preprocessor: GET /hello (with xDS config)
Preprocessor->>XDS: Query listener/cluster config
XDS-->>Preprocessor: Return cluster with pipe endpoint
Preprocessor->>Converter: Convert Envoy endpoint
alt Pipe Address Detected
Converter->>Converter: Extract pipe path
Converter->>Converter: Create DomainSocketAddress
Converter-->>Preprocessor: Return pipe endpoint with attributes
else Non-Pipe Address
Converter->>Converter: Extract SocketAddress
Converter-->>Preprocessor: Return standard endpoint
end
Preprocessor->>Backend: Route request via domain socket
Backend-->>Preprocessor: HTTP 200 (body: "world")
Preprocessor-->>Client: HTTP 200 (body: "world")
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
🔍 Build Scan® (commit: 427b9fe) |
|
Gentle ping in case this PR was forgotten @ikhoon 🙇 |
ikhoon
left a comment
There was a problem hiding this comment.
Sorry for the late review. I thought I reviewed this PR. 😅
Subset of #6700
Motivation
Envoy's xDS API allows cluster endpoints to be addressed either via
socket_address(host:port) orpipe(Unix domain socket path).XdsEndpointUtilpreviously calledgetSocketAddress()unconditionally, so any xDS configuration with apipe:address — whether for a backend cluster or for the control plane itself (e.g. Istio's SDS server) — would silently return an empty address or produce a confusing error.Modifications
convertToEndpointnow checksaddress.hasPipe()before falling through togetSocketAddress(). Pipe endpoints are converted toDomainSocketAddressand returned as a properEndpointwith all the usual xDS attributes.strictDnsEndpointGroupraisesUnsupportedOperationExceptionearly if aSTRICT_DNScluster endpoint uses a pipe address, since DNS resolution over a Unix socket is not meaningful.at secrets are fetched and mTLS to the backend succeeds end-to-end.
Result
address.pipeis now supported