Skip to content

Commit 59a676e

Browse files
aidyimjasonh
authored andcommitted
Fix kind image loading for MacOS
See: kubernetes-sigs/kind#2957
1 parent 2e9e58b commit 59a676e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/publish/kind/write.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ func Write(ctx context.Context, tag name.Tag, img v1.Image) error {
6969
})
7070

7171
var buf bytes.Buffer
72-
cmd := n.CommandContext(ctx, "ctr", "--namespace=k8s.io", "images", "import", "-").SetStdin(pr)
72+
cmd := n.CommandContext(ctx, "ctr", "--namespace=k8s.io", "images", "import", "--all-platforms", "-").SetStdin(pr)
7373
cmd.SetStdout(&buf)
7474
cmd.SetStderr(&buf)
7575
if err := cmd.Run(); err != nil {

pkg/publish/kind/write_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func TestWrite(t *testing.T) {
5757
}
5858
c := n.cmds[0]
5959

60-
if got, want := c.cmd, "ctr --namespace=k8s.io images import -"; got != want {
60+
if got, want := c.cmd, "ctr --namespace=k8s.io images import --all-platforms -"; got != want {
6161
t.Fatalf("c.cmd = %s, want %s", got, want)
6262
}
6363
}

0 commit comments

Comments
 (0)