From 34ea29e479352d4ea776a174a71291a2d5e7104a Mon Sep 17 00:00:00 2001 From: l1b0k Date: Tue, 18 Jul 2023 16:34:53 +0800 Subject: [PATCH] cni: support spec v1.0.0 - bump default cni version to 0.4.0 - inner cni CHECK is not required in 0.4.0 --- cmd/terway-cli/cni.go | 2 +- daemon/daemon.go | 67 --------------------- docs/cni-chain.md | 4 +- docs/host-stack-cidrs.md | 4 +- docs/hubble-intergration.md | 2 +- docs/ipv6.md | 2 +- docs/qos.md | 4 +- docs/terway-trunk.md | 2 +- eni.conf | 2 +- entrypoint.ps1 | 4 +- go.mod | 36 +++++------ go.sum | 69 ++++++++++++++-------- plugin/terway/cni.go | 19 +++--- plugin/terway/cni_linux.go | 6 +- plugin/terway/cni_windows.go | 2 +- terway-cilium.yml | 2 +- terway-multiip.yml | 2 +- terway-windows-eni.yml | 2 +- terway-windows-eniip.yml | 2 +- terway-windows.yml | 2 +- terway.yml | 2 +- tests/templates/terway/terway-eni-only.yml | 2 +- tests/templates/terway/terway-multiip.yml | 2 +- tests/templates/terway/terway-vpc.yml | 2 +- 24 files changed, 97 insertions(+), 146 deletions(-) diff --git a/cmd/terway-cli/cni.go b/cmd/terway-cli/cni.go index c6807aaa..95a2bfdc 100644 --- a/cmd/terway-cli/cni.go +++ b/cmd/terway-cli/cni.go @@ -106,7 +106,7 @@ func mergeConfigList(configs [][]byte, f *feature) (string, error) { var err error g := gabs.New() - _, err = g.Set("0.3.1", "cniVersion") + _, err = g.Set("0.4.0", "cniVersion") if err != nil { return "", err } diff --git a/daemon/daemon.go b/daemon/daemon.go index 69fe9164..4d93f41f 100644 --- a/daemon/daemon.go +++ b/daemon/daemon.go @@ -6,7 +6,6 @@ import ( "fmt" "net" "os" - "path/filepath" "sort" "strconv" "strings" @@ -29,8 +28,6 @@ import ( "github.com/AliyunContainerService/terway/types" "github.com/AliyunContainerService/terway/types/daemon" - "github.com/containernetworking/cni/libcni" - containertypes "github.com/containernetworking/cni/pkg/types" "github.com/pkg/errors" corev1 "k8s.io/api/core/v1" k8sErr "k8s.io/apimachinery/pkg/api/errors" @@ -59,9 +56,6 @@ const ( commandMapping = "mapping" cniDefaultPath = "/opt/cni/bin" - // this file is generated from configmap - terwayCNIConf = "/etc/eni/10-terway.conf" - cniExecTimeout = 10 * time.Second IfEth0 = "eth0" ) @@ -930,67 +924,6 @@ func (n *networkService) startPeriodCheck() { } } }() - // call CNI CHECK, make sure all dev is ok - func() { - serviceLog.Debugf("call CNI CHECK") - defer func() { - serviceLog.Debugf("call CNI CHECK end") - }() - n.RLock() - podResList, err := n.resourceDB.List() - n.RUnlock() - if err != nil { - serviceLog.Error(err) - return - } - ff, err := os.ReadFile(utils.NormalizePath(terwayCNIConf)) - if err != nil { - serviceLog.Error(err) - return - } - for _, v := range podResList { - res := v.(types.PodResources) - if res.NetNs == nil { - continue - } - serviceLog.Debugf("checking pod name %s", res.PodInfo.Name) - cniCfg := libcni.NewCNIConfig([]string{n.cniBinPath}, nil) - netNs := filepath.Join("/proc/1/root/", *res.NetNs) - if utils.IsWindowsOS() { - netNs = *res.NetNs - } - func() { - ctx, cancel := context.WithTimeout(context.Background(), cniExecTimeout) - defer cancel() - - args := [][2]string{ - {"K8S_POD_NAME", res.PodInfo.Name}, - {"K8S_POD_NAMESPACE", res.PodInfo.Namespace}, - } - if res.ContainerID != nil { - args = append(args, [2]string{"K8S_POD_INFRA_CONTAINER_ID", *res.ContainerID}) - } - - err := cniCfg.CheckNetwork(ctx, &libcni.NetworkConfig{ - Network: &containertypes.NetConf{ - CNIVersion: "0.4.0", - Name: "terway", - Type: "terway", - }, - Bytes: ff, - }, &libcni.RuntimeConf{ - ContainerID: "fake", // must provide - NetNS: netNs, - IfName: IfEth0, - Args: args, - }) - if err != nil { - serviceLog.Error(err) - return - } - }() - } - }() } // requestCRD get crd from api diff --git a/docs/cni-chain.md b/docs/cni-chain.md index 5ed45187..123eeee0 100644 --- a/docs/cni-chain.md +++ b/docs/cni-chain.md @@ -6,7 +6,7 @@ Terway will set CNI config on the startup. The config (`/etc/cni/net.d/10-terway ```json { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway", "eniip_virtual_type": "IPVlan" @@ -46,7 +46,7 @@ data: 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway" } diff --git a/docs/host-stack-cidrs.md b/docs/host-stack-cidrs.md index e3ad9ed3..fe0c0133 100644 --- a/docs/host-stack-cidrs.md +++ b/docs/host-stack-cidrs.md @@ -23,7 +23,7 @@ ```json 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "eniip_virtual_type": "IPVlan", "host_stack_cidrs": ["169.254.0.0/16"], // 此处为您希望添加的主机网络栈路由 @@ -50,7 +50,7 @@ ```bash cat /etc/cni/net.d/* { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway-chainer", "plugins": [ { diff --git a/docs/hubble-intergration.md b/docs/hubble-intergration.md index 25a5d4c1..df4814de 100644 --- a/docs/hubble-intergration.md +++ b/docs/hubble-intergration.md @@ -19,7 +19,7 @@ ```json 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "eniip_virtual_type": "IPVlan", // 新增以下配置,以打开 Hubble 网络流量分析 diff --git a/docs/ipv6.md b/docs/ipv6.md index cd391286..1b2c7956 100644 --- a/docs/ipv6.md +++ b/docs/ipv6.md @@ -10,7 +10,7 @@ apiVersion: v1 data: 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "eniip_virtual_type": "IPVlan", "ip_stack": "dual", <----- 启用双栈支持 diff --git a/docs/qos.md b/docs/qos.md index 2d98ef0e..ac42ded7 100644 --- a/docs/qos.md +++ b/docs/qos.md @@ -30,7 +30,7 @@ apiVersion: v1 data: 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "capabilities": {"bandwidth": true}, # add "type": "terway" @@ -64,7 +64,7 @@ apiVersion: v1 data: 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "enable_network_priority": true, # add "type": "terway" diff --git a/docs/terway-trunk.md b/docs/terway-trunk.md index 775fa066..5a860eab 100644 --- a/docs/terway-trunk.md +++ b/docs/terway-trunk.md @@ -31,7 +31,7 @@ apiVersion: v1 data: 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "eniip_virtual_type": "IPVlan", "type": "terway" diff --git a/eni.conf b/eni.conf index f45d3ede..5e0a38e2 100644 --- a/eni.conf +++ b/eni.conf @@ -1,5 +1,5 @@ { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "eni", "type": "terway-plugin", "prefix": "eth" diff --git a/entrypoint.ps1 b/entrypoint.ps1 index 1472d243..16b9f8e8 100644 --- a/entrypoint.ps1 +++ b/entrypoint.ps1 @@ -283,7 +283,7 @@ Log-Info "Transferred eni configuration" # generated cni config to host Log-Debug "Generating cni configuration" $cni_config = @{ - cniVersion = "0.3.1" + cniVersion = "0.4.0" name = "terway" type = "terway" } @@ -292,7 +292,7 @@ if (Test-File -Path "c:\etc\eni\10-terway.conf") { } # version if (-not $cni_config["cniVersion"]) { - $cni_config["cniVersion"] = "0.3.1" + $cni_config["cniVersion"] = "0.4.0" } # name if (-not $cni_config["name"]) { diff --git a/go.mod b/go.mod index 0ac11d65..1b61f053 100644 --- a/go.mod +++ b/go.mod @@ -4,13 +4,13 @@ go 1.18 require ( github.com/Jeffail/gabs/v2 v2.7.0 - github.com/Microsoft/go-winio v0.5.2 - github.com/Microsoft/hcsshim v0.9.4 - github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae + github.com/Microsoft/go-winio v0.6.0 + github.com/Microsoft/hcsshim v0.9.9 + github.com/alexflint/go-filemutex v1.2.0 github.com/aliyun/alibaba-cloud-sdk-go v1.62.215 github.com/boltdb/bolt v1.3.1 - github.com/containernetworking/cni v0.8.1 - github.com/containernetworking/plugins v0.9.1 + github.com/containernetworking/cni v1.1.2 + github.com/containernetworking/plugins v1.3.0 github.com/denverdino/aliyungo v0.0.0-20201215054313-f635de23c5e0 github.com/docker/docker v20.10.20+incompatible github.com/evanphx/json-patch v5.6.0+incompatible @@ -18,14 +18,14 @@ require ( github.com/go-playground/validator/v10 v10.11.1 github.com/google/uuid v1.3.0 github.com/onsi/ginkgo v1.16.5 - github.com/onsi/gomega v1.22.1 + github.com/onsi/gomega v1.27.6 github.com/pkg/errors v0.9.1 github.com/prometheus/client_golang v1.13.0 github.com/pterm/pterm v0.12.62 github.com/sirupsen/logrus v1.9.0 github.com/spf13/cobra v1.6.1 - github.com/stretchr/testify v1.8.0 - github.com/vishvananda/netlink v1.1.1-0.20210510164352-d17758a128bf + github.com/stretchr/testify v1.8.1 + github.com/vishvananda/netlink v1.2.1-beta.2 golang.org/x/net v0.9.0 golang.org/x/sync v0.1.0 golang.org/x/sys v0.8.0 @@ -54,16 +54,16 @@ require ( github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/cespare/xxhash/v2 v2.1.2 // indirect - github.com/containerd/cgroups v1.0.3 // indirect + github.com/containerd/cgroups v1.1.0 // indirect github.com/containerd/console v1.0.3 // indirect - github.com/coreos/go-iptables v0.5.0 // indirect + github.com/coreos/go-iptables v0.6.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/docker/distribution v2.8.1+incompatible // indirect github.com/docker/go-connections v0.4.0 // indirect github.com/docker/go-units v0.4.0 // indirect github.com/emicklei/go-restful v2.16.0+incompatible // indirect github.com/fsnotify/fsnotify v1.5.1 // indirect - github.com/go-logr/logr v1.2.0 // indirect + github.com/go-logr/logr v1.2.4 // indirect github.com/go-logr/zapr v1.2.0 // indirect github.com/go-openapi/jsonpointer v0.19.5 // indirect github.com/go-openapi/jsonreference v0.19.5 // indirect @@ -72,8 +72,8 @@ require ( github.com/go-playground/universal-translator v0.18.0 // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect - github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.8 // indirect + github.com/golang/protobuf v1.5.3 // indirect + github.com/google/go-cmp v0.5.9 // indirect github.com/google/gofuzz v1.2.0 // indirect github.com/googleapis/gnostic v0.5.5 // indirect github.com/gookit/color v1.5.3 // indirect @@ -99,24 +99,24 @@ require ( github.com/prometheus/common v0.37.0 // indirect github.com/prometheus/procfs v0.8.0 // indirect github.com/rivo/uniseg v0.4.4 // indirect - github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8 // indirect + github.com/safchain/ethtool v0.3.0 // indirect github.com/segmentio/go-camelcase v0.0.0-20160726192923-7085f1e3c734 // indirect github.com/segmentio/go-snakecase v1.2.0 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/vishvananda/netns v0.0.0-20201230012202-c4f3ca719c73 // indirect + github.com/vishvananda/netns v0.0.4 // indirect github.com/vladimirvivien/gexe v0.1.1 // indirect github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect - go.opencensus.io v0.23.0 // indirect + go.opencensus.io v0.24.0 // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect golang.org/x/crypto v0.1.0 // indirect - golang.org/x/mod v0.8.0 // indirect + golang.org/x/mod v0.9.0 // indirect golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect golang.org/x/term v0.8.0 // indirect golang.org/x/text v0.9.0 // indirect golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect - golang.org/x/tools v0.6.0 // indirect + golang.org/x/tools v0.7.0 // indirect google.golang.org/appengine v1.6.7 // indirect google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2 // indirect gopkg.in/inf.v0 v0.9.1 // indirect diff --git a/go.sum b/go.sum index 8b7d061d..cf71f4d9 100644 --- a/go.sum +++ b/go.sum @@ -86,8 +86,8 @@ github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugX github.com/Microsoft/go-winio v0.4.17-0.20210211115548-6eac466e5fa3/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.4.17-0.20210324224401-5516f17a5958/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= github.com/Microsoft/go-winio v0.4.17/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84= -github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA= -github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= +github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE= github.com/Microsoft/hcsshim v0.8.6/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7-0.20190325164909-8abdbb8205e4/go.mod h1:Op3hHsoHPAvb6lceZHDtd9OkTew38wNoXnJs8iY7rUg= github.com/Microsoft/hcsshim v0.8.7/go.mod h1:OHd7sQqRFrYd3RmSgbgji+ctCwkbq2wbEYNSzOYtcBQ= @@ -96,8 +96,8 @@ github.com/Microsoft/hcsshim v0.8.14/go.mod h1:NtVKoYxQuTLx6gEq0L96c9Ju4JbRJ4nY2 github.com/Microsoft/hcsshim v0.8.15/go.mod h1:x38A4YbHbdxJtc0sF6oIz+RG0npwSCAvn69iY6URG00= github.com/Microsoft/hcsshim v0.8.16/go.mod h1:o5/SZqmR7x9JNKsW3pu+nqHm0MF8vbA+VxGOoXdC600= github.com/Microsoft/hcsshim v0.8.21/go.mod h1:+w2gRZ5ReXQhFOrvSQeNfhrYB/dg3oDwTOcER2fw4I4= -github.com/Microsoft/hcsshim v0.9.4 h1:mnUj0ivWy6UzbB1uLFqKR6F+ZyiDc7j4iGgHTpO+5+I= -github.com/Microsoft/hcsshim v0.9.4/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= +github.com/Microsoft/hcsshim v0.9.9 h1:FYrTiCNOc8ZddNBVkJBxWZYm22rgxHFmxMoGK66sDF0= +github.com/Microsoft/hcsshim v0.9.9/go.mod h1:7pLA8lDk46WKDWlVsENo92gC0XFa8rbKfyFRBqxEbCc= github.com/Microsoft/hcsshim/test v0.0.0-20201218223536-d3e5debf77da/go.mod h1:5hlzMzRKMLyo42nCZ9oml8AdTlq/0cvIaBv6tK1RehU= github.com/Microsoft/hcsshim/test v0.0.0-20210227013316-43a75bb4edd3/go.mod h1:mw7qgWloBUl75W/gVH3cQszUg1+gUITj7D6NY7ywVnY= github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ= @@ -115,8 +115,9 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho= -github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae h1:AMzIhMUqU3jMrZiTuW0zkYeKlKDAFD+DG20IoO421/Y= github.com/alexflint/go-filemutex v0.0.0-20171022225611-72bdc8eae2ae/go.mod h1:CgnQgUtFrFz9mxFNtED3jI5tLDjKlOM+oUF/sTk6ps0= +github.com/alexflint/go-filemutex v1.2.0 h1:1v0TJPDtlhgpW4nJ+GvxCLSlUDC3+gW0CQQvlmfDR/s= +github.com/alexflint/go-filemutex v1.2.0/go.mod h1:mYyQSWvw9Tx2/H2n9qXPb52tTYfE0pZAWcBq5mK025c= github.com/aliyun/alibaba-cloud-sdk-go v1.62.215 h1:WceX661mildW8mKbC8Lf9rTCEYNIaM35nHMxnig4Z8M= github.com/aliyun/alibaba-cloud-sdk-go v1.62.215/go.mod h1:Api2AkmMgGaSUAhmk76oaFObkoeCPc/bKAqcyplPODs= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= @@ -192,8 +193,8 @@ github.com/containerd/cgroups v0.0.0-20200710171044-318312a37340/go.mod h1:s5q4S github.com/containerd/cgroups v0.0.0-20200824123100-0b889c03f102/go.mod h1:s5q4SojHctfxANBDvMeIaIovkq29IP48TKAxnhYRxvo= github.com/containerd/cgroups v0.0.0-20210114181951-8a68de567b68/go.mod h1:ZJeTFisyysqgcCdecO57Dj79RfL0LNeGiFUqLYQRYLE= github.com/containerd/cgroups v1.0.1/go.mod h1:0SJrPIenamHDcZhEcJMNBB85rHcUsw4f25ZfBiPYRkU= -github.com/containerd/cgroups v1.0.3 h1:ADZftAkglvCiD44c77s5YmMqaP2pzVCFZvBmAlBdAP4= -github.com/containerd/cgroups v1.0.3/go.mod h1:/ofk34relqNjSGyqPrmEULrO4Sc8LJhvJmWbUCUKqj8= +github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= +github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/console v0.0.0-20180822173158-c12b1e7919c1/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20181022165439-0650fd9eeb50/go.mod h1:Tj/on1eG8kiEhd0+fhSDzsPAFESxzBBvdyEgyryXffw= github.com/containerd/console v0.0.0-20191206165004-02ecf6a7291e/go.mod h1:8Pf4gM6VEbTNRIT26AyyU7hxdQU3MvAvxVI0sc00XBE= @@ -260,11 +261,13 @@ github.com/containerd/zfs v0.0.0-20210324211415-d5c4544f0433/go.mod h1:m+m51S1Dv github.com/containerd/zfs v1.0.0/go.mod h1:m+m51S1DvAP6r3FcmYCp54bQ34pyOwTieQDNRIRHsFY= github.com/containernetworking/cni v0.7.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= github.com/containernetworking/cni v0.8.0/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= -github.com/containernetworking/cni v0.8.1 h1:7zpDnQ3T3s4ucOuJ/ZCLrYBxzkg0AELFfII3Epo9TmI= github.com/containernetworking/cni v0.8.1/go.mod h1:LGwApLUm2FpoOfxTDEeq8T9ipbpZ61X79hmU3w8FmsY= +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 v0.8.6/go.mod h1:qnw5mN19D8fIwkqW7oHHYDHVlzhJpcY6TQxn/fUyDDM= -github.com/containernetworking/plugins v0.9.1 h1:FD1tADPls2EEi3flPc2OegIY1M9pUa9r2Quag7HMLV8= github.com/containernetworking/plugins v0.9.1/go.mod h1:xP/idU2ldlzN6m4p5LmGiwRDjeJr6FLK6vuiUwoH7P8= +github.com/containernetworking/plugins v1.3.0 h1:QVNXMT6XloyMUoO2wUOqWTC1hWFV62Q6mVDp5H1HnjM= +github.com/containernetworking/plugins v1.3.0/go.mod h1:Pc2wcedTQQCVuROOOaLBPPxrEXqqXBFt3cZ+/yVg6l0= github.com/containers/ocicrypt v1.0.1/go.mod h1:MeJDzk1RJHv89LjsH0Sp5KTY3ZYkjXO/C+bKAeWFIrc= github.com/containers/ocicrypt v1.1.0/go.mod h1:b8AOe0YR67uU8OqfVNcznfFpAzu3rdgUV4GP9qXPfu4= github.com/containers/ocicrypt v1.1.1/go.mod h1:Dm55fwWm1YZAjYRaJ94z2mfZikIyIN4B0oB3dj3jFxY= @@ -272,8 +275,9 @@ github.com/coreos/bbolt v1.3.2/go.mod h1:iRUV2dpdMOn7Bo10OQBFzIJO9kkE559Wcmn+qkE github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/etcd v3.3.13+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE= github.com/coreos/go-iptables v0.4.5/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= -github.com/coreos/go-iptables v0.5.0 h1:mw6SAibtHKZcNzAsOxjoHIG0gy5YFHhypWSSNc6EjbQ= github.com/coreos/go-iptables v0.5.0/go.mod h1:/mVI274lEDI2ns62jHCDnCyBF9Iwsmekav8Dbxlm1MU= +github.com/coreos/go-iptables v0.6.0 h1:is9qnZMPYjLd8LYqmm/qlE+wwEgJIkTYdhV3rfZo4jk= +github.com/coreos/go-iptables v0.6.0/go.mod h1:Qe8Bv2Xik5FyTXwgIbLAnv2sWSBmvWdFETJConOQ//Q= github.com/coreos/go-oidc v2.1.0+incompatible/go.mod h1:CgnwVTmzoESiwO9qyAFEMiHoZ1nMCKZlZ9V6mm3/LKc= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= @@ -378,8 +382,9 @@ github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KE github.com/go-logr/logr v0.1.0/go.mod h1:ixOQHD9gLJUVQQ2ZOR7zLEifBX6tGkNJF4QyIY7sIas= github.com/go-logr/logr v0.2.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= github.com/go-logr/logr v0.4.0/go.mod h1:z6/tIYblkpsD+a4lm/fGIIU9mZ+XfAiaFtq7xTgseGU= -github.com/go-logr/logr v1.2.0 h1:QK40JKJyMdUDz+h+xvCsru/bJhvG0UxvePV0ufL/AcE= github.com/go-logr/logr v1.2.0/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= +github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= +github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/zapr v1.2.0 h1:n4JnPI1T3Qq1SFEi/F8rwLrZERp2bso19PJZDB9dayk= github.com/go-logr/zapr v1.2.0/go.mod h1:Qa4Bsj2Vb+FAVeAKsLD8RLQ+YRJB8YDmOAKxaBQf7Ro= github.com/go-openapi/jsonpointer v0.0.0-20160704185906-46af16f9f7b1/go.mod h1:+35s3my2LFTysnkMfxsJBAMHj/DoqoB9knIWoYG/Vk0= @@ -411,6 +416,7 @@ github.com/go-playground/validator/v10 v10.11.1 h1:prmOlTVv+YjZjmRmNSF3VmspqJIxJ github.com/go-playground/validator/v10 v10.11.1/go.mod h1:i+3WkQ1FvaUjjxh1kSvIA4dMGDBiPU55YFDl0WbKdWU= 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/godbus/dbus v0.0.0-20151105175453-c7fdd8b5cd55/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20180201030542-885f9cc04c9c/go.mod h1:/YcGZj5zSblfDWMMoOzV4fas9FZnQYTkDnsGvmh2Grw= github.com/godbus/dbus v0.0.0-20190422162347-ade71ed3457e/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= @@ -460,8 +466,9 @@ github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= -github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= 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/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/btree v1.0.1/go.mod h1:xXMiIv4Fb/0kKde4SpL7qlzvu5cMJDRkFDxJfI9uaxA= @@ -479,8 +486,8 @@ github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-containerregistry v0.5.1/go.mod h1:Ct15B4yir3PLOP5jsy0GNeYVaIZs/MK/Jz5any1wFW0= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gofuzz v1.1.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= @@ -500,6 +507,8 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20230323073829-e72429f035bd h1:r8yyd+DJDmsUhGrRBxH5Pj7KeFK5l+Y3FsgT8keqKtk= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -702,9 +711,11 @@ github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+ github.com/onsi/ginkgo v1.12.0/go.mod h1:oUhWkIvk5aDxtKvDDuw8gItl8pKl42LzjC9KZE0HfGg= github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= +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.3.0 h1:kUMoxMoQG3ogk/QWyKh3zibV7BKZ+xBpWil1cTylVqc= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.9.2 h1:BA2GMJOtfGAfagzYtrAlufIP0lq6QERkFmHLMLPwFSU= github.com/onsi/gomega v0.0.0-20151007035656-2152b45fa28a/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= @@ -713,8 +724,9 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.9.0/go.mod h1:Ho0h+IUsWyvy1OpqCwxlQ/21gkhVunqlU8fDGcoTdcA= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc= -github.com/onsi/gomega v1.22.1 h1:pY8O4lBfsHKZHM/6nrxkhVPUznOlIu3quZcKP/M20KI= -github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ1tuM= +github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= +github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= github.com/opencontainers/go-digest v0.0.0-20170106003457-a6d0ee40d420/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v0.0.0-20180430190053-c9281466c8b2/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s= @@ -824,8 +836,9 @@ github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6po github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8 h1:2c1EFnZHIPCW8qKWgHMH/fX2PkSabFc5mrVzfUNdg5U= github.com/safchain/ethtool v0.0.0-20190326074333-42ed695e3de8/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/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= @@ -883,6 +896,7 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= github.com/stretchr/testify v0.0.0-20180303142811-b89eecf5ca5d/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -891,8 +905,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5 github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= +github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/syndtr/gocapability v0.0.0-20170704070218-db04d3cc01c8/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= @@ -912,8 +927,8 @@ github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtX github.com/urfave/cli v1.22.2/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/vishvananda/netns v0.0.0-20180720170159-13995c7128cc/go.mod h1:ZjcWmFBXmLKZu9Nxj3WKYEafiSqer2rnvPr0en9UNpI= github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= -github.com/vishvananda/netns v0.0.0-20201230012202-c4f3ca719c73 h1:JGMFiSX7pNu3l0DRO8sjxgA7ybQNE+HeuKIG23PjsN4= -github.com/vishvananda/netns v0.0.0-20201230012202-c4f3ca719c73/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= +github.com/vishvananda/netns v0.0.4 h1:Oeaw1EM2JMxD51g9uhtC0D7erkIjgmj8+JZc26m1YX8= +github.com/vishvananda/netns v0.0.4/go.mod h1:SpkAiCQRtJ6TvvxPnOSyH3BMl6unz3xZlaprSwhNNJM= github.com/vladimirvivien/gexe v0.1.1 h1:2A0SBaOSKH+cwLVdt6H+KkHZotZWRNLlWygANGw5DxE= github.com/vladimirvivien/gexe v0.1.1/go.mod h1:LHQL00w/7gDUKIak24n801ABp8C+ni6eBht9vGVst8w= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= @@ -955,8 +970,9 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= +go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= +go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib v0.20.0/go.mod h1:G/EtFaa6qaN7+LxqfIAT3GiZa7Wv5DTBUzl5H4LY0Kc= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.20.0/go.mod h1:oVGt1LRbBOBq1A5BQLlUg9UaU/54aiHw8cgjV3aWZ/E= go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.20.0/go.mod h1:2AboqHi0CiIZU0qwhtUfCYD1GeUzvvIXWNkhDt7ZMG4= @@ -977,7 +993,6 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.1.11-0.20210813005559-691160354723/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/goleak v1.1.12 h1:gZAh5/EyT/HQwlpkCy6wTpqfH9H8Lz8zbm3dZh+OyzA= -go.uber.org/goleak v1.1.12/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= @@ -1044,8 +1059,9 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= -golang.org/x/mod v0.8.0 h1:LUYupSeNrTNCGzR/hVBk2NHZO4hXcVaW1k4Qx7rjPx8= golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.9.0 h1:KENHtAZL2y3NLMYZeHY9DW8HW8V+kQyJsY/V9JlKvCs= +golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1097,6 +1113,7 @@ golang.org/x/net v0.0.0-20210224082022-3d97a244fca7/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= @@ -1236,6 +1253,7 @@ golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/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.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= @@ -1333,8 +1351,9 @@ golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.6-0.20210820212750-d4cc65f0b2ff/go.mod h1:YD9qOF0M9xpSpdWTBbzEl5e/RnCefISl8E5Noe10jFM= golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= -golang.org/x/tools v0.6.0 h1:BOw41kyTf3PuCW1pVQf8+Cyg8pMlkYB1oo9iJ6D/lKM= golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.7.0 h1:W4OVu8VVOaIO0yzWMNdepAulS7YfoS3Zabrm8DOXXU4= +golang.org/x/tools v0.7.0/go.mod h1:4pg6aUX35JBAogB10C9AtvVL+qowtN4pT3CGSQex14s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/plugin/terway/cni.go b/plugin/terway/cni.go index 62b3529f..312162d8 100644 --- a/plugin/terway/cni.go +++ b/plugin/terway/cni.go @@ -16,7 +16,7 @@ import ( "github.com/containernetworking/cni/pkg/skel" cniTypes "github.com/containernetworking/cni/pkg/types" - "github.com/containernetworking/cni/pkg/types/current" + current "github.com/containernetworking/cni/pkg/types/100" "github.com/containernetworking/cni/pkg/version" bv "github.com/containernetworking/plugins/pkg/utils/buildversion" "google.golang.org/grpc" @@ -32,7 +32,7 @@ const ( delegateConf = ` { "name": "networks", - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "ipam": { "type": "host-local", "subnet": "%s", @@ -52,7 +52,7 @@ func init() { } func main() { - skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.PluginSupports("0.3.0", "0.3.1", "0.4.0"), bv.BuildString("terway")) + skel.PluginMain(cmdAdd, cmdCheck, cmdDel, version.PluginSupports("0.3.0", "0.3.1", "0.4.0", "1.0.0"), bv.BuildString("terway")) } func cmdAdd(args *skel.CmdArgs) error { @@ -82,7 +82,7 @@ func cmdAdd(args *skel.CmdArgs) error { client, conn, err := getNetworkClient(ctx) if err != nil { - return fmt.Errorf("error create grpc client, %w", err) + return err } defer conn.Close() @@ -93,7 +93,7 @@ func cmdAdd(args *skel.CmdArgs) error { containerIPNet, gatewayIPSet, err = doCmdAdd(ctx, logger, client, cmdArgs) if err != nil { logger.WithError(err).Error("error adding") - return err + return cniTypes.NewError(cniTypes.ErrTryAgainLater, "failed to do add", err.Error()) } result := ¤t.Result{} @@ -104,7 +104,6 @@ func cmdAdd(args *skel.CmdArgs) error { }) if containerIPNet.IPv4 != nil && gatewayIPSet.IPv4 != nil { result.IPs = append(result.IPs, ¤t.IPConfig{ - Version: "4", Address: *containerIPNet.IPv4, Gateway: gatewayIPSet.IPv4, Interface: current.Int(0), @@ -112,7 +111,6 @@ func cmdAdd(args *skel.CmdArgs) error { } if containerIPNet.IPv6 != nil && gatewayIPSet.IPv6 != nil { result.IPs = append(result.IPs, ¤t.IPConfig{ - Version: "6", Address: *containerIPNet.IPv6, Gateway: gatewayIPSet.IPv6, Interface: current.Int(0), @@ -159,7 +157,7 @@ func cmdDel(args *skel.CmdArgs) error { err = doCmdDel(ctx, logger, client, cmdArgs) if err != nil { logger.WithError(err).Error("error deleting") - return err + return cniTypes.NewError(cniTypes.ErrTryAgainLater, "failed to do del", err.Error()) } return cniTypes.PrintResult(¤t.Result{ @@ -217,13 +215,14 @@ func getNetworkClient(ctx context.Context) (rpc.TerwayBackendClient, *grpc.Clien func(ctx context.Context, s string) (net.Conn, error) { unixAddr, err := net.ResolveUnixAddr("unix", defaultSocketPath) if err != nil { - return nil, fmt.Errorf("error resolve addr, %w", err) + return nil, err } d := net.Dialer{} return d.DialContext(ctx, "unix", unixAddr.String()) })) + if err != nil { - return nil, nil, fmt.Errorf("error dial to terway %s, terway pod may staring, %w", defaultSocketPath, err) + return nil, nil, cniTypes.NewError(cniTypes.ErrTryAgainLater, "failed connect to daemon", err.Error()) } client := rpc.NewTerwayBackendClient(conn) diff --git a/plugin/terway/cni_linux.go b/plugin/terway/cni_linux.go index f3459d9b..0101ab4f 100644 --- a/plugin/terway/cni_linux.go +++ b/plugin/terway/cni_linux.go @@ -7,7 +7,7 @@ import ( "github.com/containernetworking/cni/pkg/skel" cniTypes "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/ipam" "github.com/containernetworking/plugins/pkg/ns" "github.com/sirupsen/logrus" @@ -28,7 +28,7 @@ func getCmdArgs(args *skel.CmdArgs) (*cniCmdArgs, error) { var conf types.CNIConf if err = json.Unmarshal(args.StdinData, &conf); err != nil { - return nil, fmt.Errorf("error parse args, %w", err) + return nil, cniTypes.NewError(cniTypes.ErrDecodingFailure, "failed to parse network config", err.Error()) } if conf.MTU == 0 { conf.MTU = defaultMTU @@ -36,7 +36,7 @@ func getCmdArgs(args *skel.CmdArgs) (*cniCmdArgs, error) { var k8sArgs types.K8SArgs if err = cniTypes.LoadArgs(args.Args, &k8sArgs); err != nil { - return nil, fmt.Errorf("error parse args, %w", err) + return nil, cniTypes.NewError(cniTypes.ErrDecodingFailure, "failed to parse args", err.Error()) } return &cniCmdArgs{ diff --git a/plugin/terway/cni_windows.go b/plugin/terway/cni_windows.go index 773e0767..ea46bcd4 100644 --- a/plugin/terway/cni_windows.go +++ b/plugin/terway/cni_windows.go @@ -8,7 +8,7 @@ import ( "github.com/containernetworking/cni/pkg/skel" cniTypes "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/ipam" "github.com/pkg/errors" "github.com/sirupsen/logrus" diff --git a/terway-cilium.yml b/terway-cilium.yml index 1b4ff2dc..2df00b27 100644 --- a/terway-cilium.yml +++ b/terway-cilium.yml @@ -121,7 +121,7 @@ data: } 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway", "eniip_virtual_type": "IPVlan", diff --git a/terway-multiip.yml b/terway-multiip.yml index 2ddf534c..43a45577 100644 --- a/terway-multiip.yml +++ b/terway-multiip.yml @@ -82,7 +82,7 @@ data: } 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway", "eniip_virtual_type": "Veth", diff --git a/terway-windows-eni.yml b/terway-windows-eni.yml index 5fb2a0b6..cc3a4774 100644 --- a/terway-windows-eni.yml +++ b/terway-windows-eni.yml @@ -77,7 +77,7 @@ data: } 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway" } diff --git a/terway-windows-eniip.yml b/terway-windows-eniip.yml index b5e9046a..86369e44 100644 --- a/terway-windows-eniip.yml +++ b/terway-windows-eniip.yml @@ -77,7 +77,7 @@ data: } 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway" } diff --git a/terway-windows.yml b/terway-windows.yml index a1aac21c..658576a8 100644 --- a/terway-windows.yml +++ b/terway-windows.yml @@ -77,7 +77,7 @@ data: } 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway" } diff --git a/terway.yml b/terway.yml index a3b8bc49..975dfc20 100644 --- a/terway.yml +++ b/terway.yml @@ -79,7 +79,7 @@ data: } 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway" } diff --git a/tests/templates/terway/terway-eni-only.yml b/tests/templates/terway/terway-eni-only.yml index 4a174d21..c23b6238 100644 --- a/tests/templates/terway/terway-eni-only.yml +++ b/tests/templates/terway/terway-eni-only.yml @@ -77,7 +77,7 @@ data: } 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway" } diff --git a/tests/templates/terway/terway-multiip.yml b/tests/templates/terway/terway-multiip.yml index 6a4b012a..2546bea9 100644 --- a/tests/templates/terway/terway-multiip.yml +++ b/tests/templates/terway/terway-multiip.yml @@ -76,7 +76,7 @@ data: } 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway" } diff --git a/tests/templates/terway/terway-vpc.yml b/tests/templates/terway/terway-vpc.yml index 34f157bb..92abc045 100644 --- a/tests/templates/terway/terway-vpc.yml +++ b/tests/templates/terway/terway-vpc.yml @@ -77,7 +77,7 @@ data: } 10-terway.conf: | { - "cniVersion": "0.3.1", + "cniVersion": "0.4.0", "name": "terway", "type": "terway" }