zot icon indicating copy to clipboard operation
zot copied to clipboard

Image retention policy

Open andaaron opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. Zot may be running in a large variety of environments, some with limited storage. We have added policies for downloading new images automatically using zot sync, but as disk usage grows we may need a way to automatically free storage space.

Describe the solution you'd like The zot configuration should include policies for removing old, unused images. Maybe we should remove images using the following criteria:

  • images with a specified name pattern older than a specified time
  • images which have not been downloaded in a specified time interval

Describe alternatives you've considered We could have separate scripts calling the zot API to delete old images, but we should solve this in zot if we can, without needing additional tooling.

Additional context

andaaron avatar Feb 24 '22 18:02 andaaron

  1. How long should we wait
  2. Per-repo policy?
  3. Exemption - pin some images from being deleted?
  4. Policy based on when the image was uploaded, AND/OR maintain state about when the image was last.

rchincha avatar Feb 24 '22 19:02 rchincha

Duplicate of https://github.com/project-zot/zot/issues/1634

andaaron avatar Sep 04 '23 09:09 andaaron