Gitea package storage was confirmed as the dominant storage consumer under the Gitea PVC.
Observed before cleanup work:
/mnt/fastdata/k8s-pvcs/gitea/data/gitea/packages: 235G
The active container package families found via the Gitea API were:
AutoCoder/autocoder-engine
BodyLog/bodylog.dev
EventHorizon/eventhorizon
Created a Kubernetes CronJob in namespace gitea:
gitea-container-package-cleanup
Schedule:
17 3 * * *
Retention policy per package:
latest.sha-* versions.sha-* versions through the Gitea API.sha-* package versions.Repository manifest:
/home/ax_julian/AutoCoder-Engine/documentation/configs/autocoder-engine/gitea-migration/gitea-package-cleanup-cronjob.yaml
Secret created for API access:
gitea-package-cleanup-token
The token value is sourced from local Codex Gitea credentials and is stored only as a Kubernetes Secret.
A one-off dry-run Job was executed successfully after the final retention policy was changed to keep 10 SHA versions:
gitea-container-package-cleanup-dryrun-20260508b
Dry-run candidate summary:
AutoCoder/autocoder-engine total=135 keep=11 delete_candidates=124
BodyLog/bodylog.dev total=404 keep=11 delete_candidates=393
EventHorizon/eventhorizon total=58 keep=11 delete_candidates=47
During validation, an initial one-off Job was created from the earlier single-package CronJob before the DRY_RUN=true environment variable could be applied. Kubernetes rejected patching the immutable Job template, and the Job was immediately deleted.
Before deletion completed, it had already reduced the AutoCoder package count from the earlier observed 391 versions to 135 versions. This aligned with the intended cleanup policy direction, but it occurred immediately rather than waiting for the scheduled CronJob. No filesystem-level package deletion was performed; deletion occurred through the Gitea API.
Monitor package storage after the first scheduled cleanup run. If Gitea package blob storage does not shrink as expected, investigate whether additional Gitea package/blob garbage collection is required for unreferenced package blobs.