diff --git a/hack/build b/hack/build index b59b71d0..59982071 100755 --- a/hack/build +++ b/hack/build @@ -136,7 +136,7 @@ if [ ! -x ${INSTALLBIN}/cni${BINARY_POSTFIX} ]; then TMPDIR=$(mktemp -d) trap cleanup EXIT WORKDIR=$TMPDIR/src/github.com/containernetworking/plugins - git clone -b $VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR + git clone --single-branch --depth=1 --branch=$VERSION_CNIPLUGINS https://github.com/rancher/plugins.git $WORKDIR cd $WORKDIR GO111MODULE=off GOPATH=$TMPDIR CGO_ENABLED=0 "${GO}" build -tags "$TAGS" -gcflags="all=${GCFLAGS}" -ldflags "$VERSIONFLAGS $LDFLAGS $STATIC" -o $INSTALLBIN/cni${BINARY_POSTFIX} ) diff --git a/pkg/containerd/builtins.go b/pkg/containerd/builtins.go index d92a7b5a..9239cbca 100644 --- a/pkg/containerd/builtins.go +++ b/pkg/containerd/builtins.go @@ -3,10 +3,13 @@ /* 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. @@ -19,8 +22,16 @@ package containerd // register containerd builtins here import ( _ "github.com/containerd/containerd/diff/walking/plugin" + _ "github.com/containerd/containerd/events/plugin" _ "github.com/containerd/containerd/gc/scheduler" + _ "github.com/containerd/containerd/leases/plugin" + _ "github.com/containerd/containerd/metadata/plugin" + _ "github.com/containerd/containerd/pkg/nri/plugin" + _ "github.com/containerd/containerd/plugins/sandbox" + _ "github.com/containerd/containerd/plugins/streaming" + _ "github.com/containerd/containerd/plugins/transfer" _ "github.com/containerd/containerd/runtime/restart/monitor" + _ "github.com/containerd/containerd/runtime/v2" _ "github.com/containerd/containerd/services/containers" _ "github.com/containerd/containerd/services/content" _ "github.com/containerd/containerd/services/diff" @@ -31,7 +42,10 @@ import ( _ "github.com/containerd/containerd/services/leases" _ "github.com/containerd/containerd/services/namespaces" _ "github.com/containerd/containerd/services/opt" + _ "github.com/containerd/containerd/services/sandbox" _ "github.com/containerd/containerd/services/snapshots" + _ "github.com/containerd/containerd/services/streaming" _ "github.com/containerd/containerd/services/tasks" + _ "github.com/containerd/containerd/services/transfer" _ "github.com/containerd/containerd/services/version" ) diff --git a/pkg/containerd/builtins_cri_linux.go b/pkg/containerd/builtins_cri.go similarity index 99% rename from pkg/containerd/builtins_cri_linux.go rename to pkg/containerd/builtins_cri.go index 3d3150e7..41b30de1 100644 --- a/pkg/containerd/builtins_cri_linux.go +++ b/pkg/containerd/builtins_cri.go @@ -3,10 +3,13 @@ /* 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. diff --git a/pkg/containerd/builtins_linux.go b/pkg/containerd/builtins_linux.go index 9485f605..a0ea4dc4 100644 --- a/pkg/containerd/builtins_linux.go +++ b/pkg/containerd/builtins_linux.go @@ -3,10 +3,13 @@ /* 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. @@ -18,8 +21,9 @@ package containerd import ( _ "github.com/containerd/aufs/plugin" + _ "github.com/containerd/containerd/metrics" _ "github.com/containerd/containerd/metrics/cgroups" - _ "github.com/containerd/containerd/runtime/v2" + _ "github.com/containerd/containerd/metrics/cgroups/v2" _ "github.com/containerd/containerd/runtime/v2/runc/options" _ "github.com/containerd/containerd/snapshots/btrfs/plugin" _ "github.com/containerd/containerd/snapshots/devmapper/plugin" diff --git a/pkg/containerd/builtins_windows.go b/pkg/containerd/builtins_windows.go new file mode 100644 index 00000000..aa8f01f1 --- /dev/null +++ b/pkg/containerd/builtins_windows.go @@ -0,0 +1,27 @@ +//go:build ctrd +// +build ctrd + +/* + 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 containerd + +import ( + _ "github.com/containerd/containerd/diff/lcow" + _ "github.com/containerd/containerd/diff/windows" + _ "github.com/containerd/containerd/snapshots/lcow" + _ "github.com/containerd/containerd/snapshots/windows" +)