-
Notifications
You must be signed in to change notification settings - Fork 71
[feat] : add ipv6 ipam to CCM #369
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #369 +/- ##
==========================================
- Coverage 75.83% 72.44% -3.40%
==========================================
Files 16 19 +3
Lines 3054 3498 +444
==========================================
+ Hits 2316 2534 +218
- Misses 547 733 +186
- Partials 191 231 +40 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
47b9f3b to
477a5a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- go.mod: Language not supported
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- go.mod: Language not supported
Comments suppressed due to low confidence (1)
cloud/linode/nodeipamcontroller.go:45
- The default IPv6 node CIDR mask size has been changed from 64 to 112. Please confirm that this new value aligns with the desired network design and update any related documentation if necessary.
defaultNodeMaskCIDRIPv6 = 112
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- go.mod: Language not supported
35a5cc4 to
ee7a97c
Compare
3c9c16f to
9a369d3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds IPv6 IP Address Management (IPAM) support to the cloud controller manager, enabling it to allocate both IPv4 and IPv6 pod CIDRs to nodes when started with the --allocate-node-cidrs flag. The implementation creates a new node IPAM controller that calculates unique /112 IPv6 ranges from each node's /64 range and extends the Linode client to retrieve IPv6 configurations.
Key changes:
- Introduction of a new cloud/nodeipam controller and ipam package for dual-stack CIDR allocation
- Extension of Linode client API with ListInstanceConfigs method to retrieve IPv6 range information
- Addition of configuration flag to optionally disable IPv6 allocation
Reviewed Changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| main.go | Adds new command-line flag for disabling IPv6 node CIDR allocation |
| go.mod | Updates linodego dependency and adds required indirect dependencies |
| docs/configuration/nodeipam.md | Updates documentation to reflect IPv6 support and new default mask size |
| docs/configuration/environment.md | Documents new IPv6 disable flag |
| deploy/chart/values.yaml | Adds Helm chart value for IPv6 disable option |
| deploy/chart/templates/daemonset.yaml | Adds conditional flag to daemonset template |
| cloud/nodeipam/ | New controller package implementing dual-stack IPAM functionality |
| cloud/nodeipam/ipam/ | Core IPAM logic with cloud allocator for Linode-specific IPv6 allocation |
| cloud/linode/nodeipamcontroller.go | Linode-specific node IPAM controller configuration |
| cloud/linode/client/ | Extends client interface with ListInstanceConfigs method for IPv6 retrieval |
| Makefile | Updates test coverage to include new nodeipam packages |
Comments suppressed due to low confidence (1)
cloud/nodeipam/ipam/cloud_allocator.go:360
- [nitpick] Variable name 'ipv6Range' should follow Go naming conventions and be 'ipv6Range' or better yet 'ipv6RangeStr' to indicate it's a string representation.
if ipv6Range == "" {
858f274 to
f3eb36f
Compare
General:
This PR enables ipv6 ipam allocation to nodes. If CCM is started with
--allocate-node-cidrs, it will allocate both ipv4 and ipv6 pod CIDRs to nodes.This PR adds IPv6 IP Address Management (IPAM) support to the cloud controller manager by extending the node IPAM allocator to compute and assign unique /112 IPv6 ranges from each node’s /64, updating Linode client interfaces and tests accordingly.
Introduce a new cloud/nodeipam controller and ipam package that allocates both IPv4 and IPv6 PodCIDRs.
Extend Linode client API (ListInstanceConfigs) and update mocks, metrics, and go.mod deps to support IPv6 range retrieval.
Update the Linode-specific nodeipamcontroller to pass IPv6 mask defaults and enforce only one IPv4 cluster CIDR.
Note
In this PR, we are adding a function to calculate unique /112 ipv6 cidr range for each node from the /64 cidr allocated to it. Dependencies for starting CCM with
--allocate-node-cidrsflag:To disable ipv6 allocation logic, one can specify
--disable-ipv6-node-cidr-allocation=trueto just use ipv4 allocation.Sample CAPL PR which does the same: linode/cluster-api-provider-linode#773
Pull Request Guidelines: