Merge pull request #7221 from kubernetes/windows-out

Use correct preload paths on Windows, announce base image pull
pull/7228/head
Medya Ghazizadeh 2020-03-24 22:37:07 -07:00 committed by GitHub
commit 1f30cfcdbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

@ -23,7 +23,7 @@ import (
"io/ioutil"
"net/http"
"os"
"path"
"path/filepath"
"cloud.google.com/go/storage"
"google.golang.org/api/option"
@ -59,14 +59,14 @@ func targetDir() string {
return localpath.MakeMiniPath("cache", "preloaded-tarball")
}
// PreloadChecksumPath returns path to checksum file
// PreloadChecksumPath returns the local path to the cached checksum file
func PreloadChecksumPath(k8sVersion string) string {
return path.Join(targetDir(), checksumName(k8sVersion))
return filepath.Join(targetDir(), checksumName(k8sVersion))
}
// TarballPath returns the path to the preloaded tarball
// TarballPath returns the local path to the cached preload tarball
func TarballPath(k8sVersion string) string {
return path.Join(targetDir(), TarballName(k8sVersion))
return filepath.Join(targetDir(), TarballName(k8sVersion))
}
// remoteTarballURL returns the URL for the remote tarball in GCS
@ -122,7 +122,7 @@ func Preload(k8sVersion, containerRuntime string) error {
return nil
}
out.T(out.FileDownload, "Downloading preloaded images tarball for k8s {{.version}} ...", out.V{"version": k8sVersion})
out.T(out.FileDownload, "Downloading Kubernetes {{.version}} preload ...", out.V{"version": k8sVersion})
url := remoteTarballURL(k8sVersion)
tmpDst := targetPath + ".download"

View File

@ -100,6 +100,7 @@ func doCacheBinaries(k8sVersion string) error {
// BeginDownloadKicArtifacts downloads the kic image + preload tarball, returns true if preload is available
func beginDownloadKicArtifacts(g *errgroup.Group) {
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)