spegel icon indicating copy to clipboard operation
spegel copied to clipboard

CRI-O support

Open phillebaba opened this issue 3 years ago • 2 comments

Currently Spegel only supports Containerd. CRI-O is another popular container runtime. This should also be supported as an alternative backened. It has the benefit of also forcing the code architecture to not be centered around Containerd, enabling other runtimes to also be implemented.

phillebaba avatar Mar 03 '23 18:03 phillebaba

Hi @phillebaba,

I’m interested in contributing to this issue. Since the current implementation focuses only on containerd, there could be some complications. First I could analyze and discuss the solution here.

Thanks in advance!

ksankeerth avatar Mar 24 '23 02:03 ksankeerth

Great! So I focused on Containerd initially because that is what I know best. At first I tried implementing this without a Containerd client but that turned out to be impossible because tag information is not stored in the layers but in a separate boltdb. My other thought was to only use the CRI API as that would keep things compatible with CRI-O but there are endpoints that do not exist in the CRI spec which Spegel needs.

I had a look at CRI-O and could not really find a good client library, might be that I have missed something. I think that is the first step to determine if it is possible.

Then I would probably want to refactor some of the code to use an interface instead of the Containerd client. This would enable us to create different implementations for the image fetching. I could do this to make things easier for you. It would probably simplify testing a lot, I don't really know why I did not do it in the first place.

phillebaba avatar Mar 24 '23 08:03 phillebaba