From 489495d04b156df5ba258e71d27eef9b3dc76e8a Mon Sep 17 00:00:00 2001 From: Medya Gh Date: Wed, 20 May 2020 17:07:50 -0700 Subject: [PATCH] resolve review comments --- pkg/drivers/kic/types.go | 2 +- pkg/minikube/image/types.go | 2 +- pkg/minikube/node/cache.go | 10 ++++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pkg/drivers/kic/types.go b/pkg/drivers/kic/types.go index fd7596f326..07b5a4543c 100644 --- a/pkg/drivers/kic/types.go +++ b/pkg/drivers/kic/types.go @@ -34,7 +34,7 @@ const ( var ( // BaseImage is the base image is used to spin up kic containers. it uses same base-image as kind. - BaseImage = fmt.Sprintf("gcr.io/k8s-minikube/kicbase:%s@sha256:%s", Version, baseImageSHA) + BaseImage = fmt.Sprintf("gcr.io/k8s-minikube/kicbase1:%s@sha256:%s", Version, baseImageSHA) // BaseImageFallBack the fall back of BaseImage in case gcr.io is not available. stored in github packages https://github.com/kubernetes/minikube/packages/206071 // github packages docker does _NOT_ support pulling by sha as mentioned in the docs: // https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages diff --git a/pkg/minikube/image/types.go b/pkg/minikube/image/types.go index 20cb3ddb86..e0c03586f7 100644 --- a/pkg/minikube/image/types.go +++ b/pkg/minikube/image/types.go @@ -16,7 +16,7 @@ limitations under the License. package image -// ErrNeedsLogin is thrown when regsitery needs login (a general) +// ErrNeedsLogin is thrown when regsitry needs login (a general) var ErrNeedsLogin error // ErrGithubNeedsLogin is thrown when user needs to login to github to use the fall back image diff --git a/pkg/minikube/node/cache.go b/pkg/minikube/node/cache.go index 4229d6d2bf..2de6f6a130 100644 --- a/pkg/minikube/node/cache.go +++ b/pkg/minikube/node/cache.go @@ -130,12 +130,14 @@ func waitDownloadKicArtifacts(g *errgroup.Group) { if err != nil { if errors.Is(err, image.ErrGithubNeedsLogin) { glog.Warningf("Error downloading kic artifacts: %v", err) - out.T(out.Connectivity, "Unfortunately, could not download the base image {{.image_name}} ", out.V{"image_name": strings.Split(kic.BaseImage, "@")[0]}) - out.WarningT("In order to use the fall back image, you need to log into to the github packages registry") - out.T(out.Documentation, "https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-to-github-packages") + out.ErrT(out.Connectivity, "Unfortunately, could not download the base image {{.image_name}} ", out.V{"image_name": strings.Split(kic.BaseImage, "@")[0]}) + out.WarningT("In order to use the fall back image, you need to log in to the github packages registry") + out.T(out.Documentation, `Please visit the following link for documentation around this: + https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-docker-for-use-with-github-packages#authenticating-to-github-packages +`) } if errors.Is(err, image.ErrGithubNeedsLogin) || errors.Is(err, image.ErrNeedsLogin) { - exit.UsageT(`Please either authenticate the registry or use --base-image option to use a different registry.`) + exit.UsageT(`Please either authenticate to the registry or use --base-image flag to use a different registry.`) } else { glog.Errorln("Error downloading kic artifacts: ", err) }