Migrate to containerd v1.7.0 and update dependencies

* Updates containerd to v1.7.0 and new binary for 32-bit
Arm OSes.
* Updates Go dependencies - openfaas and external

Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
This commit is contained in:
Alex Ellis (OpenFaaS Ltd)
2023-03-19 10:55:53 +00:00
committed by Alex Ellis
parent 9efd019e86
commit c41c2cd9fc
1133 changed files with 104391 additions and 75499 deletions

View File

@ -1,7 +1,5 @@
linters:
enable:
- structcheck
- varcheck
- staticcheck
- unconvert
- gofmt

View File

@ -50,6 +50,14 @@ func WithCapabilityDNS(dns DNS) NamespaceOpts {
}
}
// WithCapabilityCgroupPath passes in the cgroup path capability.
func WithCapabilityCgroupPath(cgroupPath string) NamespaceOpts {
return func(c *Namespace) error {
c.capabilityArgs["cgroupPath"] = cgroupPath
return nil
}
}
// WithCapability support well-known capabilities
// https://www.cni.dev/docs/conventions/#well-known-capabilities
func WithCapability(name string, capability interface{}) NamespaceOpts {

View File

@ -32,13 +32,18 @@ type IPConfig struct {
// Result contains the network information returned by CNI.Setup
//
// a) Interfaces list. Depending on the plugin, this can include the sandbox
// (eg, container or hypervisor) interface name and/or the host interface
// name, the hardware addresses of each interface, and details about the
// sandbox (if any) the interface is in.
//
// (eg, container or hypervisor) interface name and/or the host interface
// name, the hardware addresses of each interface, and details about the
// sandbox (if any) the interface is in.
//
// b) IP configuration assigned to each interface. The IPv4 and/or IPv6 addresses,
// gateways, and routes assigned to sandbox and/or host interfaces.
//
// gateways, and routes assigned to sandbox and/or host interfaces.
//
// c) DNS information. Dictionary that includes DNS information for nameservers,
// domain, search domains and options.
//
// domain, search domains and options.
type Result struct {
Interfaces map[string]*Config
DNS []types.DNS

View File

@ -18,14 +18,13 @@ package cni
import (
"fmt"
"io/ioutil"
"os"
"path"
"testing"
)
func makeTmpDir(prefix string) (string, error) {
tmpDir, err := ioutil.TempDir(os.TempDir(), prefix)
tmpDir, err := os.MkdirTemp("", prefix)
if err != nil {
return "", err
}

View File

@ -17,12 +17,9 @@
package cni
const (
CNIPluginName = "cni"
DefaultNetDir = "/etc/cni/net.d"
DefaultCNIDir = "/opt/cni/bin"
DefaultMaxConfNum = 1
VendorCNIDirTemplate = "%s/opt/%s/bin"
DefaultPrefix = "eth"
CNIPluginName = "cni"
DefaultMaxConfNum = 1
DefaultPrefix = "eth"
)
type config struct {

25
vendor/github.com/containerd/go-cni/types_others.go generated vendored Normal file
View File

@ -0,0 +1,25 @@
//go:build !windows
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package cni
const (
DefaultNetDir = "/etc/cni/net.d"
DefaultCNIDir = "/opt/cni/bin"
VendorCNIDirTemplate = "%s/opt/%s/bin"
)

24
vendor/github.com/containerd/go-cni/types_windows.go generated vendored Normal file
View File

@ -0,0 +1,24 @@
//go:build windows
/*
Copyright The containerd Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package cni
const (
DefaultNetDir = "C:\\Program Files\\containerd\\cni\\conf"
DefaultCNIDir = "C:\\Program Files\\containerd\\cni\\bin"
)