Skip to content

Commit

Permalink
Merge pull request #385 from xiaods/dev
Browse files Browse the repository at this point in the history
fix: update pkg/containerd pkg
  • Loading branch information
xiaods authored Nov 21, 2024
2 parents 41b0c46 + bd7dedf commit 6a9fab4
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 2 deletions.
2 changes: 1 addition & 1 deletion hack/build
Original file line number Diff line number Diff line change
Expand Up @@ -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}
)
Expand Down
14 changes: 14 additions & 0 deletions pkg/containerd/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"
Expand All @@ -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"
)
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 5 additions & 1 deletion pkg/containerd/builtins_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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"
Expand Down
27 changes: 27 additions & 0 deletions pkg/containerd/builtins_windows.go
Original file line number Diff line number Diff line change
@@ -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"
)

0 comments on commit 6a9fab4

Please sign in to comment.