Skip to content

Commit

Permalink
Don't download podman images to docker daemon
Browse files Browse the repository at this point in the history
  • Loading branch information
afbjorklund committed Apr 13, 2020
1 parent 92b59cb commit a4fb263
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
16 changes: 10 additions & 6 deletions pkg/minikube/node/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,17 @@ func doCacheBinaries(k8sVersion string) error {
}

// BeginDownloadKicArtifacts downloads the kic image + preload tarball, returns true if preload is available
func beginDownloadKicArtifacts(g *errgroup.Group) {
func beginDownloadKicArtifacts(g *errgroup.Group, driver string, cRuntime string) {
out.T(out.Pulling, "Pulling base image ...")
glog.Info("Beginning downloading kic artifacts")
g.Go(func() error {
glog.Infof("Downloading %s to local daemon", kic.BaseImage)
return image.WriteImageToDaemon(kic.BaseImage)
})
glog.Infof("Beginning downloading kic artifacts for %s with %s", driver, cRuntime)
if driver == "docker" {
g.Go(func() error {
glog.Infof("Downloading %s to local daemon", kic.BaseImage)
return image.WriteImageToDaemon(kic.BaseImage)
})
}
// TODO: driver == "podman"
glog.Info("Container runtime isn't docker, skipping download")
}

// WaitDownloadKicArtifacts blocks until the required artifacts for KIC are downloaded.
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/node/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func Provision(cc *config.ClusterConfig, n *config.Node, apiServer bool) (comman
}

if driver.IsKIC(cc.Driver) {
beginDownloadKicArtifacts(&kicGroup)
beginDownloadKicArtifacts(&kicGroup, cc.Driver, cc.KubernetesConfig.ContainerRuntime)
}

if !driver.BareMetal(cc.Driver) {
Expand Down

0 comments on commit a4fb263

Please sign in to comment.