diff --git a/Makefile b/Makefile index 86bfb4b984..ce6645ee66 100644 --- a/Makefile +++ b/Makefile @@ -206,6 +206,7 @@ multi-arch-cni-init-build-push: # Run unit tests unit-test: export AWS_VPC_K8S_CNI_LOG_FILE=stdout unit-test: ## Run unit tests + go test -v $(VENDOR_OVERRIDE_FLAG) -coverprofile=coverage.txt -covermode=atomic ./cmd/... go test -v $(VENDOR_OVERRIDE_FLAG) -coverprofile=coverage.txt -covermode=atomic ./pkg/... # Run unit tests with race detection (can only be run natively) diff --git a/cmd/egress-cni-plugin/egressContext.go b/cmd/egress-cni-plugin/egressContext.go index e7bdd85e10..fce7d3480e 100644 --- a/cmd/egress-cni-plugin/egressContext.go +++ b/cmd/egress-cni-plugin/egressContext.go @@ -20,7 +20,7 @@ import ( "time" "github.com/containernetworking/cni/pkg/types" - "github.com/containernetworking/cni/pkg/types/current" + current "github.com/containernetworking/cni/pkg/types/100" "github.com/containernetworking/plugins/pkg/ns" "github.com/coreos/go-iptables/iptables" "github.com/vishvananda/netlink" @@ -116,7 +116,8 @@ func (ec *egressContext) setupContainerVethV4() (*current.Interface, *current.In containerInterface := ¤t.Interface{} err := ec.Ns.WithNetNSPath(ec.NsPath, func(hostNS ns.NetNS) error { - hostVeth, contVeth0, err := ec.Veth.Setup(ec.NetConf.IfName, ec.Mtu, hostNS) + // Empty veth MAC is passed + hostVeth, contVeth0, err := ec.Veth.Setup(ec.NetConf.IfName, ec.Mtu, "", hostNS) if err != nil { return err } @@ -481,7 +482,8 @@ func (ec *egressContext) setupContainerVethV6() (hostInterface, containerInterfa var hostVeth net.Interface var contVeth net.Interface - hostVeth, contVeth, err = ec.Veth.Setup(ec.NetConf.IfName, ec.Mtu, hostNS) + // Empty veth MAC is passed + hostVeth, contVeth, err = ec.Veth.Setup(ec.NetConf.IfName, ec.Mtu, "", hostNS) if err != nil { return err } diff --git a/cmd/egress-cni-plugin/main.go b/cmd/egress-cni-plugin/main.go index a1a85fc2cb..87741d6da4 100644 --- a/cmd/egress-cni-plugin/main.go +++ b/cmd/egress-cni-plugin/main.go @@ -20,7 +20,7 @@ import ( "github.com/containernetworking/cni/pkg/skel" "github.com/containernetworking/cni/pkg/types" - "github.com/containernetworking/cni/pkg/types/current" + current "github.com/containernetworking/cni/pkg/types/100" cniversion "github.com/containernetworking/cni/pkg/version" "github.com/containernetworking/plugins/pkg/utils" ) diff --git a/cmd/egress-cni-plugin/main_test.go b/cmd/egress-cni-plugin/main_test.go index c48b110a7c..2549d23190 100644 --- a/cmd/egress-cni-plugin/main_test.go +++ b/cmd/egress-cni-plugin/main_test.go @@ -44,7 +44,7 @@ func TestCmdAddV4(t *testing.T) { ContainerID: containerIDV4, IfName: "eth0", StdinData: []byte(`{ - "cniVersion":"0.4.0", + "cniVersion":"1.0.0", "mtu":"9001", "name":"aws-cni", "enabled":"true", @@ -55,7 +55,7 @@ func TestCmdAddV4(t *testing.T) { "podSGEnforcingMode":"strict", "prevResult": { - "cniVersion":"0.4.0", + "cniVersion":"1.0.0", "interfaces": [ {"name":"eni36e5b0ee702"}, @@ -94,13 +94,13 @@ func TestCmdAddV4(t *testing.T) { fmt.Sprintf("nat POSTROUTING -s 169.254.172.10 -j %s -m comment --comment name: \"aws-cni\" id: \"%s\"", snatChainV4, containerIDV4)} assert.EqualValues(t, expectIptablesRules, actualIptablesRules) - expectRouteDel := []string{"route del: {Ifindex: 2 Dst: 169.254.172.0/22 Src: Gw: Flags: [] Table: 0}"} + expectRouteDel := []string{"route del: {Ifindex: 2 Dst: 169.254.172.0/22 Src: Gw: Flags: [] Table: 0 Realm: 0}"} assert.EqualValues(t, expectRouteDel, actualRouteDel) expectRouteAdd := []string{ - "route add: {Ifindex: 2 Dst: 169.254.172.1/32 Src: 169.254.172.10 Gw: Flags: [] Table: 0}", - "route add: {Ifindex: 2 Dst: 169.254.172.0/22 Src: 169.254.172.10 Gw: 169.254.172.1 Flags: [] Table: 0}", - "route add: {Ifindex: 100 Dst: 169.254.172.10/32 Src: Gw: Flags: [] Table: 0}"} + "route add: {Ifindex: 2 Dst: 169.254.172.1/32 Src: 169.254.172.10 Gw: Flags: [] Table: 0 Realm: 0}", + "route add: {Ifindex: 2 Dst: 169.254.172.0/22 Src: 169.254.172.10 Gw: 169.254.172.1 Flags: [] Table: 0 Realm: 0}", + "route add: {Ifindex: 100 Dst: 169.254.172.10/32 Src: Gw: Flags: [] Table: 0 Realm: 0}"} assert.EqualValues(t, expectRouteAdd, actualRouteAdd) // the unit test write some output string not ends with '\n' and this cause go runner unable to interpret that a test was run. @@ -115,7 +115,7 @@ func TestCmdDelV4(t *testing.T) { ContainerID: containerIDV4, IfName: "eth0", StdinData: []byte(`{ - "cniVersion":"0.4.0", + "cniVersion":"1.0.0", "mtu":"9001", "name":"aws-cni", "enabled":"true", @@ -126,7 +126,7 @@ func TestCmdDelV4(t *testing.T) { "podSGEnforcingMode":"strict", "prevResult": { - "cniVersion":"0.4.0", + "cniVersion":"1.0.0", "interfaces": [ {"name":"eni36e5b0ee702"}, @@ -170,7 +170,7 @@ func TestCmdAddV6(t *testing.T) { ContainerID: containerIDV6, IfName: "eth0", StdinData: []byte(`{ - "cniVersion":"0.4.0", + "cniVersion":"1.0.0", "mtu":"9001", "name":"aws-cni", "enabled":"true", @@ -181,7 +181,7 @@ func TestCmdAddV6(t *testing.T) { "podSGEnforcingMode":"strict", "prevResult": { - "cniVersion":"0.4.0", + "cniVersion":"1.0.0", "interfaces": [ {"name":"eni36e5b0ee702"}, @@ -220,10 +220,10 @@ func TestCmdAddV6(t *testing.T) { fmt.Sprintf("nat POSTROUTING -s fd00::10 -j %s -m comment --comment name: \"aws-cni\" id: \"%s\"", snatChainV6, containerIDV6)} assert.EqualValues(t, expectIptablesRules, actualIptablesRules) - expectRouteAdd := []string{"{Ifindex: 100 Dst: fd00::10/128 Src: Gw: Flags: [] Table: 0}"} + expectRouteAdd := []string{"{Ifindex: 100 Dst: fd00::10/128 Src: Gw: Flags: [] Table: 0 Realm: 0}"} assert.EqualValues(t, expectRouteAdd, actualRouteAdd) - expectRouteReplace := []string{"{Ifindex: 2 Dst: ::/0 Src: Gw: fe80::10 Flags: [] Table: 0}"} + expectRouteReplace := []string{"{Ifindex: 2 Dst: ::/0 Src: Gw: fe80::10 Flags: [] Table: 0 Realm: 0}"} assert.EqualValues(t, expectRouteReplace, actualRouteReplace) // the unit test write some output string not ends with '\n' and this cause go runner unable to interpret that a test was run. @@ -238,7 +238,7 @@ func TestCmdDelV6(t *testing.T) { ContainerID: containerIDV6, IfName: "eth0", StdinData: []byte(`{ - "cniVersion":"0.4.0", + "cniVersion":"1.0.0", "mtu":"9001", "name":"aws-cni", "enabled":"true", @@ -249,7 +249,7 @@ func TestCmdDelV6(t *testing.T) { "podSGEnforcingMode":"strict", "prevResult": { - "cniVersion":"0.4.0", + "cniVersion":"1.0.0", "interfaces": [ {"name":"eni36e5b0ee702"}, diff --git a/cmd/egress-cni-plugin/test_utils.go b/cmd/egress-cni-plugin/test_utils.go index 13b7496a58..c81a91233a 100644 --- a/cmd/egress-cni-plugin/test_utils.go +++ b/cmd/egress-cni-plugin/test_utils.go @@ -17,7 +17,7 @@ import ( "fmt" "net" - "github.com/containernetworking/cni/pkg/types/current" + current "github.com/containernetworking/cni/pkg/types/100" _ns "github.com/containernetworking/plugins/pkg/ns" "github.com/golang/mock/gomock" "github.com/vishvananda/netlink" @@ -44,10 +44,9 @@ func SetupAddExpectV4(ec egressContext, chain string, actualIptablesRules, actua ec.Ipam.(*mock_ipam.MockHostIpam).EXPECT().ExecAdd("host-local", gomock.Any()).Return( ¤t.Result{ - CNIVersion: "0.4.0", + CNIVersion: "1.0.0", IPs: []*current.IPConfig{ - ¤t.IPConfig{ - Version: "4", + { Address: net.IPNet{ IP: net.ParseIP("169.254.172.10"), Mask: net.CIDRMask(22, 32), @@ -66,7 +65,7 @@ func SetupAddExpectV4(ec egressContext, chain string, actualIptablesRules, actua f(nsParent) }).Return(nil) - ec.Veth.(*mock_veth.MockVeth).EXPECT().Setup(egressIPv4InterfaceName, 9001, gomock.Any()).Return( + ec.Veth.(*mock_veth.MockVeth).EXPECT().Setup(egressIPv4InterfaceName, 9001, "", gomock.Any()).Return( net.Interface{ Name: HostIfName, HardwareAddr: macHost[:], @@ -188,10 +187,9 @@ func SetupAddExpectV6(c egressContext, chain string, actualIptablesRules, actual c.Ipam.(*mock_ipam.MockHostIpam).EXPECT().ExecAdd("host-local", gomock.Any()).Return( ¤t.Result{ - CNIVersion: "0.4.0", + CNIVersion: "1.0.0", IPs: []*current.IPConfig{ - ¤t.IPConfig{ - Version: "6", + { Address: net.IPNet{ IP: net.ParseIP("fd00::10"), Mask: net.CIDRMask(8, 128), @@ -209,7 +207,7 @@ func SetupAddExpectV6(c egressContext, chain string, actualIptablesRules, actual f(nsParent) }).Return(nil).AnyTimes() - c.Veth.(*mock_veth.MockVeth).EXPECT().Setup(egressIPv6InterfaceName, 9001, gomock.Any()).Return( + c.Veth.(*mock_veth.MockVeth).EXPECT().Setup(egressIPv6InterfaceName, 9001, "", gomock.Any()).Return( net.Interface{ Name: HostIfName, HardwareAddr: macHost[:], diff --git a/cmd/routed-eni-cni-plugin/cni.go b/cmd/routed-eni-cni-plugin/cni.go index 46e2c6fb0d..25415958cb 100644 --- a/cmd/routed-eni-cni-plugin/cni.go +++ b/cmd/routed-eni-cni-plugin/cni.go @@ -29,7 +29,7 @@ import ( "github.com/containernetworking/cni/pkg/skel" "github.com/containernetworking/cni/pkg/types" - "github.com/containernetworking/cni/pkg/types/current" + current "github.com/containernetworking/cni/pkg/types/100" cniSpecVersion "github.com/containernetworking/cni/pkg/version" "github.com/pkg/errors" "golang.org/x/net/context" @@ -187,7 +187,6 @@ func add(args *skel.CmdArgs, cniTypes typeswrapper.CNITYPES, grpcClient grpcwrap // We will let the values in result struct guide us in terms of IP Address Family configured. var v4Addr, v6Addr, addr *net.IPNet - var addrFamily string // We don't support dual stack mode currently so it has to be either v4 or v6 mode. if r.IPv4Addr != "" { @@ -195,16 +194,16 @@ func add(args *skel.CmdArgs, cniTypes typeswrapper.CNITYPES, grpcClient grpcwrap IP: net.ParseIP(r.IPv4Addr), Mask: net.CIDRMask(32, 32), } - addrFamily = "4" addr = v4Addr } else if r.IPv6Addr != "" { v6Addr = &net.IPNet{ IP: net.ParseIP(r.IPv6Addr), Mask: net.CIDRMask(128, 128), } - addrFamily = "6" addr = v6Addr } + // AddNetwork guarantees that Gateway string is a valid IPNet + gw := net.ParseIP(r.PodENISubnetGW) var hostVethName string var dummyInterface *current.Interface @@ -257,9 +256,9 @@ func add(args *skel.CmdArgs, cniTypes typeswrapper.CNITYPES, grpcClient grpcwrap containerInterfaceIndex := 1 ips := []*current.IPConfig{ { - Version: addrFamily, - Address: *addr, Interface: &containerInterfaceIndex, + Address: *addr, + Gateway: gw, }, } diff --git a/cmd/routed-eni-cni-plugin/cni_test.go b/cmd/routed-eni-cni-plugin/cni_test.go index a81cc37956..9b988375c5 100644 --- a/cmd/routed-eni-cni-plugin/cni_test.go +++ b/cmd/routed-eni-cni-plugin/cni_test.go @@ -22,7 +22,7 @@ import ( "github.com/aws/amazon-vpc-cni-k8s/pkg/sgpp" "github.com/aws/amazon-vpc-cni-k8s/pkg/utils/logger" "github.com/aws/aws-sdk-go/aws" - "github.com/containernetworking/cni/pkg/types/current" + current "github.com/containernetworking/cni/pkg/types/100" "github.com/containernetworking/cni/pkg/skel" "github.com/containernetworking/cni/pkg/types" @@ -42,7 +42,7 @@ const ( containerID = "test-container" netNS = "/proc/ns/1234" ifName = "eth0" - cniVersion = "1.0" + cniVersion = "1.1" cniName = "aws-cni" pluginLogLevel = "Debug" pluginLogFile = "/var/log/aws-routed-eni/plugin.log" @@ -233,8 +233,9 @@ func TestCmdDelErrDelNetwork(t *testing.T) { mockC.EXPECT().DelNetwork(gomock.Any(), gomock.Any()).Return(delNetworkReply, errors.New("error on DelNetwork")) + // On DelNetwork fail, the CNI must not return an error to kubelet as deletes are best-effort. err := del(cmdArgs, mocksTypes, mocksGRPC, mocksRPC, mocksNetwork) - assert.Error(t, err) + assert.Nil(t, err) } func TestCmdDelErrTeardown(t *testing.T) { @@ -396,7 +397,6 @@ func Test_tryDelWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -449,7 +449,6 @@ func Test_tryDelWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -503,7 +502,6 @@ func Test_tryDelWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -541,7 +539,6 @@ func Test_tryDelWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -583,7 +580,6 @@ func Test_tryDelWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -625,7 +621,6 @@ func Test_tryDelWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -662,7 +657,6 @@ func Test_tryDelWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -796,7 +790,6 @@ func Test_teardownPodNetworkWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -849,7 +842,6 @@ func Test_teardownPodNetworkWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -886,7 +878,6 @@ func Test_teardownPodNetworkWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -928,7 +919,6 @@ func Test_teardownPodNetworkWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -969,7 +959,6 @@ func Test_teardownPodNetworkWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), @@ -1010,7 +999,6 @@ func Test_teardownPodNetworkWithPrevResult(t *testing.T) { }, IPs: []*current.IPConfig{ { - Version: "4", Address: net.IPNet{ IP: net.ParseIP("192.168.1.1"), Mask: net.CIDRMask(32, 32), diff --git a/go.mod b/go.mod index 5e51d7a96e..cfa1ae4cdd 100644 --- a/go.mod +++ b/go.mod @@ -127,7 +127,7 @@ require ( github.com/prometheus/procfs v0.10.1 // indirect github.com/rubenv/sql-migrate v1.5.2 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1 // indirect + github.com/safchain/ethtool v0.3.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/cobra v1.7.0 // indirect @@ -175,8 +175,3 @@ replace golang.org/x/crypto => golang.org/x/crypto v0.14.0 // Cannot be removed until all dependencies use net library v0.17.0 or higher replace golang.org/x/net => golang.org/x/net v0.17.0 - -// containernetworking packages must remain pinned until VPC CNI moves to CNI spec 1.0.0 -replace github.com/containernetworking/cni => github.com/containernetworking/cni v0.8.1 - -replace github.com/containernetworking/plugins => github.com/containernetworking/plugins v0.9.1 diff --git a/go.sum b/go.sum index bc4c29181f..9b3d4b636b 100644 --- a/go.sum +++ b/go.sum @@ -19,17 +19,14 @@ github.com/Masterminds/sprig/v3 v3.2.3 h1:eL2fZNezLomi0uOLqjQoN6BfsDD+fyLtgbJMAj github.com/Masterminds/sprig/v3 v3.2.3/go.mod h1:rXcFaZ2zZbLRJv/xSysmlgIM1u11eBaRMhvYXJNkGuM= github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM= github.com/Masterminds/squirrel v1.5.4/go.mod h1:NNaOrjSoIDfDA40n7sr2tPNZRfjzjA400rg+riTZj10= -github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= -github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.11.0 h1:7EFNIY4igHEXUdj1zXgAyU3fLc7QfOKHbkldRVTBdiM= github.com/Microsoft/hcsshim v0.11.0/go.mod h1:OEthFdQv/AD2RAdzR6Mm1N1KPCztGKDurW1Z8b8VGMM= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= -github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= @@ -49,7 +46,6 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bshuster-repo/logrus-logstash-hook v1.0.0 h1:e+C0SB5R1pu//O4MQ3f9cFuPGoOVeF2fE4Og9otCc70= github.com/bshuster-repo/logrus-logstash-hook v1.0.0/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk= -github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd h1:rFt+Y/IK1aEZkEHchZRSq9OQbsSzIT/OrI8YFFmRIng= github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8= github.com/bugsnag/osext v0.0.0-20130617224835-0dd3f918b21b h1:otBG+dV+YK+Soembjv71DPz3uX/V/6MMlSyD9JBQ6kQ= @@ -71,24 +67,18 @@ github.com/containerd/containerd v1.7.6 h1:oNAVsnhPoy4BTPQivLgTzI9Oleml9l/+eYIDY github.com/containerd/containerd v1.7.6/go.mod h1:SY6lrkkuJT40BVNO37tlYTSnKJnP5AXBc0fhx0q+TJ4= github.com/containerd/continuity v0.4.2 h1:v3y/4Yz5jwnvqPKJJ+7Wf93fyWoCB3F5EclWG023MDM= github.com/containerd/continuity v0.4.2/go.mod h1:F6PTNCKepoxEaXLQp3wDAjygEnImnZ/7o4JzpodfroQ= -github.com/containernetworking/cni v0.8.1 h1:7zpDnQ3T3s4ucOuJ/ZCLrYBxzkg0AELFfII3Epo9TmI= -github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/plugins v0.9.1 h1:FD1tADPls2EEi3flPc2OegIY1M9pUa9r2Quag7HMLV8= -github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= -github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/containernetworking/cni v1.1.2 h1:wtRGZVv7olUHMOqouPpn3cXJWpJgM6+EUl31EQbXALQ= +github.com/containernetworking/cni v1.1.2/go.mod h1:sDpYKmGVENF3s6uvMvGgldDWeG8dMxakj/u+i9ht9vw= +github.com/containernetworking/plugins v1.2.0 h1:SWgg3dQG1yzUo4d9iD8cwSVh1VqI+bP7mkPDoSfP9VU= +github.com/containernetworking/plugins v1.2.0/go.mod h1:/VjX4uHecW5vVimFa1wkG4s+r/s9qIfPdqlLF4TW8c4= github.com/coreos/go-iptables v0.7.0 h1:XWM3V+MPRr5/q51NuWSgU0fqMad64Zyxs8ZUoMsamr8= github.com/coreos/go-iptables v0.7.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY= github.com/creack/pty v1.1.18/go.mod h1:MOBLtS5ELjhRRrroQr9kyvTxUAFNvYEK993ew/Vr4O4= github.com/cyphar/filepath-securejoin v0.2.4 h1:Ugdm7cg7i6ZK6x3xDF1oEu1nfkyfH53EtKeQYTC3kyg= github.com/cyphar/filepath-securejoin v0.2.4/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= -github.com/d2g/dhcp4 v0.0.0-20170904100407-a1d1b6c41b1c/go.mod h1:Ct2BUK8SB0YC1SMSibvLzxjeJLnrYEVLULFNiHY9YfQ= -github.com/d2g/dhcp4client v1.0.0/go.mod h1:j0hNfjhrt2SxUOw55nL0ATM/z4Yt3t2Kd1mW34z5W5s= -github.com/d2g/dhcp4server v0.0.0-20181031114812-7d4a0a7f59a5/go.mod h1:Eo87+Kg/IX2hfWJfwxMzLyuSZyxSoAug2nGa1G2QAi8= -github.com/d2g/hardwareaddr v0.0.0-20190221164911-e7d9fbe030e4/go.mod h1:bMl4RjIciD2oAxI7DmWRx6gbeqrkoLqv3MV0vzNad+I= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -131,6 +121,7 @@ github.com/foxcpp/go-mockdns v1.0.0/go.mod h1:lgRN6+KxQBawyIghpnl5CezHFGS9VLzvtV github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= +github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA= @@ -157,6 +148,7 @@ github.com/go-openapi/swag v0.22.3/go.mod h1:UzaqsxGiab7freDnrUUra0MwWfN/q7tE4j+ github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= +github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 h1:tfuBGBXKqDEevZMzYi5KSi8KkcZtzBcTgAUUtapy0OI= github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572/go.mod h1:9Pwr4B2jHnOSGXyyzV8ROjYa2ojvAY6HCGYYfMoC3Ls= github.com/gobuffalo/logger v1.0.6 h1:nnZNpxYo0zx+Aj9RfMPBm+x9zAU2OayFh/xrAWi34HU= @@ -167,7 +159,6 @@ github.com/gobuffalo/packr/v2 v2.8.3 h1:xE1yzvnO56cUC0sTpKR3DIbxZgB54AftTFMhB2XE github.com/gobuffalo/packr/v2 v2.8.3/go.mod h1:0SahksCVcx4IMnigTjiFuyldmTrdTctXsOdiU5KwbKc= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= -github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= @@ -188,6 +179,7 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= +github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/gomodule/redigo v1.8.2 h1:H5XSIre1MB5NbPYFp+i1NBbb5qN1W8Y8YAQoAYbkm8k= @@ -208,6 +200,7 @@ github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeN github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec= github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 h1:El6M4kTTCOh6aBiKaUGG7oYTSPP8MxqL4YI3kZKwcP4= @@ -241,7 +234,6 @@ github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/j-keck/arping v0.0.0-20160618110441-2cf9dc699c56/go.mod h1:ymszkNOg6tORTn+6F6j+Jc8TOr5osrynvN6ivFWZ2GA= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= @@ -299,7 +291,6 @@ github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPn github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-runewidth v0.0.9 h1:Lm995f3rfxdpd6TSmuVCHVb/QhupuXlYr8sCI/QdE+0= github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-shellwords v1.0.3/go.mod h1:3xCvwCdWdlDJUrvuMn7Wuy9eWs4pE8vqg+NOMyg4B2o= github.com/mattn/go-sqlite3 v1.14.6/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.15 h1:vfoHhTN1af61xCRSWzFIWzx2YskyMTwHLrExkBOjvxI= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= @@ -338,15 +329,20 @@ github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7P github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= -github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= +github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= -github.com/onsi/ginkgo v1.12.1 h1:mFwc4LvZ0xpSvDZ3E+k8Yte0hLOMxXUlP+yXtJqkYfQ= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= +github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= +github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/ginkgo/v2 v2.13.0 h1:0jY9lJquiL8fcf3M4LAXN5aMlS/b2BV86HFFPCPMgE4= github.com/onsi/ginkgo/v2 v2.13.0/go.mod h1:TE309ZR8s5FsKKpuB1YAQYBzCaAfUgatB/xlT/ETL/o= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= -github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= +github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= github.com/onsi/gomega v1.27.10 h1:naR28SdDFlqrG6kScpT8VWpu1xWY5nJRCF3XaYyBjhI= github.com/onsi/gomega v1.27.10/go.mod h1:RsS8tutOdbdgzbPtzzATp12yT7kM5I5aElG3evPbQ0M= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= @@ -390,9 +386,8 @@ github.com/rubenv/sql-migrate v1.5.2 h1:bMDqOnrJVV/6JQgQ/MxOpU+AdO8uzYYA/TxFUBzF github.com/rubenv/sql-migrate v1.5.2/go.mod h1:H38GW8Vqf8F0Su5XignRyaRcbXbJunSWxs+kmzlg0Is= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= -github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1 h1:ZFfeKAhIQiiOrQaI3/znw0gOmYpO28Tcu1YaqMa/jtQ= -github.com/safchain/ethtool v0.0.0-20210803160452-9aa261dae9b1/go.mod h1:Z0q5wiBQGYcxhMZ6gUqHn6pYNLypFAvaL3UvgZLR0U4= +github.com/safchain/ethtool v0.3.0 h1:gimQJpsI6sc1yIqP/y8GYgiXn/NjgvpM0RNoWLVVmP0= +github.com/safchain/ethtool v0.3.0/go.mod h1:SA9BwrgyAqNo7M+uaL6IYbxpm5wk3L7Mm6ocLW+CJUs= github.com/samber/lo v1.38.1 h1:j2XEAqXKb09Am4ebOg31SpvzUTTs6EN3VfgeLUhPdXM= github.com/samber/lo v1.38.1/go.mod h1:+m/ZKRl6ClXCE2Lgf3MsQlWfh4bn1bz6CXEOxnEXnEA= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= @@ -400,7 +395,6 @@ github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNX github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/sirupsen/logrus v1.0.6/go.mod h1:pMByvHTf9Beacp5x1UXfOR9xyW/9antXMhjMPG0dEzc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= @@ -426,7 +420,6 @@ github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netlink v1.2.1-beta.2 h1:Llsql0lnQEbHj0I1OuKyp8otXp0r3q0mPkuhwHfStVs= github.com/vishvananda/netlink v1.2.1-beta.2/go.mod h1:twkDnbuQxJYemMlGd4JFIcuhgX83tXhKS2B/PRMpOho= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= @@ -508,13 +501,15 @@ golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200217220822-9197077df867/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200728102440-3e129f6d46b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20201117170446-d9b008d0a637/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -524,6 +519,7 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0 h1:Af8nKPmuFypiUBjVoU9V20FiaFXOcuZI21p0ycVYYGE= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -543,6 +539,7 @@ golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3 golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= @@ -583,14 +580,12 @@ google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp0 google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.31.0 h1:g0LDEJHgrBl9N9r17Ru3sqWhkIx2NB67okBHPwC7hs8= google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -gopkg.in/airbrake/gobrake.v2 v2.0.9/go.mod h1:/h5ZAUhDkGaJfjzjKLSjv6zCL6O0LLBxU4K+aSYdM/U= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2/go.mod h1:Xk6kEKp8OKb+X14hQBKWaSkCsqBpgog8nAV2xsGOxlo= gopkg.in/inf.v0 v0.9.1 h1:73M5CoZyi3ZLMOyDlQh031Cx6N9NDJ2Vvfl76EDAgDc= gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw= gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= diff --git a/misc/10-aws.conflist b/misc/10-aws.conflist index 4a54989918..6304f9d887 100644 --- a/misc/10-aws.conflist +++ b/misc/10-aws.conflist @@ -1,5 +1,5 @@ { - "cniVersion": "0.4.0", + "cniVersion": "1.0.0", "name": "aws-cni", "disableCheck": true, "plugins": [ diff --git a/pkg/hostipamwrapper/hostipam.go b/pkg/hostipamwrapper/hostipam.go index 6969f9b20a..80fb1da797 100644 --- a/pkg/hostipamwrapper/hostipam.go +++ b/pkg/hostipamwrapper/hostipam.go @@ -16,7 +16,7 @@ package hostipamwrapper import ( "github.com/containernetworking/cni/pkg/types" - "github.com/containernetworking/cni/pkg/types/current" + current "github.com/containernetworking/cni/pkg/types/100" _ipam "github.com/containernetworking/plugins/pkg/ipam" ) diff --git a/pkg/hostipamwrapper/mocks/hostipam_mocks.go b/pkg/hostipamwrapper/mocks/hostipam_mocks.go index d09cc3a403..895b01f665 100644 --- a/pkg/hostipamwrapper/mocks/hostipam_mocks.go +++ b/pkg/hostipamwrapper/mocks/hostipam_mocks.go @@ -22,7 +22,7 @@ import ( reflect "reflect" types "github.com/containernetworking/cni/pkg/types" - current "github.com/containernetworking/cni/pkg/types/current" + types100 "github.com/containernetworking/cni/pkg/types/100" gomock "github.com/golang/mock/gomock" ) @@ -50,7 +50,7 @@ func (m *MockHostIpam) EXPECT() *MockHostIpamMockRecorder { } // ConfigureIface mocks base method. -func (m *MockHostIpam) ConfigureIface(arg0 string, arg1 *current.Result) error { +func (m *MockHostIpam) ConfigureIface(arg0 string, arg1 *types100.Result) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "ConfigureIface", arg0, arg1) ret0, _ := ret[0].(error) diff --git a/pkg/utils/cniutils/cni_utils.go b/pkg/utils/cniutils/cni_utils.go index 484c5b447c..11337dbceb 100644 --- a/pkg/utils/cniutils/cni_utils.go +++ b/pkg/utils/cniutils/cni_utils.go @@ -6,7 +6,7 @@ import ( "syscall" "time" - "github.com/containernetworking/cni/pkg/types/current" + current "github.com/containernetworking/cni/pkg/types/100" "github.com/coreos/go-iptables/iptables" "github.com/vishvananda/netlink" @@ -101,7 +101,8 @@ func EnableIpForwarding(procSys procsyswrapper.ProcSys, ips []*current.IPConfig) v6 := false for _, ip := range ips { - if ip.Version == "4" && !v4 { + isV4 := ip.Address.IP.To4() != nil + if isV4 && !v4 { valueV4, err := procSys.Get(ipv4ForwardKey) if err != nil { return err @@ -113,7 +114,7 @@ func EnableIpForwarding(procSys procsyswrapper.ProcSys, ips []*current.IPConfig) } } v4 = true - } else if ip.Version == "6" && !v6 { + } else if !isV4 && !v6 { valueV6, err := procSys.Get(ipv6ForwardKey) if err != nil { return err diff --git a/pkg/utils/cniutils/cni_utils_test.go b/pkg/utils/cniutils/cni_utils_test.go index 023176a1a3..4b0e81ac03 100644 --- a/pkg/utils/cniutils/cni_utils_test.go +++ b/pkg/utils/cniutils/cni_utils_test.go @@ -5,7 +5,7 @@ import ( "testing" "github.com/aws/aws-sdk-go/aws" - "github.com/containernetworking/cni/pkg/types/current" + current "github.com/containernetworking/cni/pkg/types/100" "github.com/stretchr/testify/assert" ) diff --git a/pkg/vethwrapper/mocks/veth_mocks.go b/pkg/vethwrapper/mocks/veth_mocks.go index b93712f9bc..0a83b2e0d1 100644 --- a/pkg/vethwrapper/mocks/veth_mocks.go +++ b/pkg/vethwrapper/mocks/veth_mocks.go @@ -50,9 +50,9 @@ func (m *MockVeth) EXPECT() *MockVethMockRecorder { } // Setup mocks base method. -func (m *MockVeth) Setup(arg0 string, arg1 int, arg2 ns.NetNS) (net.Interface, net.Interface, error) { +func (m *MockVeth) Setup(arg0 string, arg1 int, arg2 string, arg3 ns.NetNS) (net.Interface, net.Interface, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "Setup", arg0, arg1, arg2) + ret := m.ctrl.Call(m, "Setup", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(net.Interface) ret1, _ := ret[1].(net.Interface) ret2, _ := ret[2].(error) @@ -60,7 +60,7 @@ func (m *MockVeth) Setup(arg0 string, arg1 int, arg2 ns.NetNS) (net.Interface, n } // Setup indicates an expected call of Setup. -func (mr *MockVethMockRecorder) Setup(arg0, arg1, arg2 interface{}) *gomock.Call { +func (mr *MockVethMockRecorder) Setup(arg0, arg1, arg2, arg3 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Setup", reflect.TypeOf((*MockVeth)(nil).Setup), arg0, arg1, arg2) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Setup", reflect.TypeOf((*MockVeth)(nil).Setup), arg0, arg1, arg2, arg3) } diff --git a/pkg/vethwrapper/veth.go b/pkg/vethwrapper/veth.go index de1a08f25b..e0ea53a3fe 100644 --- a/pkg/vethwrapper/veth.go +++ b/pkg/vethwrapper/veth.go @@ -24,7 +24,7 @@ import ( // Veth is an interface created to make code unit testable. // Both the veth version and mocked version implement the same interface type Veth interface { - Setup(contVethName string, mtu int, hostNS ns.NetNS) (net.Interface, net.Interface, error) + Setup(contVethName string, mtu int, contVethMac string, hostNS ns.NetNS) (net.Interface, net.Interface, error) } type veth struct{} @@ -33,6 +33,6 @@ type veth struct{} func NewSetupVeth() Veth { return &veth{} } -func (v *veth) Setup(contVethName string, mtu int, hostNS ns.NetNS) (net.Interface, net.Interface, error) { - return ip.SetupVeth(contVethName, mtu, hostNS) +func (v *veth) Setup(contVethName string, mtu int, contVethMac string, hostNS ns.NetNS) (net.Interface, net.Interface, error) { + return ip.SetupVeth(contVethName, mtu, contVethMac, hostNS) }