cri-o / cri-o

Open Container Initiative-based implementation of Kubernetes Container Runtime Interface
https://cri-o.io
Apache License 2.0
5.24k stars 1.06k forks source link

CFP: CNI GC, STATUS support #8018

Open squeed opened 7 months ago

squeed commented 7 months ago

CNI v1.1, which just released, includes two new verbs. It would be nice if CRI-O included support for them.

The verb STATUS allows for a plugin to indicate readiness to accept ADD requests. This takes the place of the awkward "let me remove my network configuration file because I'm upgrading" dance. It's all much cleaner. cri-o should "delegate" the Status CRI request to the CNI plugin(s).

The verb GC is a way for the runtime to pass a list of known-valid sandboxes to the CNI plugin. The CNI plugin can then clean up stale resources, such as leaked IPAM records. This will have to be invoked by cri-o based on some timer, as it is not directly related to a CRI API call.

I'm happy to start work on this, especially for STATUS. I'm not familiar enough with the cri-o code to immediately attack GC, but I'm happy to help provide guidance.

squeed commented 7 months ago

https://github.com/cri-o/ocicni/pull/196 adds STATUS support to ocicni.

I'll see about GC support.

squeed commented 7 months ago

I should have a PR for ocicni GC support shortly. I'll need a bit of help folding it in to cri-o.

squeed commented 6 months ago

@jcaamano has agreed to take a look at this :-)

squeed commented 6 months ago

An update: STATUS will require no work besides bumping ocicni. GC will be a lot trickier :-)

saschagrunert commented 6 months ago

OCI CNI v0.4.3 should have the feature available now: https://github.com/cri-o/ocicni/releases/tag/v0.4.3