From ab31eddc1b9d79222f767b9240cc37008e07069c Mon Sep 17 00:00:00 2001 From: Adrian Lai Date: Wed, 26 Apr 2023 23:15:49 +0100 Subject: [PATCH] Fix kind image loading for MacOS See: https://github.com/kubernetes-sigs/kind/pull/2957 --- pkg/publish/kind/write.go | 2 +- pkg/publish/kind/write_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/publish/kind/write.go b/pkg/publish/kind/write.go index 7ad42dba10..72d542b0ea 100644 --- a/pkg/publish/kind/write.go +++ b/pkg/publish/kind/write.go @@ -69,7 +69,7 @@ func Write(ctx context.Context, tag name.Tag, img v1.Image) error { }) var buf bytes.Buffer - cmd := n.CommandContext(ctx, "ctr", "--namespace=k8s.io", "images", "import", "-").SetStdin(pr) + cmd := n.CommandContext(ctx, "ctr", "--namespace=k8s.io", "images", "import", "--all-platforms", "-").SetStdin(pr) cmd.SetStdout(&buf) cmd.SetStderr(&buf) if err := cmd.Run(); err != nil { diff --git a/pkg/publish/kind/write_test.go b/pkg/publish/kind/write_test.go index 013e9f1e45..cd0314a3fd 100644 --- a/pkg/publish/kind/write_test.go +++ b/pkg/publish/kind/write_test.go @@ -58,7 +58,7 @@ func TestWrite(t *testing.T) { } c := n.cmds[0] - if got, want := c.cmd, "ctr --namespace=k8s.io images import -"; got != want { + if got, want := c.cmd, "ctr --namespace=k8s.io images import --all-platforms -"; got != want { t.Fatalf("c.cmd = %s, want %s", got, want) } }