Skip to content

Container Registry: Multiple tag cleanup policies per project

Closed in favor of #37242.

Context

This is a featureenhancement proposal related to tag cleanup policies.

Problem

Right now a user can only configure a cleanup policy per project. That policy applies therefore to all container repositories associated with the project.

We often hear that a single cleanup policy is too restrictive. Users may have multiple container repositories per project, with different naming conventions and purposes.

For example, one may have a series of repositories for development purposes, where they would like to be more aggressive and remove all images older than 7 days. However, they may also have other more important repositories with live/release images that should be treated differently. They may also have others that are considered archives and shouldn't be touched at all.

This proposal addresses this specific problem.

Proposal

  • Allow creating multiple cleanup policies per project;

  • When creating or editing policies, allow selecting to which container repository(ies) a policy applies;

  • Show the list of repositories that a policy applies to;

  • A container repository cannot have more than one assigned policy;

  • It should be possible to "move" repositories between policies;

  • A default cleanup policy should always exist (disabled by default) and apply to all repositories (if no other policies exist) or a subset of those (not covered by a custom policy).

Edited by João Pereira