gardener / gardener-extension-registry-cache

Gardener extension controller which deploys pull-through caches for container registries.
Apache License 2.0
7 stars 20 forks source link

Configure Registry Cache to Retain a Specified Number of Recent Versions per Image #284

Open pragnakatragadda opened 4 hours ago

pragnakatragadda commented 4 hours ago

How to categorize this issue?

/area storage /kind enhancement

What would you like to be added:

To configure the registry cache to store only latest 2-3 version for each image and cache the older versions.

Why is this needed:

We have quarterly releases where teams need to deploy applications to several internal cluster to ensure code is delivered to production. During the deployment week, we're encountering an issue in these internal clusters with the cache reaching its capacity, since the current supported option to cache is ttl. Ideally, we would like to retain only the latest 2-3 versions of each image in the cache, especially since teams may deploy the application multiple times in a day before the release. This approach would ensure that all images remain available in the registry cache, while also freeing up storage space for other images. For example, if image A is deployed 10 times in a day, we would keep only the latest 2-3 versions of image A, allowing more space for other images.