feat: add the turbo-cache recipe (Turborepo remote cache) #7

Merged
crapougnax merged 2 commits from feat/6-turbo-cache-recipe into develop 2026-11-14 13:35:06 +00:00
Member

Closes #6

Change

New platform recipe turbo-cache: the open-source server ducktors/turborepo-remote-cache (MIT), pinned to 3.0.3, with artifacts in an S3-compatible bucket.

  • k8s/stacks/turbo-cache/base: Namespace, Deployment, Service, NetworkPolicy
  • .tycho/recipes/k8s/turbo-cache/package.json and five variables in .tycho/repository.json
  • secrets.dist.yaml, README.md and README.fr.md

The cache is an internal service: it has no public route, and the NetworkPolicy lets only the namespace forgejo-runner reach it. The README says what a deployment with clients outside the cluster must add.

Change to the forgejo-runner recipe (1.0.0 → 1.1.0)

The runner reads an optional Secret forgejo-runner-job-env (dotenv file) and gives its variables to every job. This is how jobs receive the address and the credentials of the cache, without any setting on a repository or an organisation.

  • base/configmap.yaml: runner.env_file
  • base/scaledjob.yaml: the Secret is mounted with optional: true
  • secrets.dist.yaml: template of the Secret

Without the Secret, the rendered runner behaves as before: the runner ignores a missing file. The ScaledJob template changes, so a deployment that upgrades rolls its runner jobs.

Verified

  • bun run validate passes; both bases render with kubectl kustomize.
  • The image runs locally as uid 1001 with a read-only root filesystem and all capabilities dropped: the status route answers, an artifact is written and read back with the token, a wrong token is refused.
  • env_file and the handling of a missing file were read in the source of the runner at v13.0.0.

Not verified: the S3 storage mode, the recipe on a cluster, and a job actually receiving the variables.

Known

The CI workflow of this repository still fails on the secret scan (x64 binary on arm64 runners); the fix is on fix/ci-runner-architecture.

🤖 Generated with Claude Code

Closes #6 ## Change New platform recipe `turbo-cache`: the open-source server `ducktors/turborepo-remote-cache` (MIT), pinned to 3.0.3, with artifacts in an S3-compatible bucket. - `k8s/stacks/turbo-cache/base`: Namespace, Deployment, Service, NetworkPolicy - `.tycho/recipes/k8s/turbo-cache/package.json` and five variables in `.tycho/repository.json` - `secrets.dist.yaml`, `README.md` and `README.fr.md` The cache is an internal service: it has no public route, and the NetworkPolicy lets only the namespace `forgejo-runner` reach it. The README says what a deployment with clients outside the cluster must add. ## Change to the `forgejo-runner` recipe (1.0.0 → 1.1.0) The runner reads an optional Secret `forgejo-runner-job-env` (dotenv file) and gives its variables to every job. This is how jobs receive the address and the credentials of the cache, without any setting on a repository or an organisation. - `base/configmap.yaml`: `runner.env_file` - `base/scaledjob.yaml`: the Secret is mounted with `optional: true` - `secrets.dist.yaml`: template of the Secret Without the Secret, the rendered runner behaves as before: the runner ignores a missing file. The ScaledJob template changes, so a deployment that upgrades rolls its runner jobs. ## Verified - `bun run validate` passes; both bases render with `kubectl kustomize`. - The image runs locally as uid 1001 with a read-only root filesystem and all capabilities dropped: the status route answers, an artifact is written and read back with the token, a wrong token is refused. - `env_file` and the handling of a missing file were read in the source of the runner at v13.0.0. Not verified: the S3 storage mode, the recipe on a cluster, and a job actually receiving the variables. ## Known The `CI` workflow of this repository still fails on the secret scan (x64 binary on arm64 runners); the fix is on `fix/ci-runner-architecture`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat: add the turbo-cache recipe (Turborepo remote cache) (#6)
Some checks failed
CI / CI (pull_request) Failing after 17s
57d0bd08ae
A stateless remote cache server for Turborepo builds, storing artifacts
in an S3-compatible bucket and exposed by Traefik with a cert-manager
certificate. It lets CI jobs on ephemeral runners reuse the work of
earlier jobs.

The container runs unprivileged with a read-only root filesystem. The
README states the trust model: one shared token, cache poisoning,
artifact signatures, and the lifecycle rule the bucket needs.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
TURBO_REMOTE_CACHE_READ_ONLY is deprecated in Turborepo 2.9 in favour of
TURBO_CACHE. A test against the server also showed that it must hold the
signature key for clients to accept artifacts back.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
crapougnax merged commit 78349f49c1 into develop 2026-11-14 13:35:06 +00:00
crapougnax deleted branch feat/6-turbo-cache-recipe 2026-11-14 13:35:06 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
tycho/catalog!7
No description provided.