Skip preload download if --image-repository is set
parent
442c2dc7c3
commit
06fadf8213
|
|
@ -255,7 +255,7 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k
|
|||
if strings.ToLower(repository) == "auto" || mirrorCountry != "" {
|
||||
found, autoSelectedRepository, err := selectImageRepository(mirrorCountry, semver.MustParse(strings.TrimPrefix(k8sVersion, version.VersionPrefix)))
|
||||
if err != nil {
|
||||
exit.WithError("Failed to check main repository and mirrors for images for images", err)
|
||||
exit.WithError("Failed to check main repository and mirrors for images", err)
|
||||
}
|
||||
|
||||
if !found {
|
||||
|
|
@ -269,7 +269,7 @@ func generateClusterConfig(cmd *cobra.Command, existing *config.ClusterConfig, k
|
|||
repository = autoSelectedRepository
|
||||
}
|
||||
|
||||
if cmd.Flags().Changed(imageRepository) {
|
||||
if cmd.Flags().Changed(imageRepository) || cmd.Flags().Changed(imageMirrorCountry) {
|
||||
out.T(out.SuccessType, "Using image repository {{.name}}", out.V{"name": repository})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ const (
|
|||
|
||||
// BeginCacheKubernetesImages caches images required for kubernetes version in the background
|
||||
func beginCacheKubernetesImages(g *errgroup.Group, imageRepository string, k8sVersion string, cRuntime string) {
|
||||
if download.PreloadExists(k8sVersion, cRuntime) {
|
||||
if imageRepository == "" && download.PreloadExists(k8sVersion, cRuntime) {
|
||||
glog.Info("Caching tarball of preloaded images")
|
||||
err := download.Preload(k8sVersion, cRuntime)
|
||||
if err == nil {
|
||||
|
|
|
|||
Loading…
Reference in New Issue