[DRAFT] Implement CNI Status
The recent CNI specification provided a couple new verbs. This is to implement Status. GC and other verbs will be added in the future in different PR.
https://github.com/containernetworking/cni/blob/main/SPEC.md
@aojea Since the kubelet calls the CRI-API Status RPC: https://github.com/containerd/containerd/blob/6333db77015764f7d45b407094a3bc2cc05c239b/internal/cri/server/status.go#L49
Kubelet: https://github.com/kubernetes/kubernetes/blob/3718932d9a3ea459217ca11efe1ae9ead6aa92c1/pkg/kubelet/kubelet.go#L2886
The Status returning an error will set the node to not ready. I did notice after about 2 hours, the pods with netns, started going to completed. It might have been my test however I think we should discuss.
Hi @MikeZappa87, do you plan to work on this? If not, I can try to work on it as a new contributor.
Hi @MikeZappa87, do you plan to work on this? If not, I can try to work on it as a new contributor.
Hello, I need to finish this up. I started it and we needed to get a few PR's merged prior to finishing this. If you want to take it on feel free! :-)
Thanks, I'll give it a shot!
Hi @MikeZappa87, a couple basic questions for you if you have time:
- What's the v2 API, is there a reference somewhere?
- (Maybe related) The current draft PR changes the signature of Status(), and you mentioned above that kubelet calls this function already. How do we handle backwards compatibility for things like this?
More generally, it would be helpful to know what work is remaining and if we need to wait for any other PRs to be merged first. Thanks!
@aojea Since the kubelet calls the CRI-API Status RPC: https://github.com/containerd/containerd/blob/6333db77015764f7d45b407094a3bc2cc05c239b/internal/cri/server/status.go#L49
Kubelet: https://github.com/kubernetes/kubernetes/blob/3718932d9a3ea459217ca11efe1ae9ead6aa92c1/pkg/kubelet/kubelet.go#L2886
The Status returning an error will set the node to not ready. I did notice after about 2 hours, the pods with netns, started going to completed. It might have been my test however I think we should discuss.
that is the bug we want to fix, though CNI implementations need to implement CNI STATUS wisely as with great power comes great responsibility