Skip to content

feat(cli): prepare managed runtimes for the Traefik edge #5282

Open

Description

@tale-code-bot

Part of #5052, split off by TALE-226 (part 1: the Traefik edge and label-based routing for a Compose install).

What part 1 leaves

The managed runtime that tale deploy prepares for a pinned Tale revision is built from that revision's compose.yml and services/proxy/Caddyfile:

  • tools/cli/src/lib/deployment/runtime-prepare.ts reads both from the source commit. proxyPolicy() then rewrites the Caddyfile: it adds the operator-managed sign-up refusal and, while no organization creators are declared, the organization-capabilities and organization-create refusals, and it drops the docs vhost. The result ships as Caddyfile.production, mounted at /etc/caddy/Caddyfile.
  • tools/cli/src/lib/deployment/runtime-model.ts reads that bundle back and checks it (RUNTIME_FILES, the source and file hashes, the /etc/caddy/Caddyfile mount, the policy anchors).

Part 1 removes the Caddyfile, so a revision that carries it has no such file. The managed runtime keeps preparing 0.5 sources. A source without the Caddyfile is refused with a message that names this issue.

What this part does

  • Teach prepare, read and apply the Traefik topology of part 1:
    • the edge's own rules, rendered from env;
    • the routes that services declare with labels;
    • the docker-api service on its internal: true network.
  • Express the managed provisioning policy (sign-up refused, organization creation refused while no creators are declared) in the new edge, so the edge still answers before the backend.
  • Update the bundle files, their hashes and the checks, the tests (runtime-prepare.test.ts, runtime-apply.test.ts, runtime-test-helper.ts) and tools/cli/turbo.json's inputs.
  • Drop the refusal part 1 added, and keep 0.5 sources working while managed hosts lag the CLI.

Done when

  • The repository's own runtime source prepares, reads back and applies again ("prepares the repository's own runtime source" in runtime-prepare.test.ts).
  • The managed policy is proved on the Traefik edge.
  • A 0.5 source still prepares.

Like #5209, managed hosts need this before they can run 0.6.0.

Activity

  1. added
    feat
    agent-ready
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyfeat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions