Skip to content

Retention/expiration policy for container images

Description

Pushing images from CI is great, but after a while, those images are going to take up a lot of space and never be referenced again. We need a project level retention policy for automatically pushed images. e.g. "store not more than 30 images for master branch and delete after 2 weeks". We also need reasonable defaults so GitLab.com and self-managed instances behave nicely.

  • Keep tagged images longer? Differentiate SHA-type tags and branch tags from release-type tags, like latest or v5.4?
  • Keep 3-5 recent ones longer?
  • Also expire after time
  • Differentiate default policy on subscriptions?

Proposal

Links / references

Edited by Mark Pundsack