-
Notifications
You must be signed in to change notification settings - Fork 39.8k
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
Update CNI plugin to newest version; support ConfigLists #42202
Conversation
Hi @squeed. 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 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. I understand the commands that are listed here. |
@squeed Cool. When will CNI v0.5.0 be released? |
We were hoping to cut a -rc release today or tomorrow, and a full release a few days after that. |
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.
Look good overall. Waiting for CNI release. Will take a final look later
if err != nil { | ||
return err | ||
} | ||
// Coerce the CNI result version | ||
res, err := cnitypes020.GetResult(resT) |
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 assume this is backward compatible, right?
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.
Correct - this converts the result in to the 0.2.0 format, which is what kubenet already expects.
pkg/kubelet/network/cni/cni.go
Outdated
"host_ip": p.HostIP, | ||
}) | ||
} | ||
// TODO(cdc) CNI #373 needs to be merged first |
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 assume there will be follow up on this
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.
Yup :-). It was merged a few hours ago.
pkg/kubelet/network/cni/cni.go
Outdated
glog.Warningf("Error converting CNI config file %s to list: %v", confFile, err) | ||
continue | ||
} | ||
|
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.
nit: remove this empty line
pkg/kubelet/network/cni/cni.go
Outdated
continue | ||
} | ||
} else { | ||
|
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.
nit: remove this empty line
@k8s-bot ok to test |
Need to run |
0.5.0-rc1 was just released. Going to update the PR with that. |
c471c5e
to
23ed942
Compare
c373e33
to
3003bc6
Compare
Ok, all checks are passing. All that's left now is to wait for 0.5.0 to be released - should be sometime this week. |
CNI v0.5.0 has been updated. This can be considered for merge. |
@squeed: The following test(s) failed:
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. 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. I understand the commands that are listed here. |
@freehan updated & rebased, thanks |
/lgtm Thanks! |
Could you approve this? It needs owners at root. @thockin |
…rameters ** reason for this change ** CNI has recently introduced a new configuration list feature. This allows for plugin chaining. It also supports varied plugin versions.
// Search for vendor-specific plugins as well as default plugins in the CNI codebase. | ||
vendorDir := vendorCNIDir(vendorCNIDirPrefix, conf.Network.Type) | ||
vendorDir := vendorCNIDir(vendorCNIDirPrefix, confType) |
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.
Should we search vendor CNI dir for all plugin types, e.g. networks may have different type in confList.Plugins
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.
Maybe, but that is changing behavior. The aim of this PR is only to enable config lists.
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.
There is a lot of cleaning up that can be done with how k8s uses CNI but this PR is not the place for it, IMHO. Just trying to get the version bump out now.
/lgtm |
@thockin for approve |
fyi @dnardo |
Fingers crossed that this wins the rebase race. |
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: freehan, squeed, thockin
Needs approval from an approver in each of these OWNERS Files:
You can indicate your approval by writing |
Automatic merge from submit-queue (batch tested with PRs 42202, 40784, 44642, 44623, 44761) |
are there any plans to have it in 1.6 branch? |
Can I request that the top description of this PR be extended to mention the portmap capability that it adds? Really I would like it in the 1.7.0 release notes too, but I'm not sure if those can be changed retrospectively. |
What this PR does / why we need it: Updates the CNI network plugin to use the newest version of CNI. This brings with it plugin chaining and support for multiple versions.
Special notes for your reviewer: This libcni change is backwards-compatible - older plugins will work without any changes needed.
Release note: