This is an
epictracking the implementation of the proposal outlined in goharbor/community#4 and #5882
Not many people have the luxury of unlimited storage. For images and tags that are effectively ephemeral (like those built and tagged for use only by an intermediate process in a CI pipeline) it does not make sense to keep these tags around for an extended period of time, consuming precious resources. Other tags, like those correlating to released or deployed software may need to be kept for an extended period of time or even forever for various legal or compliance reasons. While this is possible today via Harbor's API, Harbor Administrators could greatly benefit from having this functionality built-in to harbor itself.
As this is a large feature and I can really only work on it in my free time, I'm splitting it up into multiple smaller issues. If you see something you're interested in working on feel free to contribute!
I envision this being implemented in roughly this order:
x](https://github.com/goharbor/harbor/issues/6658)n days ago](https://github.com/goharbor/harbor/issues/6659)n tags](https://github.com/goharbor/harbor/issues/6660)The UI proposal draft can start at any stage. The actual scheduling / execution of tag processing will be disabled until the feature is fully implemented. This way we can work on this in small, reviewable chunks.
Really needs purge policy feature in real practice because dev images grow so fast...
How about adding regex Filter?
In my company, we use jenkins running pipeline to build image。
There are two forms of images, one is the image during the test and release stages.The other is the image after the release of the product release.
The first type image name is xxx/$BRACH_NAME-$BUILD_NUMBER-SNAPSHOT.
The second type image name is v*.
The image we want to clean up is builded during the development test phase. For the image that has been officially launched, we want to save it all the time.
@runzexia So essentially, "Keep/Delete tag x if it matches the regular expression xyz"?
@nlowe yes
How about adding regex Filter?
I think this makes sense.
Also want to clean up old helm charts.
I'm going to be iterating on this in the feat/retention/tracking branch on my fork until the merge window opens.
All the work are done! Close this epic.
Most helpful comment
All the work are done! Close this epic.