Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Based on the earlier PR #114.
This PR implements the STATUS CNI verb.
This is the summary of how Status is called:
Kubelet calls the containerd Status() function via a CRI-API RPC: https://github.com/kubernetes/kubernetes/blob/3718932d9a3ea459217ca11efe1ae9ead6aa92c1/pkg/kubelet/kubelet.go#L2871 and checks if it’s ready. It calls this every 5 seconds .
The containerd Status() function in turn calls the go-cni Status() function: https://github.com/containerd/containerd/blob/6333db77015764f7d45b407094a3bc2cc05c239b/internal/cri/server/status.go#L49
Here is the go-cni Status() function.
go-cni/cni.go
Line 137 in 1c1be5e
In this PR, we update the go-cni Status() function to call STATUS on all of the plugins for each network (after doing the same "ready" check as before, which is now moved to a new function Ready()).
It returns without error only if all of the STATUS calls return without error. This is the main difference between this PR and the previous PR #114 (i.e. in this PR we use the "AND" of all the network statuses instead of returning a list of statuses.)
The reason for this is to keep the signature of Status() the same to make the API backwards compatible, so that we don't have to synchronize this change with the containerd v2.0 release.
Related info: