From 74e9aa7abbea1ba4e88d3fe4a28713f27e008538 Mon Sep 17 00:00:00 2001 From: Kazuyoshi Kato Date: Mon, 3 Aug 2020 11:54:06 -0700 Subject: [PATCH] snapshots/devmapper: don't hardcord the platform strings The snapshotter doesn't have to exclude non-amd64 platforms. Signed-off-by: Kazuyoshi Kato --- snapshots/devmapper/snapshotter.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/snapshots/devmapper/snapshotter.go b/snapshots/devmapper/snapshotter.go index f75327f21..535bc406c 100644 --- a/snapshots/devmapper/snapshotter.go +++ b/snapshots/devmapper/snapshotter.go @@ -30,12 +30,12 @@ import ( "github.com/containerd/containerd/errdefs" "github.com/containerd/containerd/log" "github.com/containerd/containerd/mount" + "github.com/containerd/containerd/platforms" "github.com/containerd/containerd/plugin" "github.com/containerd/containerd/snapshots" "github.com/containerd/containerd/snapshots/devmapper/dmsetup" "github.com/containerd/containerd/snapshots/storage" "github.com/hashicorp/go-multierror" - ocispec "github.com/opencontainers/image-spec/specs-go/v1" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -46,10 +46,7 @@ func init() { ID: "devmapper", Config: &Config{}, InitFn: func(ic *plugin.InitContext) (interface{}, error) { - ic.Meta.Platforms = append(ic.Meta.Platforms, ocispec.Platform{ - OS: "linux", - Architecture: "amd64", - }) + ic.Meta.Platforms = append(ic.Meta.Platforms, platforms.DefaultSpec()) config, ok := ic.Config.(*Config) if !ok {