Skip to content

Commit 00018e5

Browse files
committed
Fix image loading with podman driver
This fixes issue 8426 Signed-off-by: Michael Adam <[email protected]>
1 parent 59eba66 commit 00018e5

File tree

1 file changed

+10
-13
lines changed

1 file changed

+10
-13
lines changed

pkg/minikube/node/cache.go

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,22 +164,19 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, down
164164
err = download.ImageToCache(img)
165165
if err == nil {
166166
klog.Infof("successfully saved %s as a tarball", img)
167-
}
168-
if downloadOnly && err == nil {
169-
return nil
170-
}
171-
172-
if cc.Driver == driver.Podman {
173-
return fmt.Errorf("not yet implemented, see issue #8426")
174-
}
175-
if driver.IsDocker(cc.Driver) && err == nil {
176-
klog.Infof("Loading %s from local cache", img)
177-
if finalImg, err = download.CacheToDaemon(img); err == nil {
178-
klog.Infof("successfully loaded and using %s from cached tarball", img)
167+
if downloadOnly {
179168
return nil
180169
}
170+
171+
if driver.IsKIC(cc.Driver) {
172+
klog.Infof("Loading %s from local cache", img)
173+
if finalImg, err = download.CacheToDaemon(img); err == nil {
174+
klog.Infof("successfully loaded and using %s from cached tarball", img)
175+
return nil
176+
}
177+
}
178+
klog.Infof("failed to download %s, will try fallback image if available: %v", img, err)
181179
}
182-
klog.Infof("failed to download %s, will try fallback image if available: %v", img, err)
183180
}
184181
// second if we failed to download any fallback image
185182
// that means probably all registries are blocked by network issues

0 commit comments

Comments
 (0)