remove pkg/cri/platforms package

The package is a duplicate of platforms. No need to maintain
pkg/cri/platforms.

Signed-off-by: Wei Fu <fuweid89@gmail.com>
This commit is contained in:
Wei Fu 2021-07-10 10:14:27 +08:00
parent 51f2ce92fc
commit ac75071b49
3 changed files with 1 additions and 58 deletions

View File

@ -41,7 +41,6 @@ import (
criconfig "github.com/containerd/containerd/pkg/cri/config" criconfig "github.com/containerd/containerd/pkg/cri/config"
"github.com/containerd/containerd/pkg/cri/constants" "github.com/containerd/containerd/pkg/cri/constants"
criplatforms "github.com/containerd/containerd/pkg/cri/platforms"
"github.com/containerd/containerd/pkg/cri/server" "github.com/containerd/containerd/pkg/cri/server"
) )
@ -91,7 +90,7 @@ func initCRIService(ic *plugin.InitContext) (interface{}, error) {
client, err := containerd.New( client, err := containerd.New(
"", "",
containerd.WithDefaultNamespace(constants.K8sContainerdNamespace), containerd.WithDefaultNamespace(constants.K8sContainerdNamespace),
containerd.WithDefaultPlatform(criplatforms.Default()), containerd.WithDefaultPlatform(platforms.Default()),
containerd.WithServices(servicesOpts...), containerd.WithServices(servicesOpts...),
) )
if err != nil { if err != nil {

View File

@ -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()
}

View File

@ -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()
}