-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Fix kuberouter for k8s 1.16+ #8697
Fix kuberouter for k8s 1.16+ #8697
Conversation
Welcome @UnderMyBed! |
Hi @UnderMyBed. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Thanks @UnderMyBed! |
I am assuming you meant There were a few changes to the manifest and cni config that I made, beyond just adding the |
/assign @justinsb @mikesplain |
for reference, here is a naive diff between this new template and the 1.12 template: 12,18c12,24
< "name":"kubernetes",
< "type":"bridge",
< "bridge":"kube-bridge",
< "isDefaultGateway":true,
< "ipam": {
< "type":"host-local"
< }
---
> "cniVersion":"0.3.0",
> "name":"mynet",
> "plugins":[
> {
> "name":"kubernetes",
> "type":"bridge",
> "bridge":"kube-bridge",
> "isDefaultGateway":true,
> "ipam":{
> "type":"host-local"
> }
> }
> ]
55a62,63
> - name: KUBE_ROUTER_CNI_CONF_FILE
> value: /etc/cni/net.d/10-kuberouter.conflist
84c92,95
< if [ ! -f /etc/cni/net.d/10-kuberouter.conf ]; then
---
> if [ ! -f /etc/cni/net.d/10-kuberouter.conflist ]; then
> if [ -f /etc/cni/net.d/*.conf ]; then
> rm -f /etc/cni/net.d/*.conf;
> fi;
87c98,103
< mv ${TMP} /etc/cni/net.d/10-kuberouter.conf;
---
> mv ${TMP} /etc/cni/net.d/10-kuberouter.conflist;
> fi;
> if [ ! -f /var/lib/kube-router/kubeconfig ]; then
> TMP=/var/lib/kube-router/.tmp-kubeconfig;
> cp /etc/kube-router/kubeconfig ${TMP};
> mv ${TMP} /var/lib/kube-router/kubeconfig; Unfortunately we don't have an e2e test for kuberouter, let me put something together right now and we can get this merged asap. Ideally we can get the e2e job passing before this is merged, and then see it is still passing after this is merged. |
actually, i'm assuming kuberouter is broken for 1.16+ correct? that means I wont be able to get the job to pass. I'm inclined to merge this now and then we can use the new job to confirm it works. thoughts @mikesplain @hakman ? |
You were right, I meant the |
if [ ! -f /var/lib/kube-router/kubeconfig ]; then | ||
TMP=/var/lib/kube-router/.tmp-kubeconfig; | ||
cp /etc/kube-router/kubeconfig ${TMP}; | ||
mv ${TMP} /var/lib/kube-router/kubeconfig; | ||
fi |
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.
This part should not be needed. It would only work when the ConfigMap contains a kubeconfig
file like here:
https://github.com/cloudnativelabs/kube-router/blob/master/daemonset/generic-kuberouter-all-features.yaml#L26-L44
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.
Ahh, Good call. I can remove that section
We have the e2e job up and running and I can confirm it is failing. You can search the logs for
I noticed that kube-router has many suggested daemonset manifests, perhaps a comment at the top of this template that indicates which kube-router yaml file it was copied from? otherwise this looks good to me. Thanks for getting this fixed! |
51b5bd9
to
9801cf8
Compare
Thanks for removing the extra section @UnderMyBed. The changes seem quite small to limit them to 1.16+. Would it be ok with you to do them for 1.12+ or there is some compatibility issue that I'm missing? |
Likely not, My motivation behind the limit was the changes and not being able to easily regression test the cni config changes back to 1.12. I'll refactor this to remove the 1.16 limitation. |
Cool. Thanks. Will do a quick test after this gets merged to master to see if there is any issue with 1.12. |
9801cf8
to
1c92c2f
Compare
One more thing, this should be changed to
|
Starting in k8s 1.16 the kublet requires that cniVersion is set in the cni config
1c92c2f
to
26fb6d0
Compare
Thanks @UnderMyBed |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rifelpet, UnderMyBed The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thanks everyone for helping me out on my first PR 😄 |
No problem! Looks like the e2e job is now successfully creating a cluster too. Though its failing a couple tests, the cluster appears mostly functional. |
@rifelpet we should think about updating the kube-router version on master before doing too much debugging about the failed tests. |
Agreed, I see a 0.4.0 is out. I don't see any k8s version compatibility matrix though. |
fixes #8695