Skip to content

feat: integrate MCS phase-1 + TCP-over-mTLS floor (proposal 018) - #295

Merged
bpalermo merged 4 commits into
mainfrom
integrate-agents
Jun 24, 2026
Merged

bpalermo merged 4 commits into
mainfrom
integrate-agents

Conversation

@bpalermo

Copy link
Copy Markdown
Owner

Integrates two worktree-agent PRs onto main (resolving their shared Chart.yaml/labels.go and the 0.35.0 version collision with #292), verified building + testing together (57/57). Supersedes #293 and #294.

MCS phase 1 (was #293)

Kubernetes MCS-API conformance objects (ServiceExport/ServiceImport/clusterset.local VIPs) backed by the origin-partitioned registry; control-plane only, default-off (registrar.enableMCS, etcd-only). New registry/export, registrar/internal/mcs/{export_controller,import_generator}, RBAC.

TCP-over-mTLS floor (was #294)

Protocol-detect (tls_inspector) + a per-ClusterIP tcp_proxy-over-mTLS floor chain on the capture listener and inbound :15008, selected by an appProtocol annotation on generated mesh Services. Inert for HTTP services (the floor chain is emitted only for non-HTTP appProtocol; all current services are HTTP → no behavior change), keeping SPIRE mTLS + the EDS SPIFFE SAN for non-HTTP traffic. ALPN aether-tcp signals the inbound floor.

Chart 0.35.0 → 0.36.0 (aether). Co-authored agent work.

Co-Authored-By: Claude Opus 4.8 [email protected]

bpalermo and others added 4 commits June 24, 2026 08:29
…gistry (phase 1)

Multi-cluster MCS-API phase 1 (proposals 018 + 006): make aether conformant to
the Kubernetes Multi-Cluster Services objects, backed by the origin-partitioned
registry as the cross-cluster plane (not cross-cluster DNS, not EndpointSlice
import). DNS stays strictly local: each cluster materializes its own
clusterset.local VIPs from its own registry view.

Control-plane plumbing only (default OFF behind registrar.enableMCS):

- registry.ServiceExporter capability + etcd backend impl: export marks live
  under each instance's own origin partition (<ownPrefix>/exports/<service> =
  namespace); ListExports ranges the whole root and returns the clusterset-wide
  union with the origin cluster parsed from the key.
- mcs.ExportController (leader-elected): watches ServiceExport, records/clears the
  registry export mark for the backing Service, and reconciles Valid/Ready
  status conditions (NoService/InvalidServiceType handled).
- mcs.ImportGenerator (leader-elected Runnable): materializes a ServiceImport
  (ClusterSetIP, status.clusters) + a LOCAL selectorless clusterset.local VIP
  Service per service exported anywhere in the clusterset, mirroring the existing
  mesh-Service generator (prune-by-label, never clobbers user objects). No
  EndpointSlice import — endpoints stay in the registry.
- Requires the etcd backend (cross-cluster plane); hard error on kubernetes/
  dynamodb. Chart gates RBAC (serviceexports/serviceimports + status, Services)
  and the --enable-mcs flag; the upstream MCS CRDs install separately.

Clean seams left for the cross-cluster data path (out of scope here): the proxy
resolves cross-cluster endpoints via registry EDS at dial time (the registry
endpoint can carry a remote pod IP or an east-west-gateway addr); per-app-port
ServiceImport ports; cross-cluster SPIRE trust; replication/failover.

Tests: export->registry + status, registry->import/VIP projection, multi-cluster
merge, prune, no-clobber (fake client + fake exporter); etcd cross-origin export
integration test against a real etcd container.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
Implements proposal 018 Phase 3a: a TCP passthrough path alongside the existing
HTTP/gRPC HCM path for transparent capture. Non-HTTP services get per-ClusterIP
tcp_proxy floor chains on the outbound capture listener (prefix_ranges /32 match)
and the inbound :15008 listener gains an ALPN-demuxed TCP floor chain
(application_protocols: ["aether-tcp"]) so source-proxy TCP connections bypass
the HCM entirely and are forwarded directly to the pod's app cluster over SPIRE
mTLS with SPIFFE SAN pinning. HTTP services are intentionally excluded to avoid
filter-chain precedence conflicts (destination-IP > application-protocol).

- common/constants: AnnotationMeshAppProtocol annotation for registry-generated Services
- registrar/services: generator writes "http" annotation on all PROTOCOL_HTTP services
- capture/reconciler: SetCaptureTCPServices — projects non-HTTP services to the cache
- proxy/capture: tls_inspector listener filter, buildCaptureTCPFloorFilterChain,
  AetherTCPALPN constant, CaptureTCPService proxy-layer type
- proxy/ingress: buildInboundTCPFloorFilterChain (ALPN match → tcp_proxy → app cluster)
- proxy/networkfilter: buildTCPProxyNetworkFilter helper
- proxy/egress: TCPClusterName, NewTCPServiceCluster, InjectUpstreamTCPMTLS
- proxy/transportsocket: UpstreamTCPTransportSocket (ALPN "aether-tcp" override)
- proxy/transportsocketmatch: UpstreamTCPTransportSocketMatches
- cache: captureTCPClusters, SetCaptureTCPServices (with live per-pod listener rebuild),
  cniPod stored in listenerEntry for regeneration on TCP-service set changes

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
…ate-agents

# Conflicts:
#	common/constants/labels.go
@bpalermo
bpalermo merged commit 488627f into main Jun 24, 2026
5 checks passed
@bpalermo
bpalermo deleted the integrate-agents branch June 24, 2026 11:40
bpalermo added a commit that referenced this pull request Jul 2, 2026
…ped (#460) (#463)

The 'in progress / not yet shipped' list was fully stale: the TCP-over-mTLS floor
(#295/#304), Phase 3b L4 routes (#296), VirtualHost retirement (#292), MCS phase 1,
and conformance (both profiles hard-gated) have all landed. Documents the tcp
protocol-declaration chain (endpoint.aether.io/protocol -> PROTOCOL_TCP ->
aether.io/app-protocol -> /32 floor chain) and the destination-IP-beats-ALPN
filter-chain-match gotcha.


Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S

Co-authored-by: Claude Opus 4.8 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant