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. #1024

Merged
merged 15 commits into from
Oct 9, 2024
Merged

Add ipv6 support. #1024

merged 15 commits into from
Oct 9, 2024

Conversation

axel7born
Copy link
Contributor

How to categorize this PR?

/area networking
/kind enhancement
/platform aws

What this PR does / why we need it:
The PR adds required infrastructure changes to deploy IPv6 shoots.

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Add ipv6 support to deploy IPv6 shoots.

@axel7born axel7born requested review from a team as code owners August 5, 2024 15:16
@gardener-robot gardener-robot added the needs/review Needs review label Aug 5, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 5, 2024
@gardener-robot gardener-robot added area/networking Networking related kind/enhancement Enhancement, improvement, extension platform/aws Amazon web services platform/infrastructure size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else labels Aug 5, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 5, 2024
pkg/controller/controlplane/valuesprovider.go Outdated Show resolved Hide resolved
pkg/controller/infrastructure/infraflow/reconcile.go Outdated Show resolved Hide resolved
desired.CidrBlock = *c.config.Networks.VPC.CIDR

if !isIPv4(c.ipFamilies) && c.config.Networks.VPC.CIDR == nil {
desired.CidrBlock = "10.0.0.0/16"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think I forgot the outcome of that discussion around this hardcoded IP and it would be nice if here or better in a comment write something about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably, it is better not to automatically assign an IPv4 address here and leave that to the user?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Though, I need to adapt the validation.

AssignIpv6AddressOnCreation: ptr.To(isIPv6(c.ipFamilies)),
CidrBlock: func(cidr string) string {
if cidr == "" {
return "10.0.32.0/20"
Copy link
Contributor

Choose a reason for hiding this comment

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

also here regarding the "magic IP"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Same as above, it is probably better to let the user configure the CIDR for the public range.

@kon-angelo
Copy link
Contributor

/needs rebase

@gardener-robot gardener-robot added the needs/rebase Needs git rebase label Sep 2, 2024
@@ -1202,6 +1206,79 @@ func (c *Client) DeleteInternetGateway(ctx context.Context, id string) error {
return ignoreNotFound(err)
}

func (c *Client) CreateEgressOnlyInternetGateway(ctx context.Context, gateway *EgressOnlyInternetGateway) (*EgressOnlyInternetGateway, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Public func CreateEgressOnlyInternetGateway should have a describing comment

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a comment.

@@ -395,6 +407,18 @@ func generateTerraformInfraConfig(ctx context.Context, infrastructure *extension
dhcpDomainName = fmt.Sprintf("%s.compute.internal", infrastructure.Spec.Region)
}

isIPv4 := true
isIPv6 := false
if sets.New[v1beta1.IPFamily](ipFamilies...).Has(v1beta1.IPFamilyIPv6) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there a special reason why we use sets, couldn't we just use slices.Contains() here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No special reason, I changed it to slices.Contains().

@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Sep 10, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Sep 11, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Sep 13, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Sep 14, 2024
@gardener-robot-ci-3 gardener-robot-ci-3 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Sep 19, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Sep 19, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Oct 8, 2024
@kon-angelo
Copy link
Contributor

/test

@testmachinery
Copy link

testmachinery bot commented Oct 8, 2024

Testrun: e2e-f7zd9
Workflow: e2e-f7zd9-wf
Phase: Failed

+---------------------+-----------------------------+-----------+----------+
|        NAME         |            STEP             |   PHASE   | DURATION |
+---------------------+-----------------------------+-----------+----------+
| infrastructure-test | infrastructure-test-migrate | Failed    | 22m30s   |
| infrastructure-test | infrastructure-test-recover | Failed    | 23m14s   |
| bastion-test        | bastion-test                | Succeeded | 9m0s     |
| dnsrecord-test      | dnsrecord-test              | Succeeded | 6m14s    |
| infrastructure-test | infrastructure-test-tf      | Failed    | 35m9s    |
| infrastructure-test | infrastructure-test-flow    | Succeeded | 26m43s   |
+---------------------+-----------------------------+-----------+----------+

IPv6 addresses of subnets were different for terraform and flow.
This resulted in a subnet changes after migration.
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 9, 2024
@gardener-robot-ci-1 gardener-robot-ci-1 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 9, 2024
@kon-angelo
Copy link
Contributor

/test

@testmachinery
Copy link

testmachinery bot commented Oct 9, 2024

Testrun: e2e-85nst
Workflow: e2e-85nst-wf
Phase: Failed

+---------------------+-----------------------------+-----------+----------+
|        NAME         |            STEP             |   PHASE   | DURATION |
+---------------------+-----------------------------+-----------+----------+
| infrastructure-test | infrastructure-test-recover | Failed    | 25m27s   |
| bastion-test        | bastion-test                | Succeeded | 8m43s    |
| dnsrecord-test      | dnsrecord-test              | Succeeded | 6m8s     |
| infrastructure-test | infrastructure-test-tf      | Failed    | 23m52s   |
| infrastructure-test | infrastructure-test-flow    | Failed    | 26m35s   |
| infrastructure-test | infrastructure-test-migrate | Failed    | 20m59s   |
+---------------------+-----------------------------+-----------+----------+

@DockToFuture
Copy link
Member

/retest

@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Oct 9, 2024
@ScheererJ
Copy link
Member

/test

@testmachinery
Copy link

testmachinery bot commented Oct 9, 2024

Testrun: e2e-vlt45
Workflow: e2e-vlt45-wf
Phase: Failed

+---------------------+-----------------------------+-----------+----------+
|        NAME         |            STEP             |   PHASE   | DURATION |
+---------------------+-----------------------------+-----------+----------+
| dnsrecord-test      | dnsrecord-test              | Succeeded | 6m13s    |
| infrastructure-test | infrastructure-test-tf      | Failed    | 24m0s    |
| infrastructure-test | infrastructure-test-flow    | Failed    | 23m13s   |
| infrastructure-test | infrastructure-test-migrate | Failed    | 24m54s   |
| infrastructure-test | infrastructure-test-recover | Succeeded | 27m51s   |
| bastion-test        | bastion-test                | Succeeded | 9m42s    |
+---------------------+-----------------------------+-----------+----------+

@kon-angelo
Copy link
Contributor

/test

@testmachinery
Copy link

testmachinery bot commented Oct 9, 2024

Testrun: e2e-sqqbf
Workflow: e2e-sqqbf-wf
Phase: Failed

+---------------------+-----------------------------+-----------+----------+
|        NAME         |            STEP             |   PHASE   | DURATION |
+---------------------+-----------------------------+-----------+----------+
| dnsrecord-test      | dnsrecord-test              | Succeeded | 5m50s    |
| infrastructure-test | infrastructure-test-tf      | Failed    | 31m41s   |
| infrastructure-test | infrastructure-test-flow    | Failed    | 26m23s   |
| infrastructure-test | infrastructure-test-migrate | Failed    | 30m27s   |
| infrastructure-test | infrastructure-test-recover | Failed    | 23m48s   |
| bastion-test        | bastion-test                | Succeeded | 8m37s    |
+---------------------+-----------------------------+-----------+----------+

@kon-angelo
Copy link
Contributor

/test

@testmachinery
Copy link

testmachinery bot commented Oct 9, 2024

Testrun: e2e-2lxwq
Workflow: e2e-2lxwq-wf
Phase: Succeeded

+---------------------+-----------------------------+-----------+----------+
|        NAME         |            STEP             |   PHASE   | DURATION |
+---------------------+-----------------------------+-----------+----------+
| infrastructure-test | infrastructure-test-tf      | Succeeded | 34m17s   |
| infrastructure-test | infrastructure-test-flow    | Succeeded | 26m7s    |
| infrastructure-test | infrastructure-test-migrate | Succeeded | 30m4s    |
| infrastructure-test | infrastructure-test-recover | Succeeded | 27m25s   |
| bastion-test        | bastion-test                | Succeeded | 4m36s    |
| dnsrecord-test      | dnsrecord-test              | Succeeded | 5m53s    |
+---------------------+-----------------------------+-----------+----------+

Copy link
Contributor

@kon-angelo kon-angelo left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/changes Needs (more) changes needs/rebase Needs git rebase needs/review Needs review needs/second-opinion Needs second review by someone else labels Oct 9, 2024
@gardener-robot-ci-2 gardener-robot-ci-2 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Oct 9, 2024
@kon-angelo kon-angelo merged commit 8975d72 into gardener:master Oct 9, 2024
17 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Oct 9, 2024
@ScheererJ ScheererJ mentioned this pull request Oct 10, 2024
58 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/networking Networking related kind/enhancement Enhancement, improvement, extension needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) platform/aws Amazon web services platform/infrastructure reviewed/lgtm Has approval for merging reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/xl Size of pull request is huge (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants