Skip to content

Commit ab41aa5

Browse files
authored
Merge pull request #11690 from andriyDev/fix-redownload-kicbase
Move daemon cache check before file cache check
2 parents 4a8cf23 + 95333ed commit ab41aa5

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

pkg/minikube/node/cache.go

+9-8
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,15 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, down
131131
}()
132132
for _, img := range append([]string{baseImg}, kic.FallbackImages...) {
133133
var err error
134+
135+
if driver.IsDocker(cc.Driver) {
136+
if download.ImageExistsInDaemon(img) {
137+
klog.Infof("%s exists in daemon, skipping load", img)
138+
finalImg = img
139+
return nil
140+
}
141+
}
142+
134143
klog.Infof("Downloading %s to local cache", img)
135144
err = download.ImageToCache(img)
136145
if err == nil {
@@ -141,14 +150,6 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, down
141150
return err
142151
}
143152

144-
if driver.IsDocker(cc.Driver) {
145-
if download.ImageExistsInDaemon(img) {
146-
klog.Infof("%s exists in daemon, skipping load", img)
147-
finalImg = img
148-
return nil
149-
}
150-
}
151-
152153
if cc.Driver == driver.Podman {
153154
return fmt.Errorf("not yet implemented, see issue #8426")
154155
}

0 commit comments

Comments
 (0)