From ac75071b49cbc69dc4eb7734316e5129b01562e4 Mon Sep 17 00:00:00 2001 From: Wei Fu Date: Sat, 10 Jul 2021 10:14:27 +0800 Subject: [PATCH] remove pkg/cri/platforms package The package is a duplicate of platforms. No need to maintain pkg/cri/platforms. Signed-off-by: Wei Fu --- pkg/cri/cri.go | 3 +-- pkg/cri/platforms/default_unix.go | 28 ---------------------------- pkg/cri/platforms/default_windows.go | 28 ---------------------------- 3 files changed, 1 insertion(+), 58 deletions(-) delete mode 100644 pkg/cri/platforms/default_unix.go delete mode 100644 pkg/cri/platforms/default_windows.go diff --git a/pkg/cri/cri.go b/pkg/cri/cri.go index a86ab39dd..28c80f301 100644 --- a/pkg/cri/cri.go +++ b/pkg/cri/cri.go @@ -41,7 +41,6 @@ import ( criconfig "github.com/containerd/containerd/pkg/cri/config" "github.com/containerd/containerd/pkg/cri/constants" - criplatforms "github.com/containerd/containerd/pkg/cri/platforms" "github.com/containerd/containerd/pkg/cri/server" ) @@ -91,7 +90,7 @@ func initCRIService(ic *plugin.InitContext) (interface{}, error) { client, err := containerd.New( "", containerd.WithDefaultNamespace(constants.K8sContainerdNamespace), - containerd.WithDefaultPlatform(criplatforms.Default()), + containerd.WithDefaultPlatform(platforms.Default()), containerd.WithServices(servicesOpts...), ) if err != nil { diff --git a/pkg/cri/platforms/default_unix.go b/pkg/cri/platforms/default_unix.go deleted file mode 100644 index ca7de553c..000000000 --- a/pkg/cri/platforms/default_unix.go +++ /dev/null @@ -1,28 +0,0 @@ -// +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 platforms - -import ( - "github.com/containerd/containerd/platforms" -) - -// Default returns the current platform's default platform specification. -func Default() platforms.MatchComparer { - return platforms.Default() -} diff --git a/pkg/cri/platforms/default_windows.go b/pkg/cri/platforms/default_windows.go deleted file mode 100644 index 20792d09f..000000000 --- a/pkg/cri/platforms/default_windows.go +++ /dev/null @@ -1,28 +0,0 @@ -// +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 platforms - -import ( - "github.com/containerd/containerd/platforms" -) - -// Default returns the current platform's default platform specification. -func Default() platforms.MatchComparer { - return platforms.Default() -}