Skip to content
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

Add IPv6 support and multiple CIDR support to SubnetAllocator #66

Merged

Conversation

danwinship
Copy link
Contributor

This extends SubnetAllocator to support IPv6 ClusterNetworkCIDRs, and then also moves the code from OsdnMaster for handling multiple subnets and makes it part of SubnetAllocator instead.

(Of course, with stock OCP you can't configure an IPv6 ClusterNetwork so this should have no effect on end users at this point, and thus doesn't count as a feature, and would be exempt on IPv6 grounds even if it did.)

ovn-kubernetes currently vendors an older copy of SubnetAllocator (via "github.com/openshift/origin/pkg/util/netutils") and then independently reimplements the multiple CIDR stuff on top of that. My intention was that it could be updated to either copy+paste or vendor this version instead, to provide IPv6 support there as well (and to remove the duplicated multiple CIDR code).

@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 3, 2019
@danwinship
Copy link
Contributor Author

/cc @russellb

@russellb
Copy link
Member

russellb commented Nov 4, 2019

/cc @markmc

Copy link

@markmc markmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @danwinship

pkg/network/master/util/subnet_allocator.go Outdated Show resolved Hide resolved
pkg/network/master/util/subnet_allocator_test.go Outdated Show resolved Hide resolved
pkg/network/master/util/subnet_allocator.go Show resolved Hide resolved
pkg/network/master/util/subnet_allocator.go Outdated Show resolved Hide resolved
@danwinship
Copy link
Contributor Author

updated to skip the 0 subnet on IPv6, because it's weird that pod IPs on the first node look like "fd01::P", but pod IPs on all other nodes look like "fd01:0:0:S::P"

@markmc
Copy link

markmc commented Nov 8, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 8, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danwinship, markmc

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 0a26f07 into openshift:master Nov 8, 2019
@danwinship danwinship deleted the ipv6-subnet-allocator branch November 10, 2019 22:15
markmc added a commit to markmc/ovn-kubernetes that referenced this pull request Nov 29, 2019
Pulls in changes to support multiple subnets and to support IPv6:

openshift/sdn#66
markmc added a commit to openshift-kni/ovn-kubernetes that referenced this pull request Nov 29, 2019
Pulls in changes to support multiple subnets and to support IPv6:

openshift/sdn#66
danwinship pushed a commit to danwinship/ovn-kubernetes-1 that referenced this pull request Feb 15, 2020
Pulls in changes to support multiple subnets and to support IPv6:

openshift/sdn#66
danwinship pushed a commit to danwinship/ovn-kubernetes-1 that referenced this pull request Feb 16, 2020
Pulls in changes to support multiple subnets and to support IPv6:

openshift/sdn#66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants