Create Zot OCI Service #50
No reviewers
Labels
No labels
blocked
bug
duplicate
effort
high
effort
low
effort
medium
effort
minimal
enhancement
help wanted
invalid
pr
feedback
pr
reviewing
question
status
backlog
status
document
status
done
status
implement
status
pending
status
planning
status
reviewing
waiting
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tepichord/milner!50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/48-zot-oci-service"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #48
Automated PR created by forgejo-done adapter.
The registry sits on the durable tier, shared with Vault and Pocket ID, so image churn has to be bounded rather than hoped about. Retention was left off in the previous commit because it deletes manifests on a schedule; this turns it on with the semantics confirmed first. preview/** the 5 most recent pr-* tags per repository, untagged deleted after 24h everything else the 20 most recent tags, or anything pushed in the last 90 days, untagged never deleted gc scheduling is now explicit (gcDelay 1h, gcInterval 24h) because retention is evaluated on the GC schedule and the upstream docs contradict themselves on what gcInterval defaults to when omitted — the config table says one hour, the attribute description says no periodic collection. Setting it is the only way to know. The policy also fixes the push convention: per-PR images must go to preview/<name> with a pr-* tag, because that is the tier that gets trimmed. Anything else is in the catch-all tier and survives 90 days. Three properties of the retention language drove the shape, each of which deletes things silently if read backwards: - keepTags is a whitelist. A policy naming repositories but not what to keep empties them, so the `**` entry carrying an explicit `.*` is load-bearing, not decoration. - First matching policy wins per repository, so preview/** must precede **. - deleteUntagged: false in the catch-all tier is deliberate: an untagged manifest is what a digest pin (image@sha256:...) looks like, so collecting them would eventually break exactly the immutable pin that makes a deploy reproducible, days later, as an ImagePullBackOff. The preview tier can afford true because nothing there is pinned by digest. Verified on a throwaway zot v2.1.21 with the delays shrunk so decisions arrive in seconds, not hours: five distinct images tagged preview/app:pr-1..pr-5 left holding pr-4/pr-5; the catch-all tier logged v1/v2 as "didn't meet any tag retention rule" and left v3/v4; an untagged manifest in the catch-all tier stayed pullable by digest after a GC pass. One sharp edge found and documented: mostRecentlyPushedCount ranks by manifest push timestamp, so tags pointing at the same manifest share timestamps and "the N most recent" is meaningless among them — five tags on one manifest kept pr-1 and pr-5 rather than the last two pushed. Real per-PR images are distinct builds, so the tiers behave as intended. The shipped config also passes `zot verify` and `zot verify-feature retention` (which parses it back as GCInterval 24h, GCDelay 1h, PushedWithin 90d).