Skip to content

Commit f2cbd0f

Browse files
author
Jose Villalta
committed
feat(netlib): Add IPv6 support for daemon bridge namespace configuration
- Add IPv6 subnet support for daemon-bridge NAT rules - Enable sysctl ipForwarding key for IPv6 for Managed Daemons - Use ip6tables for NAT when IPv6 is enabled - Consolidate NAT args functions into single parameterized function - Add IPv6 IPAM configuration support - Update CNI plugin configuration for dual-stack support
1 parent 636c1dd commit f2cbd0f

File tree

11 files changed

+1648
-112
lines changed

11 files changed

+1648
-112
lines changed

agent/ecscni/plugin_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ import (
2828

2929
const (
3030
// ECSCNIVersion, ECSCNIGitHash, VPCCNIGitHash needs to be updated every time CNI plugin is updated.
31-
currentECSCNIVersion = "2024.09.0"
32-
currentECSCNIGitHash = "7b4ec6016ab221469fa3abfc00ea7c05f236c26c"
31+
currentECSCNIVersion = "2026.01.0"
32+
currentECSCNIGitHash = "3302076781563428b69e0856b8fdd59b2ac0658f"
3333
currentVPCCNIGitHash = "a4e9ac076709c882a904afabc4c24c7700600f6b"
3434
)
3535

ecs-agent/netlib/model/ecscni/ipam_config.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
// IPAMConfig defines the configuration required for ipam plugin
2323
type IPAMConfig struct {
2424
CNIConfig
25+
// IPv4 fields
2526
// IPV4Subnet is the ip address range managed by ipam
2627
IPV4Subnet string `json:"ipv4-subnet,omitempty"`
2728
// IPV4Address is the ip address to deal with(assign or release) in ipam
@@ -30,13 +31,25 @@ type IPAMConfig struct {
3031
IPV4Gateway string `json:"ipv4-gateway,omitempty"`
3132
// IPV4Routes is the route to added in the container namespace
3233
IPV4Routes []*types.Route `json:"ipv4-routes,omitempty"`
34+
35+
// IPv6 fields
36+
// IPV6Subnet is the IPv6 address range managed by ipam
37+
IPV6Subnet string `json:"ipv6-subnet,omitempty"`
38+
// IPV6Address is the IPv6 address to deal with(assign or release) in ipam
39+
IPV6Address string `json:"ipv6-address,omitempty"`
40+
// IPV6Gateway is the IPv6 gateway returned by ipam
41+
IPV6Gateway string `json:"ipv6-gateway,omitempty"`
42+
// IPV6Routes is the IPv6 route to added in the container namespace
43+
IPV6Routes []*types.Route `json:"ipv6-routes,omitempty"`
44+
3345
// ID is the key stored with the assigned ip in ipam
3446
ID string `json:"id"`
3547
}
3648

3749
func (ic *IPAMConfig) String() string {
38-
return fmt.Sprintf("%s, subnet: %s, ip: %s, gw: %s, route: %s",
39-
ic.CNIConfig.String(), ic.IPV4Subnet, ic.IPV4Address, ic.IPV4Gateway, ic.IPV4Routes)
50+
return fmt.Sprintf("%s, ipv4-subnet: %s, ipv4-address: %s, ipv4-gateway: %s, ipv4-routes: %s, ipv6-subnet: %s, ipv6-address: %s, ipv6-gateway: %s, ipv6-routes: %s",
51+
ic.CNIConfig.String(), ic.IPV4Subnet, ic.IPV4Address, ic.IPV4Gateway, ic.IPV4Routes,
52+
ic.IPV6Subnet, ic.IPV6Address, ic.IPV6Gateway, ic.IPV6Routes)
4053
}
4154

4255
func (ic *IPAMConfig) InterfaceName() string {

0 commit comments

Comments
 (0)