forgejo/prune: prune every Docker daemon, cap builder cache by age, alert on growth
The nightly CronJob reported Complete while never reclaiming build cache: docker 27/buildx 0.20.1 accepts --keep-storage and --max-used-space but returns 'Total: 0B' for both (measured: 21.44GB cache with a 20GB cap, and 541MB cache with a 100MB cap). The comment claiming 53GB reclaimed was true on an older CLI and is now false. --filter until= does reclaim, so the cash cap is enforced by walking age windows down (72h -> 0s) and stopping as soon as the cache is under the cap. Coverage is now every daemon, discovered not listed: the Pi host socket and every in-cluster dind pod matching label app=forgejo-runner with a dind container, pruned over pods/exec with a namespace-scoped ServiceAccount, so the arm64 dind migration is picked up without editing this job. Busy guard skips a daemon with a live build and still exits 0. Named volumes are never pruned; their sizes are printed every run. Adds PrometheusRule forgejo-prune: cronjob staleness/failure plus node filesystem high-watermark.
This commit is contained in:
parent
e63af123c5
commit
f1fcf21a94
3 changed files with 497 additions and 28 deletions
|
|
@ -7,6 +7,7 @@ resources:
|
|||
- release.yaml
|
||||
- httproute.yaml
|
||||
- gateway-probe.yaml
|
||||
- prune-alerts.yaml
|
||||
- dashboards
|
||||
configMapGenerator:
|
||||
- name: kube-prometheus-stack-values
|
||||
|
|
|
|||
Loading…
Reference in a new issue