Skip to content

feat: enhancing AWS provider GetDNSClusterIP for IPv6 - #563

Merged
ccpeng merged 1 commit into
keikoproj:masterfrom
ccpeng:ipv6-dns-cluster-ip
Jul 30, 2026
Merged

ccpeng merged 1 commit into
keikoproj:masterfrom
ccpeng:ipv6-dns-cluster-ip

Conversation

@ccpeng

@ccpeng ccpeng commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

closes #562

  • Bug fix (non-breaking change which fixes an issue)
  • Feature/Enhancement (non-breaking change which adds functionality)

Description

GetDNSClusterIP derives the cluster DNS IP by the standard EKS convention—the 10th address of the service CIDR (network address + 10: IPv4's .10, IPv6's ::a)—but it only reads ServiceIpv4Cidr and computes this via dotted-quad string math (strings.Split(ip, ".")[3]), so on an IPv6 EKS cluster, where ServiceIpv4Cidr is empty and ServiceIpv6Cidr is set instead, it panics with index out of range [3] with length 1 and crashes every InstanceGroup reconcile before any status is written. This makes the derivation IPv6-aware (parse ServiceIpv6Cidr and return the service CIDR's network address with its last byte set to 0x0a) and adds guards so a malformed or empty CIDR returns "" instead of panicking. Verified against a live IPv6 cluster (fd31:8cc0:942b::/108 → fd31:8cc0:942b::a, matching the actual kube-dns ClusterIP) with unit tests covering the IPv6, empty-CIDR, and nil-config cases.

Testing performed

  • Unit tests added with values from live cluster

Checklist

  • I've read the CONTRIBUTING doc
  • I've added/updated tests that prove my fix is effective or that my feature works
  • I've added necessary documentation (if appropriate)
  • I've run make test locally and all tests pass
  • I've signed-off my commits with git commit -s for DCO verification
  • I've updated any relevant documentation
  • Code follows the style guidelines of this project

@codecov-commenter

codecov-commenter commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 76.47059% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.12%. Comparing base (1a191f2) to head (b457f60).

Files with missing lines Patch % Lines
controllers/providers/aws/eks.go 76.47% 2 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #563      +/-   ##
==========================================
+ Coverage   47.02%   47.12%   +0.09%     
==========================================
  Files          40       40              
  Lines        5961     5976      +15     
==========================================
+ Hits         2803     2816      +13     
- Misses       2999     3000       +1     
- Partials      159      160       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Chun-Che Peng <20843713+ccpeng@users.noreply.github.com>
@ccpeng
ccpeng force-pushed the ipv6-dns-cluster-ip branch from 067afc7 to b457f60 Compare July 30, 2026 16:08
@ccpeng
ccpeng marked this pull request as ready for review July 30, 2026 16:16
@ccpeng
ccpeng requested review from a team as code owners July 30, 2026 16:16
@ccpeng
ccpeng enabled auto-merge (squash) July 30, 2026 16:16
@ccpeng ccpeng changed the title enhancing AWS provider GetDNSClusterIP for IPv6 feat: enhancing AWS provider GetDNSClusterIP for IPv6 Jul 30, 2026
@ccpeng
ccpeng merged commit c4365ca into keikoproj:master Jul 30, 2026
7 checks passed
@ccpeng
ccpeng deleted the ipv6-dns-cluster-ip branch July 30, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] instance-manager panics (index out of range [3]) reconciling any InstanceGroup on an IPv6 EKS cluster

3 participants