GoogleCloudPlatform / gcr-cleaner

Delete untagged image refs in Google Container Registry or Artifact Registry
Apache License 2.0
805 stars 112 forks source link

Add Support for last X builds instead of last X days #150

Closed anthonyalayo closed 8 months ago

anthonyalayo commented 1 year ago

Hey there,

Would it be possible to support last X builds instead?

We have some services that don't have regular deployment cadence. It sounds like keep may not work if the grace period passes.

TriPSs commented 1 year ago

keep will make sure that x amount of items will never be deleted. So if you have grace set to one month for example and keep to 10, it will not delete the items that are created/added in the past month (because of grace) and the first 10 items after that.

sethvargo commented 8 months ago

Hi all - users should prefer the native Google Artifact Registry functionality instead of gcr-cleaner. We are only fixing bugs and security issues in gcr-cleaner now that there's a native (and free) feature in the Google Cloud product.

This feature actually already exists in the native functionality 😄