calico
calico copied to clipboard
Support for CNI GC Verb
Currently, CRI-O has some behavior specifically tuned for calico (though it could be argued that it's correct behavior for all) where we keep track of a pod across reboots so we can call CNI del on the now dead container after a reboot.
With the CNI GC verb, CRI-O could instead ask calico to GC the contents of that node. That would allow it to have less to keep track of and potentially not even persist pods across reboots.
Are there plans to support GC?
Oh that's exciting - I hadn't spotted that change.
Sounds like something we should look into implementing in Calico - thanks for the pointer.
This is the spec section: https://github.com/containernetworking/cni/blob/main/SPEC.md#gc-clean-up-any-stale-resources
Note this clause:
The runtime MUST NOT use GC as a substitute for DEL. Plugins may be unable to clean up some resources from GC that they would have been able to clean up from DEL.
and
specifically tuned for calico (though it could be argued that it's correct behavior for all)
I tend to agree that this is probably the correct behavior for all. I think Calico likely should implement the GC action, but given the above I don't think it would invalidate the desire for the logic to send DEL commands as it does currently.
dang yeah I guess I missed that section. I'll leave this open but it does close the avenue of optimization I was hoping for