Fixing CNI result Interface indexing#255
Conversation
When DANM merges together multiple CNI results it needs to change the indexing of the IPs to reference the proper Interface records from the merged result, rather than using the ID from their original one
|
As usual and should have already anticipated after this many years, nobody actually gives a danm about CNI spec: Calico puts wrong interface name into its result, and doesn't do indexing on its own at all so, at the end of the day: eh. We just make sure the interface / IPs belonging the K8s Service Network are first in the CNI result, and let CRIs deal with the rest. |
|
So for this CNI result: these IPs were recognized by K8s: |
|
I could test it again by myself. It works fine. Ready to be merged. Thanks! |
|
@Levovar I am one of the CNI && containerd maintainers. I am curious about your thoughts on the spec and issues you have noticed. |
generally speaking or specifically related to this issue? :) |
I can discuss both :-) Please reach out .... Michael.Zappa@gmail.com or slack @michael Zappa |
When DANM merges together multiple CNI results it needs to change the indexing of the IPs to reference the proper Interface records from the merged result, rather than using the ID from their original one
This can cause issues when DANM is invoked directly by CRIs such as containerd instead of Kubelet. CRIs do parse the returned result, and the improper indexing can result in the wrong interface getting identified by CRI as belonging to the "cluster network"