Avoid cache loading for the none driver, Docker already has a cache

pull/7015/head
Thomas Stromberg 2020-03-11 14:18:29 -07:00
parent d8f5e769bb
commit 97cc383de0
2 changed files with 7 additions and 2 deletions

View File

@ -66,7 +66,9 @@ func configureRuntimes(runner cruntime.CommandRunner, drvName string, k8s config
if driver.BareMetal(drvName) {
disableOthers = false
}
if !driver.IsKIC(drvName) {
// Preload is overly invasive for VM's, and caching is not meaningful.
if driver.IsVM(drvName) {
if err := cr.Preload(k8s.KubernetesVersion); err != nil {
switch err.(type) {
case *cruntime.ErrISOFeature:

View File

@ -44,7 +44,10 @@ func Start(mc config.ClusterConfig, n config.Node, primary bool, existingAddons
}
var cacheGroup errgroup.Group
beginCacheKubernetesImages(&cacheGroup, mc.KubernetesConfig.ImageRepository, k8sVersion, mc.KubernetesConfig.ContainerRuntime)
// Adding a second layer of cache does not make sense for the none driver
if !driver.BareMetal(driverName) {
beginCacheKubernetesImages(&cacheGroup, mc.KubernetesConfig.ImageRepository, k8sVersion, mc.KubernetesConfig.ContainerRuntime)
}
// Abstraction leakage alert: startHost requires the config to be saved, to satistfy pkg/provision/buildroot.
// Hence, saveConfig must be called before startHost, and again afterwards when we know the IP.