Repository navigation
docs: proposal 034 — UDS support for pods - #134
Merged
Merged
Conversation
Plan for letting pods serve on and dial the mesh via Unix domain sockets, in two phases (inbound first). Pathname UDS is mount-namespace-scoped, so the design bridges pod emptyDir volumes to the node proxy through kubelet's pod-volumes directory; abstract sockets and workload hostPath mounts are evaluated and rejected. Registry/EDS endpoints stay TCP :15008, so UDS pods are indistinguishable from TCP pods to clients. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…doc renumber+revision follows)
Renumber 002 -> 034 (002 is taken by the merged agent-concurrency audit) and revise every code reference after two months of drift: - Ports post-030: inbound is 18008 (defaultInboundPort); the outbound listener is unchanged at 18081 (mesh.ProxyOutboundPort) - Multi-port routing (005): delivery is app_<pod>_<port>, so the original "port is ignored for delivery" semantic is REVERSED — port(s) stay required for demux/EDS; the annotation only changes what the app cluster dials (one socket serves all declared ports) - Redirect-all (022) + mesh DNS narrowed Phase 2's audience; keep it, priority lowered, re-evaluate after Phase 1 - E/W waypoint (019) and cleartext inbound (#421) confirmed covered for free (delivery sits behind the inbound listener) - New facts folded in: UID already fetched but deliberately not persisted (resubscribe.go), storage is protojson in agent/storage, builder is exported GenerateOutboundHTTPListener with the 025/#470 extension union (hoisted per-loop in #615), authz emptyDir socket (#499) documented as the intra-pod precedent (cross-pod still needs the kubelet hostPath), RESULT_IGNORED unmanaged pods, TCP connect-probe analogue on pipes - New constraint: the kubelet-pods mount must not be readOnly (connect(2) on AF_UNIX needs write on the inode; EROFS otherwise) Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Design proposal 034: UDS support for pods, both directions, phased.
endpoint.aether.io/uds-socket: <volume>/<file>. The per-(pod, port)app_<pod>_<port>andhealth_<pod>clusters dial the socket as an EnvoyPipeaddress (noUpstreamBindConfig— UDS is mount-namespace-scoped).endpoint.aether.io/port(s)stays required: ports name the service ports for inbound demux and EDS; the annotation only changes what the app cluster dials, and one socket serves all declared ports. The inbound mTLS listener and registry/EDS endpoints stay TCPpod_ip:18008, so a UDS pod is indistinguishable from a TCP pod to every client — same node, cross-node, cross-cluster, through the E/W waypoint, and under the SPIRE-off cleartext inbound.egress.aether.io/socketUDS listener — a filesystem-permissioned, capture-independent entry with nativeunix://gRPC targets, additive to127.0.0.1:18081. With redirect-all and mesh DNS as the default path, this serves a narrower audience (capture-opt-out pods,unix://-native clients); it ships only after Phase 1 proves demand, behind a hot-restart pipe-inheritance spike.Core mechanism: pathname UDS lives in the mount namespace, so the bridge is kubelet's pod-volumes dir — a socket in a workload
emptyDiris host-visible at/var/lib/kubelet/pods/<UID>/volumes/kubernetes.io~empty-dir/<vol>/<file>. The proxy DaemonSet mounts that hostPath at the identical container path (HostToContainer, not readOnly —connect(2)onAF_UNIXneeds write permission on the socket inode, so an RO mount failsEROFSeven for root), gated byproxy.udsWorkloads.enabled. Abstract-namespace sockets, workload hostPath mounts, and proxy-shared emptyDirs are evaluated and rejected in the doc (the last works intra-pod only — the #499 authz socket — never cross-pod).Shared plumbing (PR 1 of 5):
CNIPod.uid = 11— the CNI server already fetches the Pod UID for SPIRE selectors but drops it; persisting it in storage lets listener replay resolve pipe paths without the API server — plus a traversal-rejecting annotation→host-path resolver behind a--kubelet-pods-dirflag.🤖 Generated with Claude Code
https://claude.ai/code/session_01EioJVuoepwStjHoRLB52WR