-
Notifications
You must be signed in to change notification settings - Fork 39.4k
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
Allow multiple node cidr masks in kube-controller-manager #79993
Allow multiple node cidr masks in kube-controller-manager #79993
Conversation
Hi @aramase. 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. |
/cc |
^ probably best to add |
/remove-sig api-machinery |
/sig cloud-provider |
f4b0837
to
41b4ee1
Compare
/ok-to-test |
59221d8
to
5d66338
Compare
/retest |
1 similar comment
/retest |
/milestone v1.17 |
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 am missing documentation on compat and precedence. Will approve, but please follow up ASAP.
Thanks!
/lgtm
/approve
@@ -279,7 +281,9 @@ func TestAddFlags(t *testing.T) { | |||
}, | |||
NodeIPAMController: &NodeIPAMControllerOptions{ | |||
&nodeipamconfig.NodeIPAMControllerConfiguration{ | |||
NodeCIDRMaskSize: 48, | |||
NodeCIDRMaskSize: 48, |
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.
We should spec and test what happens when these disagree
@@ -22,6 +22,10 @@ type NodeIPAMControllerConfiguration struct { | |||
ServiceCIDR string | |||
// secondaryServiceCIDR is CIDR Range for Services in cluster. This is used in dual stack clusters. SecondaryServiceCIDR must be of different IP family than ServiceCIDR | |||
SecondaryServiceCIDR string | |||
// NodeCIDRMaskSize is the mask size for node cidr in cluster. | |||
// NodeCIDRMaskSize is the mask size for node cidr in single-stack cluster. |
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.
Document how these all interact - are they compatible, mutually exclusive, or does the older form take precedence?
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.
@thockin I've documented that they are mutually exclusive in the PR description. But will add those as comments in the follow up.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aramase, thockin 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 |
/retest |
update tests add comment amend var name update comment add check for empty slice fix tests fix mask size in test review feedback add ipv4 and ipv6 flag for mask sizes add to violation exception list remove import alias run update-openapi-spec review feedback run update-bazel review feedback review feedback
5076264
to
796faba
Compare
@thockin Had to rebase the PR as new unit tests were added in the master to |
/test pull-kubernetes-node-e2e-containerd |
1 similar comment
/test pull-kubernetes-node-e2e-containerd |
@aramase: The following test failed, say
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. |
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 see the extra docs I want, but I approved before, so still willing to take a folowup
/lgtm
// getNodeCIDRMaskSizes is a helper function that helps the generate the node cidr mask | ||
// sizes slice based on the cluster cidr slice | ||
func getNodeCIDRMaskSizes(clusterCIDRs []*net.IPNet, maskSizeIPv4, maskSizeIPv6 int) []int { | ||
nodeMaskCIDRs := []int{} |
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: this can be presized to the length of clusterCIDRs
Thank you for checking @sftim. I've added the comments detailing the changes in a follow up PR which has been merged. The docs PR has already been merged. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
Currently the default node cidr mask size is /24 for ipv4 and ipv6. Now that ipv6 dual stack feature has been merged, the user should have an option to configure a different mask size for each ip family. If the user doesn't define the mask sizes explicitly, then the default mask size will be
/24
for ipv4 and/64
for ipv6.Related PRs:
#73977
#79386
Changes implemented -
--node-cidr-mask-size-ipv4
and--node-cidr-mask-size-ipv6
which can be used for dual-stack clusters./24
for IPv4 and/64
for IPv6Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: