no-jira: aws: set IPv6 block on AWSCluster NetworkSpec for dual-stack ipFamily#593
no-jira: aws: set IPv6 block on AWSCluster NetworkSpec for dual-stack ipFamily#593tthvo wants to merge 1 commit into
Conversation
When the infrastructure ipFamily is DualStackIPv4Primary or DualStackIPv6Primary, set the VPC IPv6 block on the AWSCluster so CAPA can create IPv6-capable resources. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Pipeline controller notification For optional jobs, comment This repository is configured in: LGTM mode |
|
@tthvo: This pull request explicitly references no jira issue. DetailsIn response to this:
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 openshift-eng/jira-lifecycle-plugin repository. |
WalkthroughThe pull request adds IPv6 configuration support to AWSCluster. The implementation extends ChangesIPv6 Support for AWSCluster
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 15✅ Passed checks (15 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
/hold |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pkg/controllers/infracluster/aws.go`:
- Around line 136-138: The existing comment in
pkg/controllers/infracluster/aws.go is misleading about when CAPA requires a VPC
IPv6 block; update the comment near the code that sets IPv6 for both
DualStackIPv4Primary and DualStackIPv6Primary to clearly state that CAPA
requires the VPC IPv6 block whenever IPv6 addressing is enabled (including both
IPv6-primary and IPv4-primary dual-stack clusters), and that the code
intentionally sets the IPv6 block for both DualStackIPv4Primary and
DualStackIPv6Primary to indicate IPv6 addressing is enabled; reference the
DualStackIPv4Primary and DualStackIPv6Primary symbols in the comment so readers
immediately see which branches are affected.
- Line 86: The code calls r.newAWSCluster(providerSpec, apiURL, int32(port),
r.Infra.Status.PlatformStatus.AWS.IPFamily) without guarding that
r.Infra.Status.PlatformStatus.AWS is non-nil; add a nil-check before accessing
IPFamily (e.g., verify r.Infra != nil && r.Infra.Status.PlatformStatus != nil &&
r.Infra.Status.PlatformStatus.AWS != nil) and handle the nil case by returning
an error or using a safe default prior to invoking r.newAWSCluster so the code
never dereferences a nil AWS pointer.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited)
Review profile: CHILL
Plan: Enterprise
Run ID: f791e52c-9f19-409f-9f12-ea1b270b86e8
📒 Files selected for processing (2)
pkg/controllers/infracluster/aws.gopkg/controllers/infracluster/infracluster_controller_test.go
|
@tthvo: all tests passed! Full PR test history. Your PR dashboard. DetailsInstructions 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-sigs/prow repository. I understand the commands that are listed here. |
Description
When the infrastructure ipFamily is
DualStackIPv4PrimaryorDualStackIPv6Primary, set the VPC IPv6 block on the AWSCluster so CAPA can create IPv6-capable resources.Note: CAPA requires the VPC IPv6 block to be set to assign primary IPv6 addresses to instances. This is only applicable to IPv6 primary, but we set it for both dual-stack families to indicate that the VPC has IPv6 addressing enabled.
Summary by CodeRabbit
New Features
Tests