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
kubenet: replace gateway with cni result #85993
Conversation
Hi @chendotjs. 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. |
ping @mars1024 |
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.
Sorry for the late reply, I think this almost LGTM except some tests :)
/ok-to-test |
@@ -336,6 +332,9 @@ func (plugin *kubenetNetworkPlugin) Capabilities() utilsets.Int { | |||
// setup sets up networking through CNI using the given ns/name and sandbox ID. | |||
func (plugin *kubenetNetworkPlugin) setup(namespace string, name string, id kubecontainer.ContainerID, annotations map[string]string) error { | |||
var ipv4, ipv6 net.IP | |||
var podGateways []net.IP | |||
var podCIDRs []net.IPNet |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
I suggest to squash the commits before merge, anyway it LGTM, but defer to @mars1024 the final lgtm |
@aojea thanks for your relpy, the commits are squashed. |
I think this is missing something: you still need to keep |
@squeed I don't know what state gets kept in there. podGateways doesn't seem to be used for anything other than creating the host-local ranges, which doesn't need state to be kept. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chendotjs, dcbw 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 |
/test pull-kubernetes-e2e-gce-100-performance |
/retest Review the full test history for this PR. Silence the bot with an |
shouldn't it be cherry-picked to 1.16 and 1.17 ? |
@chendotjs do you mind adding a release note?
|
@aojea thanks for reminding,release note updated 😃 |
…upstream-release-1.17 Automated cherry pick of #85993: kubenet: replace gateway with cni result
…upstream-release-1.16 Automated cherry pick of #85993: kubenet: replace gateway with cni result
What type of PR is this?
/kind bug
What this PR does / why we need it:
Remove the tricky method that
kubenet
uses to calculate gateway from pod cidr. Instead,kubenet
will fetch gateway from cni result sincehost-local
has the ability to conclude an appropriate gateway for a subnet as @mars1024 methioned in #84550.Which issue(s) this PR fixes:
Fixes #84541
Special notes for your reviewer:
Thanks for review.
Does this PR introduce a user-facing change?:
Additional documentation e.g., KEPs (Kubernetes Enhancement Proposals), usage docs, etc.: