implement Preload check for crio and containerd

pull/7228/head
Medya Gh 2020-03-25 01:12:27 -07:00
parent 5689d3b8e1
commit 1be46bceec
2 changed files with 8 additions and 0 deletions

View File

@ -30,6 +30,7 @@ import (
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/bootstrapper/images"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/download"
"k8s.io/minikube/pkg/minikube/out"
)
@ -313,5 +314,8 @@ func (r *Containerd) SystemLogCmd(len int) string {
// Preload preloads the container runtime with k8s images
func (r *Containerd) Preload(cfg config.KubernetesConfig) error {
if !download.PreloadExists(cfg.KubernetesVersion, cfg.ContainerRuntime) {
return nil
}
return fmt.Errorf("not yet implemented for %s", r.Name())
}

View File

@ -26,6 +26,7 @@ import (
"github.com/pkg/errors"
"k8s.io/minikube/pkg/minikube/bootstrapper/images"
"k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/download"
"k8s.io/minikube/pkg/minikube/out"
)
@ -230,5 +231,8 @@ func (r *CRIO) SystemLogCmd(len int) string {
// Preload preloads the container runtime with k8s images
func (r *CRIO) Preload(cfg config.KubernetesConfig) error {
if !download.PreloadExists(cfg.KubernetesVersion, cfg.ContainerRuntime) {
return nil
}
return fmt.Errorf("not yet implemented for %s", r.Name())
}