kubernetes-sigs / cluster-api-provider-aws

Kubernetes Cluster API Provider AWS provides consistent deployment and day 2 operations of "self-managed" and EKS Kubernetes clusters on AWS.
http://cluster-api-aws.sigs.k8s.io/
Apache License 2.0
646 stars 571 forks source link

Add IPv6 support #2420

Open sedefsavas opened 3 years ago

sedefsavas commented 3 years ago

Add support to create IPv6 clusters and add e2e test for it.

/kind feature /milestone next

k8s-ci-robot commented 3 years ago

@sedefsavas: The provided milestone is not valid for this repository. Milestones in this repository: [Next, v0.6.x, v0.7.0, v0.7.x]

Use /milestone clear to clear the milestone.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/2420): >Add support to create IPv6 clusters and add e2e test for it. > > >/kind feature >/milestone next Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
sedefsavas commented 3 years ago

/milestone Next

k8s-triage-robot commented 3 years ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 3 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 3 years ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues and PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

k8s-ci-robot commented 3 years ago

@k8s-triage-robot: Closing this issue.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/2420#issuecomment-945209111): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues and PRs according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue or PR with `/reopen` >- Mark this issue or PR as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
richardcase commented 3 years ago

/reopen /lifecycle frozen

k8s-ci-robot commented 3 years ago

@richardcase: Reopened this issue.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/2420#issuecomment-945403464): >/reopen >/lifecycle frozen Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
sedefsavas commented 3 years ago

/triage accepted

sedefsavas commented 3 years ago

/assign @randomvariable

sedefsavas commented 3 years ago

Reminder: Create issue for dual-stack and replicate this for EKS

sedefsavas commented 3 years ago

/priority important-soon

richardcase commented 3 years ago

This gets messy with EKS.

randomvariable commented 3 years ago

Support should be fixed in Cluster API, not by shoving lots of non-standard behaviour into CAPA - consistency across providers is paramount. We need to break this down. Please start a doc, we have a team at VMware looking into dual-stack across Kubernetes in general who can assist.

richardcase commented 3 years ago

@randomvariable - started a doc

randomvariable commented 3 years ago

/assign

for initial scoping

yandooo commented 2 years ago

Are there any updates here?

richardcase commented 2 years ago

/unassign randomvariable /help

k8s-ci-robot commented 2 years ago

@richardcase: This request has been marked as needing help from a contributor.

Guidelines

Please ensure that the issue body includes answers to the following questions:

For more details on the requirements of such an issue, please see here and ensure that they are met.

If this request no longer meets these requirements, the label can be removed by commenting with the /remove-help command.

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/2420): >/unassign randomvariable >/help > Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
richardcase commented 2 years ago

Are there any updates here?

@yandooo - i think this issue has stalled. So its open to be worked on. I have marked it as help wanted as well.

yandooo commented 2 years ago

@richardcase would it be possible to share relevant documentation for the topic if any? As per comment there seems like some progress made towards standardizing CAPI to support dual-stack. Thanks

richardcase commented 2 years ago

There isn't a huge amount of documentation. The doc mentioned in the thread was the start of a doc to capture notes but we didn't much further. Do you have access to that doc?

yandooo commented 2 years ago

@richardcase don't have it. I requested access linking your comment in the request message. Appreciated it if it can be shared. Thanks

richardcase commented 2 years ago

@richardcase don't have it. I requested access linking your comment in the request message. Appreciated it if it can be shared. Thanks

Just sent you an email @yandooo :smile:

sedefsavas commented 2 years ago

We might want to address IPv6 and dual stack as separate problems as former could be achieved in short term.

yandooo commented 2 years ago

I tend to agree on getting IPv6 out first to unlock the AWS EKS ipv6 feature and look at dual-stack cohesively later @sedefsavas.

richardcase commented 2 years ago

I also think that adding IPv6 first is a good way forward.

richardcase commented 2 years ago

/assign /assign Skarlso

k8s-ci-robot commented 2 years ago

@richardcase: GitHub didn't allow me to assign the following users: Skarlso.

