Skip to content

Retention janitor #755

Description

@AlexHardAtWork

Problem. Under ADR 015 nothing deletes catalog entries reactively, so red/stale
entries would accumulate in etcd without a bounded reclamation path.

Proposal. A single periodic sweep deletes catalog entries that are
Available=False and carry no protection finalizer (unreferenced) and have
been so for a configured age. Configurable policy (keep-last-N, keep-deployed,
age-based). Goes through the normal object-deletion path so protection finalizers
still gate in-use entries. Each delete is conditional on the resourceVersion
observed during evaluation
(optimistic-concurrency precondition); a conflict —
Release bound, finalizer added, or artifact returned in between — is a harmless
skip/retry, never a forced delete. This closes the list-then-delete race. This is
the only automatic deletion in the system.

Acceptance criteria.

  • Removes only entries that are red + unreferenced + aged out.
  • Never removes an in-use/deployed entry (protection finalizers respected).
  • Delete uses a resourceVersion precondition; a conflict skips (never forces).
  • Race coverage: bind-vs-delete and artifact-return-vs-delete.
  • Policy is configurable and per-catalog/per-registry scoped.
  • Observable (events/metrics on what was reclaimed and why).

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue that has not been reviewed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions