GRM-173: Runner resource leases and scoped disk cleanup #282

Merged
kireto merged 8 commits from GRM-173-runner-resource-leases into master 2026-09-22 17:07:50 +00:00
Showing only changes of commit 7dfdee8b31 - Show all commits
+8 -9
View File
@@ -23,16 +23,15 @@ remove an object whose `lease-until` is in the future; expired leases are
reclaimable. Existing `GITEA-ACTIONS-TASK` name-prefix and `status=exited`
guards are retained for unlabeled objects.
REQ-2: Introduce a single shared cleanup script
(`runner-cleanup.sh`, templated next to the healthcheck script) invoked with
`--tier routine|pressure|critical`. It replaces all inline prune logic in
`docker-prune.service` and the healthcheck. Every prune is scoped: volumes and
networks get `label!=`/`until=` filters at every tier (no unfiltered volume or
network prune remains); images matching `gitea_runner_keep_images` are never
removed, so warm base layers survive critical pressure.
REQ-2: Introduce a single shared cleanup script (`runner-cleanup.sh`,
templated next to the healthcheck script) invoked with
`--tier routine|pressure|critical`, replacing all inline prune logic in
`docker-prune.service` and the healthcheck. Every prune is scoped (leases,
`until=` where supported); images matching `gitea_runner_keep_images` are
never removed, so warm base layers survive critical pressure.
REQ-3: Watermark-tiered behavior. `routine` (timer) prunes aged resources only.
`pressure` (disk >= warn) prunes unowned resources older than 1h. `critical`
REQ-3: Watermark-tiered behavior: `routine` (timer) prunes aged resources;
`pressure` (disk >= warn) prunes unowned resources older than 1h; `critical`
(disk >= critical) drops age limits but still honors leases, keep-images, and
never removes running or `GITEA-ACTIONS-TASK` containers.