Note that only kubernetes-sigs members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time. For more information please see the contributor guide

In response to [this](https://github.com/kubernetes-sigs/cluster-api-provider-aws/issues/2420#issuecomment-1082743250): >/assign >/assign Skarlso Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.
richardcase commented 2 years ago

@Skarlso - this was the issue i was thinking of.

Skarlso commented 2 years ago

Hi! :)

Let's tackle this! :) We have some experience creating the necessary resources in eksctl, so hopefully, I can be of assistance here.

richardcase commented 2 years ago

/assign Skarlso

nikimanoledaki commented 2 years ago

I would love to collaborate on this too! I worked on planning IPv6 for eksctl and implementing it alongside @Skarlso. :) See: https://github.com/weaveworks/eksctl/issues/4255

richardcase commented 2 years ago

Awesome, thanks :+1:

/assign nikimanoledaki

sedefsavas commented 2 years ago

I came across this old PR for IPv6 support: https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/1322 https://github.com/kubernetes-sigs/cluster-api-provider-aws/pull/1370

Might be useful.

sedefsavas commented 2 years ago

Also CAPZ IPv6 support implementation: https://github.com/kubernetes-sigs/cluster-api-provider-azure/pull/646

Skarlso commented 2 years ago

Interesting note:

    var subnets []*net.IPNet
    for i := 0; i < numSubnets; i++ {
        ip4 := parent.IP.To4()
        if ip4 == nil {
            return nil, errors.Errorf("unexpected IP address type: %s", parent)
        }

        n := binary.BigEndian.Uint32(ip4)
        n += uint32(i) << uint(32-modifiedNetworkLen)
        subnetIP := make(net.IP, len(ip4))
        binary.BigEndian.PutUint32(subnetIP, n)

        subnets = append(subnets, &net.IPNet{
            IP:   subnetIP,
            Mask: net.CIDRMask(modifiedNetworkLen, 32),
        })
    }

Why did kops assign ip in the loop over and over? 🤔 It should be same thing always since it's never updated, right?:D

Skarlso commented 2 years ago

Thank you @sedefsavas! Good point of reference. :) I started writing the proposal and have some notes in there about the changes needed. I will coordinate with the rest of the team about questions.

Otherwise, I have a pretty good idea on how to proceed and hopefully will have something to look at over the next couple weeks. :)

richardcase commented 2 years ago

Otherwise, I have a pretty good idea on how to proceed and hopefully will have something to look at over the next couple weeks. :)

@Skarlso - when you feel it's a good time it would be great to go through the proposal in the office hours.

Skarlso commented 2 years ago

Will do! I literally wanted to comment just now. :D

The proposal is a bit in WIP with lots of random comments on what needs to be changed. I successfully wrote some code last night for subnet splitting using ipv6 which I'm still testing. :) I think, for me at least :D, that was the hardest part. :D

The rest, hopefully, will just be moving stuff around and doing the right routing. :)

richardcase commented 2 years ago

Exciting times. I can't wait to see the ipv6 subnet splitting :smile:

richardcase commented 2 years ago

/remove-lifecycle frozen

richardcase commented 2 years ago

/milestone v1.6.0

yandooo commented 2 years ago

Can't wait for this to go through :)

Skarlso commented 2 years ago

Me neither. :D Not much longer now... :))))

Skarlso commented 2 years ago

IPv6 for EKS has been merged.

Outstanding work is for Unmanaged clusters.

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 year ago

This issue is labeled with priority/important-soon but has not been updated in over 90 days, and should be re-triaged. Important-soon issues must be staffed and worked on either currently, or very soon, ideally in time for the next release.

You can:

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted

Skarlso commented 1 year ago

/triage accepted /priority important-longterm

k8s-triage-robot commented 1 year ago

This issue is labeled with priority/important-soon but has not been updated in over 90 days, and should be re-triaged. Important-soon issues must be staffed and worked on either currently, or very soon, ideally in time for the next release.

You can:

For more details on the triage process, see https://www.kubernetes.dev/docs/guide/issue-triage/

/remove-triage accepted