mirror of
https://github.com/rancher/rke.git
synced 2025-09-15 22:49:13 +00:00
use k8s version info from kontainer-driver-metadata
This commit is contained in:
committed by
Alena Prokharchyk
parent
8c8e3d1c6b
commit
c191ed6202
@@ -3,6 +3,7 @@ package cluster
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"github.com/rancher/rke/metadata"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/rke/cloudprovider"
|
||||
@@ -25,8 +26,6 @@ const (
|
||||
DefaultClusterName = "local"
|
||||
DefaultClusterSSHKeyPath = "~/.ssh/id_rsa"
|
||||
|
||||
DefaultK8sVersion = v3.DefaultK8s
|
||||
|
||||
DefaultSSHPort = "22"
|
||||
DefaultDockerSockPath = "/var/run/docker.sock"
|
||||
|
||||
@@ -137,7 +136,7 @@ func (c *Cluster) setClusterDefaults(ctx context.Context, flags ExternalFlags) e
|
||||
c.ClusterName = DefaultClusterName
|
||||
}
|
||||
if len(c.Version) == 0 {
|
||||
c.Version = DefaultK8sVersion
|
||||
c.Version = metadata.DefaultK8sVersion
|
||||
}
|
||||
if c.AddonJobTimeout == 0 {
|
||||
c.AddonJobTimeout = k8s.DefaultTimeout
|
||||
@@ -229,7 +228,7 @@ func (c *Cluster) setClusterServicesDefaults() {
|
||||
func (c *Cluster) setClusterImageDefaults() error {
|
||||
var privRegURL string
|
||||
|
||||
imageDefaults, ok := v3.AllK8sVersions[c.Version]
|
||||
imageDefaults, ok := metadata.K8sVersionToRKESystemImages[c.Version]
|
||||
if !ok {
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user