-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
podnetwork: Support CNI plugins like PTP and GKE #1920
Conversation
I tested this PR with Flannel and Libvirt driver. |
3a63f59
to
33ca4a7
Compare
Hi @yoheiueda thanks a lot. I just tested on the GCP provider I'm cooking and it worked fine! While I'm not familiar with this part of the code, tomorrow I will do my best to review it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yoheiueda , this LGTM and as I mentioned before, its working with GKE.
Thank you a lot. Just left two minor comments for you.
Currently, a network interface name in the podns network namespace in a peer pod VM is hardcoded such as "vxlan0". This patch changes to the interface name to the one that is defined in the original interface name in the network namespace in a worker node. Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
The code that sets up routes in the podns network namespace in a peer pod VM is duplicated in vxlan and routing tunnelers. This patch moves the duplicate code into the common code. Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel qualified to approve this code, but FWIW, looks good to me.
@yoheiueda I tried with docker provider on a kind cluster and pod creation fails with
In case you want to try here are the images
The CNI used is calico |
Would this resolve the issue usnig the EKS CNI driver as well? |
This patch introduces protocol and scope attributes in the netops.Route struct. These attributes are represented as strings in JSON. Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
CNI plugins like PTP and GKE remove a route that is automatically added by kernel for eth0, and then add another route for the same destination. This patch changes the code to manipulates routes to support such CNI plugins. Fixes confidential-containers#1909 Signed-off-by: Yohei Ueda <yohei@jp.ibm.com>
@bpradipt thank you for testing this PR. The root cause of the issue is due to this error.
Calico sets a Pod IP on an interface with prefix I added a logic to handle this case, and tested it on docker with Calico as well as libvirt with flannel. |
What kind of problems did you encounter with EKS CNI? If this patch does not help for EKS CNI, please create another issue? I'll take a look at it. |
@yoheiueda I tested with ovn-kubernetes on OpenShift as well and things looks good
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
@stevenhorsman based on the tests carried till now, this PR should be ok to merge. |
@EmmEff this patch doesn't solve the external network connectivity issue with default EKS CNI. I tested this on my setup and the external network connectivity problem remains with EKS CNI. |
Admittedly I am not entirely sure of the cause of the connectivity issue with the EKS CNI. At a high level, there is no network connectivity from the pod running in the CVM to the outside. Maybe @bpradipt can better explain? |
@beraldoleal @EmmEff |
CNI plugins like PTP and GKE remove a route that is automatically added by kernel for eth0, and then add another route for the same destination.
This patch changes the code to manipulates routes to support such CNI plugins.
Fixes #1909