Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions agent/ecscni/plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ import (

const (
// ECSCNIVersion, ECSCNIGitHash, VPCCNIGitHash needs to be updated every time CNI plugin is updated.
currentECSCNIVersion = "2024.09.0"
currentECSCNIGitHash = "7b4ec6016ab221469fa3abfc00ea7c05f236c26c"
currentECSCNIVersion = "2026.01.0"
currentECSCNIGitHash = "3302076781563428b69e0856b8fdd59b2ac0658f"
currentVPCCNIGitHash = "a4e9ac076709c882a904afabc4c24c7700600f6b"
)

Expand Down
2 changes: 1 addition & 1 deletion ecs-agent/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ require (
github.com/prometheus/common v0.26.0
github.com/stretchr/testify v1.8.4
github.com/vishvananda/netlink v1.2.1-beta.2
github.com/vishvananda/netns v0.0.4
go.etcd.io/bbolt v1.3.9
golang.org/x/exp v0.0.0-20231006140011-7918f672742d
golang.org/x/net v0.38.0
Expand Down Expand Up @@ -72,7 +73,6 @@ require (
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/vishvananda/netns v0.0.4 // indirect
go.opencensus.io v0.24.0 // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/sync v0.12.0 // indirect
Expand Down
17 changes: 15 additions & 2 deletions ecs-agent/netlib/model/ecscni/ipam_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
// IPAMConfig defines the configuration required for ipam plugin
type IPAMConfig struct {
CNIConfig
// IPv4 fields
// IPV4Subnet is the ip address range managed by ipam
IPV4Subnet string `json:"ipv4-subnet,omitempty"`
// IPV4Address is the ip address to deal with(assign or release) in ipam
Expand All @@ -30,13 +31,25 @@ type IPAMConfig struct {
IPV4Gateway string `json:"ipv4-gateway,omitempty"`
// IPV4Routes is the route to added in the container namespace
IPV4Routes []*types.Route `json:"ipv4-routes,omitempty"`

// IPv6 fields
// IPV6Subnet is the IPv6 address range managed by ipam
IPV6Subnet string `json:"ipv6-subnet,omitempty"`
// IPV6Address is the IPv6 address to deal with(assign or release) in ipam
IPV6Address string `json:"ipv6-address,omitempty"`
// IPV6Gateway is the IPv6 gateway returned by ipam
IPV6Gateway string `json:"ipv6-gateway,omitempty"`
// IPV6Routes is the IPv6 route to added in the container namespace
IPV6Routes []*types.Route `json:"ipv6-routes,omitempty"`

// ID is the key stored with the assigned ip in ipam
ID string `json:"id"`
}

func (ic *IPAMConfig) String() string {
return fmt.Sprintf("%s, subnet: %s, ip: %s, gw: %s, route: %s",
ic.CNIConfig.String(), ic.IPV4Subnet, ic.IPV4Address, ic.IPV4Gateway, ic.IPV4Routes)
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",
ic.CNIConfig.String(), ic.IPV4Subnet, ic.IPV4Address, ic.IPV4Gateway, ic.IPV4Routes,
ic.IPV6Subnet, ic.IPV6Address, ic.IPV6Gateway, ic.IPV6Routes)
}

func (ic *IPAMConfig) InterfaceName() string {
Expand Down
Loading
Loading