You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Run the Kubernetes install's edge on Traefik with standard Ingress objects #5210
Part 3 of #5052 (Replace Caddy with Traefik fully), split off by the Lead's decision on #5052.
Goal
The Kubernetes install (docs/*/self-hosted/install/kubernetes.md) runs its public edge on Traefik instead of the Caddy Deployment, with each service's route declared in its own standard Ingress object (networking.k8s.io/v1), the Kubernetes counterpart of the container labels part 1 brings to Compose.
Decided
Traefik reads standard Ingress objects through its Kubernetes Ingress provider, watching only the tale namespace, with the narrowest read-only RBAC that works: a namespaced Role, and a ClusterRole only for what the provider cannot run without (an IngressClass lookup, for example), named in the plan. No cluster-wide CRDs. Traefik's IngressRoute CRD is used only where a plain Ingress cannot express a route the Caddyfile serves today; the plan names any such route and why.
Everything the Caddy proxy does today stays: routing per service, WebDAV and WebSocket pass-through, headers, compression, caching headers, the health endpoint, and the TLS modes the guide describes (selfsigned, letsencrypt, external behind another Ingress).
Done when
The guide's manifests apply in order on a fresh cluster (kind is enough) and serve the platform through Traefik; where the worker cannot run a cluster, what was not run is written down.
The guide is updated in en/de/fr.
Waits for part 1 (#5052) to land on feature-train. Line: feature.
Decision: the Traefik edge's Role may read the Secrets of tale on the unreleased feature line. The feature line does not release the Traefik edge on Kubernetes until the sandbox sessions run in a namespace of their own (#5386).
The question. The narrowest Role that Traefik's Ingress provider runs with includes list/watch on every Secret in tale. The spawner keeps each session's runnerd token and environment there (services/sandbox/src/backend/kubernetes/k8s-session-backend.ts:275, TALE_SESSION_ENV). Should we accept that, widen this task, or wait?
Options weighed:
Land as decided on Replace Caddy with Traefik fully #5052, with the guide saying plainly what the Role reads, and move the sessions out in a follow-up that gates the release. Cost: until the follow-up lands, the unreleased feature line carries the wider read.
Move the sessions inside this task. Cost: a change to the sandbox layout and its NetworkPolicy inside an edge change, and one larger review.
Hold this task until the move lands. Cost: work in flight stops, and the move edits the same guide this task rewrites.
Serve the routes from a namespace that holds no Secrets (Ingresses plus ExternalName Services). Cost: Traefik's allowExternalNameServices, a second hop for every route, and a pattern Tale uses nowhere else.
Decided: option 1.
Nothing released carries the wider read. main's edge is Caddy, with no RBAC, and release/0.6 is unreleased. So the read can be undone before it reaches anyone.
The handover cites the Traefik source line that forces the Secret informer, so @Reviewer can check it.
Nothing else in the plan changes.
Filed:#5386 (feat, security, priority high, Line: feature). It waits for this task to land on feature-train, and the feature line's release of this edge waits for it.
Who acts next:@coder goes on as planned. @Reviewer checks the guide's statement and the cited line.
The Kubernetes install's edge is the same tale-proxy image, switched to Traefik's Kubernetes Ingress provider with TALE_PROXY_PROVIDER=kubernetes.
The provider:
It watches only the tale namespace.
It uses ingressClass tale, allowEmptyServices=false and allowExternalNameServices=false.
It sets no ingressEndpoint, so it never writes Ingress status.
The routes:
Each routed service declares its routes in its own networking.k8s.io/v1 Ingress, one per Compose router, with ingressClassName: tale.
The routes use Traefik's annotations for path matcher, priority, @file middlewares and access logs.
No IngressRoute and no CRD.
Compose labels and Ingresses are rendered from one route table.
The fence:
Traefik hardcodes the IngressClass controller string, so any Traefik in the cluster with no ingressClass setting (k3s ships one) also claims the class tale.
The guide adds an ingress NetworkPolicy, tale-ingress-fence: every Pod in tale except the edge accepts traffic only from Pods in tale.
It also tells operators to scope any other Traefik to its own class.
RBAC:
A namespaced, read-only Role on services, secrets, endpointslices and ingresses.
A read-only ClusterRole on ingressclasses and nodes.
Regex paths: each regex is written as /{0} plus the unchanged regex, which keeps the ^ anchor and (?i).
ClusterRole: yes, read-only on ingressclasses and nodes.
Another controller:ingressClassName alone does not stop an unscoped Traefik. The fence keeps the edge the only way to the backends, and the kind run proves it with a second Traefik.
Writes: none.
Health and absent answers: readiness takes the place of Traefik's health checks. Traefik admits only Serving endpoints, so an unready Service drops its router and the edge answers. /api/health routes to platform. There is no platform-direct and no publishNotReadyAddresses, because Traefik ignores Ready-only endpoints. A draining replica gets the edge's JSON 503.
TLS: selfsigned and letsencrypt keep their state on proxy-data, with hostPort 80/443; the LoadBalancer alternative stays documented. For external, the cluster's own Ingress points at proxy:80, with TRUSTED_PROXIES set.
Docs ownership: this issue owns kubernetes.md in en/de/fr.
Rationale
Traefik claims IngressClasses by a fixed controller string, so the class field cannot be the only guard. A NetworkPolicy makes the edge the only way to the backends whichever controller claims the routes, and it uses the NetworkPolicy-enforcing CNI the guide already requires. One route table plus a drift test keeps Kubernetes equal to Compose. The health route follows what Traefik does, which is to filter endpoints on Serving.
refactor(cli): one route table, two renderers (M). Compose labels stay unchanged byte for byte, and regex anchoring is tested.
docs(self-hosted): Traefik edge in the Kubernetes guide (L). RBAC, IngressClass, fence, proxy-data, Ingresses placed per service, an external-mode example and the Secret statement. A drift test covers all three locales. The kind run covers the full route list, an unscoped second Traefik held off by the fence, and kubectl auth can-i. Depends on 1 and 2.
docs(self-hosted): upgrade from Caddy on Kubernetes (S). Depends on 3.
Activity
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
tale-review-bot commentedon Nov 5, 2026
Decision: the Traefik edge's Role may read the Secrets of
taleon the unreleased feature line. The feature line does not release the Traefik edge on Kubernetes until the sandbox sessions run in a namespace of their own (#5386).The question. The narrowest Role that Traefik's Ingress provider runs with includes
list/watchon every Secret intale. The spawner keeps each session's runnerd token and environment there (services/sandbox/src/backend/kubernetes/k8s-session-backend.ts:275,TALE_SESSION_ENV). Should we accept that, widen this task, or wait?Options weighed:
allowExternalNameServices, a second hop for every route, and a pattern Tale uses nowhere else.Decided: option 1.
main's edge is Caddy, with no RBAC, andrelease/0.6is unreleased. So the read can be undone before it reaches anyone.tale-sandbox.For this task:
Filed: #5386 (
feat,security, priority high, Line: feature). It waits for this task to land onfeature-train, and the feature line's release of this edge waits for it.Who acts next: @coder goes on as planned. @Reviewer checks the guide's statement and the cited line.
What would change this:
list/watchon Secrets.feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels
yannickmonney commentedon Nov 14, 2026
Decision
The Kubernetes install's edge is the same tale-proxy image, switched to Traefik's Kubernetes Ingress provider with
TALE_PROXY_PROVIDER=kubernetes.The provider:
talenamespace.tale,allowEmptyServices=falseandallowExternalNameServices=false.ingressEndpoint, so it never writes Ingress status.The routes:
networking.k8s.io/v1Ingress, one per Compose router, withingressClassName: tale.@filemiddlewares and access logs.The fence:
tale.tale-ingress-fence: every Pod intaleexcept the edge accepts traffic only from Pods intale.RBAC:
tale.The edge's own rules are unchanged from Compose.
Answers
owner!=helminformer./{0}plus the unchanged regex, which keeps the^anchor and(?i).ingressClassNamealone does not stop an unscoped Traefik. The fence keeps the edge the only way to the backends, and the kind run proves it with a second Traefik./api/healthroutes toplatform. There is noplatform-directand no publishNotReadyAddresses, because Traefik ignores Ready-only endpoints. A draining replica gets the edge's JSON 503.proxy-data, with hostPort 80/443; the LoadBalancer alternative stays documented. For external, the cluster's own Ingress points atproxy:80, with TRUSTED_PROXIES set.caddy-datauntil the new edge serves. Use Upgrade existing Compose installs from the Caddy proxy to Traefik #5209's importer where it exists; otherwise certificates are issued again.kubernetes.mdin en/de/fr.Rationale
Traefik claims IngressClasses by a fixed controller string, so the class field cannot be the only guard. A NetworkPolicy makes the edge the only way to the backends whichever controller claims the routes, and it uses the NetworkPolicy-enforcing CNI the guide already requires. One route table plus a drift test keeps Kubernetes equal to Compose. The health route follows what Traefik does, which is to filter endpoints on Serving.
Units (base: feature-train)
proxy-data, Ingresses placed per service, an external-mode example and the Secret statement. A drift test covers all three locales. The kind run covers the full route list, an unscoped second Traefik held off by the fence, andkubectl auth can-i. Depends on 1 and 2.feat(proxy): run the edge on Traefik with routes from container labels
feat(proxy): run the edge on Traefik with routes from container labels