Add monthly CronJob to clean ARC runner cargo/npm caches#164
Open
brandonrc wants to merge 1 commit into
Open
Conversation
cargo-home/registry/{src,cache} and the npm cache on the shared
/home/runner-cache hostPath grow unboundedly (~750M today). Add a
monthly busybox CronJob (05:00 on the 1st, quiet hour) that prunes
them; cargo/npm re-fetch on demand.
Deliberately untouched: sccache/ (self-evicts via SCCACHE_CACHE_SIZE)
and cargo-home/bin (baked tool binaries). concurrencyPolicy Forbid +
30min deadline; the race against a live cargo build is documented and
accepted — a CI retry recovers.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Missing linked issueThis PR does not reference a tracking issue in its body. Every PR must link to an issue in this repository so we can trace work back to a planned change. How to fix
Accepted keywords (case-insensitive, any tense): Policy reference: see the PR template. Maintainer bypass: apply the |
Contributor
Author
Apply + test-fire evidence (node
|
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.
Summary
e2e/runner-cache-cleanup-cronjob.yaml(follows the e2e/ raw-manifest pattern, e.g.dind-registry-mirror-configmap.yaml)0 5 1 * *) inarc-runnersthat mounts the shared/home/runner-cachehostPath and prunes:cargo-home/registry/src/*andcargo-home/registry/cache/*(~750M today; cargo re-fetches on demand)npm/*(npm cache)sccache/(self-evicts viaSCCACHE_CACHE_SIZE) andcargo-home/bin(baked tool binaries)concurrencyPolicy: Forbid,activeDeadlineSeconds: 1800,runAsUser: 0(cache files are root-created), busybox imageRace with live CI jobs
Deleting registry files while a cargo build reads them can fail that build. Kept simple per scope: scheduled at 05:00 on the 1st (quiet hour), risk documented in the manifest header; cargo re-downloads missing files in most cases and a CI retry recovers otherwise. No in-cluster kubectl/RBAC added.
Test plan
kubectl apply --dry-run=servercleankubectl create job --from=cronjob/runner-cache-cleanupcompleted, logs show correct paths cleaned and sccache/cargo-home/bin skipped (evidence in comments)🤖 Generated with Claude Code