Skip to content

Allow migration from dual-stack [IPv4, IPv6] to single stack [IPv4] networking#1481

Merged
kon-angelo merged 2 commits intogardener:masterfrom
axel7born:enh/migrate-to-single
Sep 18, 2025
Merged

Allow migration from dual-stack [IPv4, IPv6] to single stack [IPv4] networking#1481
kon-angelo merged 2 commits intogardener:masterfrom
axel7born:enh/migrate-to-single

Conversation

@axel7born
Copy link
Copy Markdown
Contributor

How to categorize this PR?

/area networking
/kind enhancement
/platform aws

What this PR does / why we need it:
PR is needed for gardener/gardener#12967

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

Migration from dual-stack [IPv4, IPv6] to [IPv4] networking is now allowed.

@axel7born axel7born requested a review from a team as a code owner September 18, 2025 07:25
@gardener-robot gardener-robot added area/networking Networking related kind/enhancement Enhancement, improvement, extension platform/aws Amazon web services platform/infrastructure needs/review Needs review size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 18, 2025
@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 Sep 18, 2025
@github-actions github-actions Bot 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 Sep 18, 2025
"useWorkloadIdentity": useWorkloadIdentity,
}
enabled := mode != "ipv4"
enabled := mode != "ipv4" || utils.HasIPv6NodeCIDR(cluster.Shoot.Status.Networking.Nodes)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could a nil pointer access happen here?
I think we should check for that to be on the safe side.
It could even be done in HasIPv6NodeCIDR since it's always called with cluster.Shoot.Status.Networking.Nodes.

Comment thread pkg/utils/iputil.go
@@ -0,0 +1,22 @@
package utils
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Missing SPDX header.

Comment thread pkg/utils/iputil.go Outdated
}

// HasIPv6NodeCIDR checks if any of the node CIDRs is IPv6
func HasIPv6NodeCIDR(nodeCIDRs []string) bool {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you please add some unit tests.

@gardener-robot gardener-robot added the needs/changes Needs (more) changes label Sep 18, 2025
@gardener-robot gardener-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 18, 2025
@github-actions
Copy link
Copy Markdown
Contributor

The recent changes introduce enhancements that better support IPv6 networking configurations in the Gardener AWS extension. Specifically, the update includes utility functions that aid in determining IPv6 support by inspecting node CIDR configurations. These changes improve the decision-making process around feature enablement in the control plane and ensure optimal configuration without relying solely on predefined networking specifications.

Walkthrough

  • New Feature: Improved handling of IPv6 configurations by checking node CIDR for IPv6 addresses across the control plane components.
  • Refactor: Introduced util functions for validating IPv6 CIDR and assessing IPv6 presence in cluster node configurations.
  • Test: Added comprehensive tests for new utils ensuring accurate IPv6 detection under various scenarios.

Model: gpt-4o | Prompt Tokens: 1858 | Completion Tokens: 142

@gardener-robot gardener-robot removed the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 18, 2025
@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 Sep 18, 2025
@github-actions github-actions Bot 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 18, 2025
Copy link
Copy Markdown
Contributor

@hebelsan hebelsan 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/review Needs review labels Sep 18, 2025
@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 Sep 18, 2025
@github-actions github-actions Bot 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 18, 2025
@kon-angelo kon-angelo merged commit 4e0111c into gardener:master Sep 18, 2025
73 checks passed
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Sep 18, 2025
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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/closed Issue is closed (either delivered or triaged)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants