SUSE / Portus

Authorization service and frontend for Docker registry (v2)
http://port.us.org/
Apache License 2.0
3k stars 471 forks source link

[feature] Portus Garbage Collection (tag removal) should support an exclusion filter #2261

Closed ArcticSnowman closed 4 years ago

ArcticSnowman commented 4 years ago

Description

While setting up and using the garbage collection, I notice that while you can set a inclusion tag filter, there is no way to easily exclude a set of tags/images.

I think we need a way to exclude images or tags from the GC process.

stale[bot] commented 4 years ago

Thanks for all your contributions! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Jean-Baptiste-Lasselle commented 4 years ago

Description

While setting up and using the garbage collection, I notice that while you can set a inclusion tag filter, there is no way to easily exclude a set of tags/images.

I think we need a way to exclude images or tags from the GC process.

Hi @ArcticSnowman Idid not say anything yet, because I had nothing to say. Today, I think you might be interested in reading this : https://github.com/SUSE/Portus/issues/2281#issuecomment-592591559

I support your request, agree with it, and want to add :

Jean-Baptiste-Lasselle commented 4 years ago

@ArcticSnowman If I may, and If it is okay that I ask, related to https://github.com/SUSE/Portus/issues/807#issuecomment-511461401 :

And btw, the content trust / The Update Framework issue is thrilling.

ArcticSnowman commented 4 years ago

@Jean-Baptiste-Lasselle - When we first built out our internal docker registry, 3+ years ago, Portus was the best out there at the time.

We did look at habor about a year ago, mainly to look at the inclusion of Clair. We did not feel it was any better that Portus at the time and it pulled in lots of new tech that, in an enterprise environment, we did not want to support. And then we found support had been added to Portus.

I made reference to Harbor in #807, mainly to show that other registry tools have the support.

Jean-Baptiste-Lasselle commented 4 years ago

@Jean-Baptiste-Lasselle - When we first built out our internal docker registry, 3+ years ago, Portus was the best out there at the time.

We did look at habor about a year ago, mainly to look at the inclusion of Clair. We did not feel it was any better that Portus at the time and it pulled in lots of new tech that, in an enterprise environment, we did not want to support. And then we found support had been added to Portus.

I made reference to Harbor in #807, mainly to show that other registry tools have the support.

HI @ArcticSnowman thank you so much for your answer, and sorry I did not answer sooner : I think what we are discussing here, is probably the most exciting challenge with Portus, and probably most important in the container world, though it looks like we are lost in the comments of a forgotten project. I will answer you on #807 regarding notary. About Clair scanner, I could set it up,and get actual vulnerabilities identified, displayed in Portus, with CVE-MITRE actual references. See https://github.com/SUSE/Portus/issues/2241#issuecomment-593370789

I am also working on releasing a complete fully tested automation with docker compose, to finally provide people a secured, coherent working first setup of a private docker registry / Portus.

Will happen in the next weeks, It's just that I got involved into a project aside, So I work a little bit everyday, but it takes time.

tty on #807

Jean-Baptiste-Lasselle commented 4 years ago

Hi again @ArcticSnowman , After a good night of sleep, I today have to add something about this issue ( #807 is another subject) :

Yep, they really pieced me off. At least, they could communicate, I have posted numerous help comments to numerous users, and solved issues, and now they update a package without any communication/message ? Explanation is quite clear, they really don't give a s***t about us end users, and that's why people have months after months, let this project to die. But I won't. We will have our portus, entirely free for the world, whether they like or not. Too late, mates.

And btw, Thank you so much : it is because of your message, that I today went "oh okay, I'll just launch the last successful release of my recipe to say hello to portus".

Jean-Baptiste-Lasselle commented 4 years ago

@ArcticSnowman I just want to share the big friendly laugh I had at home, when I discovered that you work tax collection, it is very comforting to know they they rely on us, and maybe they 'll have to remember that someday :rofl:

ArcticSnowman commented 4 years ago

Hi @Jean-Baptiste-Lasselle - We have tried the keep_latest, however we found a problem with it. The way our pipeline creates image we generate a fair number of tags for every checked in change. Some of those changes might never get all the way to production because of testing failures. This can easily push the current production release tag off the end of the keep_latest.

I feel that having an exclude_tags regexp would compliment that keep_latest. Allow us to preserve specifically names tags while allowing the GC to remove all the 'extras' that we generated during development and testing.

Jean-Baptiste-Lasselle commented 4 years ago

Hi @Jean-Baptiste-Lasselle - We have tried the keep_latest, however we found a problem with it. The way our pipeline creates image we generate a fair number of tags for every checked in change. Some of those changes might never get all the way to production because of testing failures. This can easily push the current production release tag off the end of the keep_latest.

I feel that having an exclude_tags regexp would compliment that keep_latest. Allow us to preserve specifically names tags while allowing the GC to remove all the 'extras' that we generated during development and testing.

Hi @ArcticSnowman , how very interesting case indeed. Just delivering you my thoughts as I write, I actually never considered the case, and how about you use several docker registry, one for integration tests, one for staging, one for production etc... ? Apart from pure curiosity, I am asking because there might be very interesting reason, like business or regulations constraints which prevent you from using that pattern.

stale[bot] commented 4 years ago

Thanks for all your contributions! This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.