Repository navigation
feat(edge): downstream TLS termination from a Kubernetes TLS Secret - #239
Merged
Merged
Conversation
Let the edge listener terminate external (north-south) TLS from a mounted k8s TLS
Secret. The edge->pod upstream hop stays mTLS either way; only the external
client->edge leg gains TLS.
- proxy: BuildEdgeListener takes an optional *EdgeTLS (cert/key file paths). When
set, the filter chain gets a DownstreamTlsContext serving those files; it does
NOT require a client certificate (external callers have no mesh identity). Cert
is mounted as files (no SDS) — rotating the Secret takes effect on the next edge
pod roll.
- cache: SetEdgeTLS stores the cert/key paths; Listeners() passes them through in
edge mode.
- agent: `agent edge` gains --edge-tls-cert-file/--edge-tls-key-file.
- chart: edge.tls.{enabled,secretName,mountPath} mounts the Secret into the Envoy
container, passes the flags, sets the readiness probe scheme to HTTPS, and
requires secretName when enabled. aether chart 0.7.0 -> 0.8.0.
Tests cover the TLS and plain-HTTP listener variants. Renders both ways; the
secretName guard fires when missing.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
bpalermo
added a commit
that referenced
this pull request
Jun 19, 2026
…eRoutes Add the edge-proxy proposal doc reflecting what shipped across #236–#239 (single-identity agent edge control plane, Envoy-talks-SPIRE-SDS-directly, the EdgeRoute CRD, the edge.enabled chart, downstream TLS), resolving the docs/proposals/003_edge-proxy.md references already in the code/chart comments. Also adds test/e2e/edge: a manual talos-main runbook (enable the edge, expose a service, drive traffic, assert direct-to-pod + edge identity in XFCC + hitless rollout + live route changes) and example EdgeRoute manifests (host-based and multi-port). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
bpalermo
added a commit
that referenced
this pull request
Jun 19, 2026
…eRoutes Add the edge-proxy proposal doc reflecting what shipped across #236–#239 (single-identity agent edge control plane, Envoy-talks-SPIRE-SDS-directly, the EdgeRoute CRD, the edge.enabled chart, downstream TLS), resolving the docs/proposals/003_edge-proxy.md references already in the code/chart comments. Also adds test/e2e/edge: a manual talos-main runbook (enable the edge, expose a service, drive traffic, assert direct-to-pod + edge identity in XFCC + hitless rollout + live route changes) and example EdgeRoute manifests (host-based and multi-port). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY
bpalermo
added a commit
that referenced
this pull request
Jun 19, 2026
…eRoutes (#240) * docs(edge): proposal 003 (as-built) + talos e2e runbook + example EdgeRoutes Add the edge-proxy proposal doc reflecting what shipped across #236–#239 (single-identity agent edge control plane, Envoy-talks-SPIRE-SDS-directly, the EdgeRoute CRD, the edge.enabled chart, downstream TLS), resolving the docs/proposals/003_edge-proxy.md references already in the code/chart comments. Also adds test/e2e/edge: a manual talos-main runbook (enable the edge, expose a service, drive traffic, assert direct-to-pod + edge identity in XFCC + hitless rollout + live route changes) and example EdgeRoute manifests (host-based and multi-port). Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY * docs(edge): correct exposure wording — external host only, no mesh FQDN, no --expose Align the proposal doc and e2e assets with the routing fix (#241): the edge routes ONLY by explicit external host; the internal mesh FQDN is not an edge entrypoint and `hosts` is required. Drop the removed `--expose` seed from the doc, runbook, and example. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
bpalermo
added a commit
that referenced
this pull request
Jun 19, 2026
…ct (#244) Replace the v1 file-mounted single-cert edge TLS (#239) with real ingress TLS: per-host certs, hot rotation, and an HTTP->HTTPS redirect. - EdgeRoute.spec.tls{secret_name, provider} references a cert (BYO / cert-manager). provider is a SecretProvider ENUM (kubernetes now; aws-secrets-manager reserved). - New agent/internal/edge/secret: a pluggable Provider interface + Registry (enum dispatch, provider-prefixed SDS names "<scheme>/<ref>"); kubernetesProvider reads a kubernetes.io/tls Secret. New backends = new enum value + Provider impl, no listener/SDS changes. - The edge agent watches EdgeRoutes + their Secrets, resolves cert bytes, and serves them to Envoy over the agent's ADS SecretType channel (cache.SetSecrets, free since upstream certs come from SPIRE directly). Envoy selects the cert by SNI. Rotation is event-driven (Secret watch) with no pod roll. - Listeners: TLS-terminating listener on httpsPort (one DownstreamTlsContext with N SDS certs, no client cert, min TLS 1.2, ALPN h2/http1.1) + a :80 listener that 301-redirects to https. Plain HTTP when TLS off. - Chart: edge.tls.enabled (+ edge.httpsPort, service.httpsPort); deployment passes --edge-tls/--edge-https-port, adds the :443 port + HTTPS readiness, NET_BIND_SERVICE covers 443; Service exposes https; edge Role gains secrets get/list/watch. Drops the mounted-Secret path. chart 0.11.0 -> 0.12.0. Removed: the file-based EdgeTLS struct, edge-tls cert/key flags, mounted Secret. Tests: kubernetesProvider + Registry (fake client); SDS downstream socket (ADS, no client cert, TLS params); redirect listener (301 https); cache TLS-mode two-listener set + SecretType cert; reconciler resolves provider/ref -> SDS name + bytes (and tolerates an unresolvable ref). Claude-Session: https://claude.ai/code/session_01Pihqn5RmVPhV9HTdBnqbvY Co-authored-by: Claude Opus 4.8 <[email protected]>
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.
What
PR4 of the edge proxy plan (stacked on #238). Lets the edge listener terminate external (north-south) TLS from a mounted Kubernetes TLS Secret. The edge→pod upstream hop stays mTLS either way — only the external client→edge leg gains TLS.
Changes
BuildEdgeListenertakes an optional*EdgeTLS{CertPath, KeyPath}. When set, the filter chain gets aDownstreamTlsContextserving those files and does not require a client certificate (external callers have no mesh identity). The cert is mounted as files (no SDS); rotating the Secret takes effect on the next edge pod roll.SetEdgeTLSstores the cert/key paths;Listeners()passes them through in edge mode.agent edgegains--edge-tls-cert-file/--edge-tls-key-file.edge.tls.{enabled,secretName,mountPath}mounts the Secret into the Envoy container, passes the flags, switches the readiness probe toscheme: HTTPS, andrequiredssecretNamewhen enabled. Chart0.7.0 → 0.8.0.Tests
Unit tests cover the TLS and plain-HTTP listener variants (transport socket present/absent, no client-cert requirement, file paths).
helm templaterenders both ways; thesecretNameguard errors when missing. Build, full proxy/cache/cmd tests, lint, and format pass.Follow-up
🤖 Generated with Claude Code