Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move daemon cache check before file cache check #11690

Merged
merged 1 commit into from
Jun 21, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions pkg/minikube/node/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, down
}()
for _, img := range append([]string{baseImg}, kic.FallbackImages...) {
var err error

if driver.IsDocker(cc.Driver) {
if download.ImageExistsInDaemon(img) {
klog.Infof("%s exists in daemon, skipping load", img)
finalImg = img
return nil
}
}

klog.Infof("Downloading %s to local cache", img)
err = download.ImageToCache(img)
if err == nil {
Expand All @@ -141,14 +150,6 @@ func beginDownloadKicBaseImage(g *errgroup.Group, cc *config.ClusterConfig, down
return err
}

if driver.IsDocker(cc.Driver) {
if download.ImageExistsInDaemon(img) {
klog.Infof("%s exists in daemon, skipping load", img)
finalImg = img
return nil
}
}

if cc.Driver == driver.Podman {
return fmt.Errorf("not yet implemented, see issue #8426")
}
Expand Down