refactor(turbo-cache): keep the cache internal and let the runner hand it to jobs #9

Merged
crapougnax merged 1 commit from feat/6-turbo-cache-recipe into develop 2026-11-14 14:35:23 +00:00
Member

Closes #8

Context

Pull request 7 was merged before this rework was pushed: develop holds the first version of the recipe, with a public route. This pull request brings the rest of the branch. The description below covers the recipe as a whole; the diff only shows what changes since the merge.

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 #8 ## Context Pull request 7 was merged before this rework was pushed: `develop` holds the first version of the recipe, with a public route. This pull request brings the rest of the branch. The description below covers the recipe as a whole; the diff only shows what changes since the merge. ## 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)
The cache only serves CI runners of the same cluster: drop the public route and its
certificate, and restrict access to the runner namespace with a NetworkPolicy.

The forgejo-runner recipe (1.1.0) reads an optional Secret of environment variables given
to every job, so that a repository needs no cache setting of its own.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
crapougnax merged commit 3fdca6463d into develop 2026-11-14 14:35:23 +00:00
crapougnax deleted branch feat/6-turbo-cache-recipe 2026-11-14 14:35:23 +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!9
No description provided.