mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 15:06:23 +00:00
use docker versions from k8s metadata
This commit is contained in:
committed by
Alena Prokharchyk
parent
e1e98a84d8
commit
b4a7b7aa70
@@ -20,6 +20,7 @@ import (
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/docker/docker/pkg/stdcopy"
|
||||
"github.com/rancher/rke/log"
|
||||
"github.com/rancher/rke/metadata"
|
||||
v3 "github.com/rancher/types/apis/management.cattle.io/v3"
|
||||
"github.com/sirupsen/logrus"
|
||||
"k8s.io/apimachinery/pkg/util/sets"
|
||||
@@ -35,17 +36,6 @@ const (
|
||||
RetryCount = 3
|
||||
)
|
||||
|
||||
var K8sDockerVersions = map[string][]string{
|
||||
"1.8": {"1.11.x", "1.12.x", "1.13.x", "17.03.x"},
|
||||
"1.9": {"1.11.x", "1.12.x", "1.13.x", "17.03.x", "18.06.x", "18.09.x"},
|
||||
"1.10": {"1.11.x", "1.12.x", "1.13.x", "17.03.x", "18.06.x", "18.09.x"},
|
||||
"1.11": {"1.11.x", "1.12.x", "1.13.x", "17.03.x", "18.06.x", "18.09.x"},
|
||||
"1.12": {"1.11.x", "1.12.x", "1.13.x", "17.03.x", "17.06.x", "17.09.x", "18.06.x", "18.09.x"},
|
||||
"1.13": {"1.11.x", "1.12.x", "1.13.x", "17.03.x", "17.06.x", "17.09.x", "18.06.x", "18.09.x"},
|
||||
"1.14": {"1.13.x", "17.03.x", "17.06.x", "17.09.x", "18.06.x", "18.09.x"},
|
||||
"1.15": {"1.13.x", "17.03.x", "17.06.x", "17.09.x", "18.06.x", "18.09.x"},
|
||||
}
|
||||
|
||||
type dockerConfig struct {
|
||||
Auths map[string]authConfig `json:"auths,omitempty"`
|
||||
}
|
||||
@@ -533,7 +523,7 @@ func IsSupportedDockerVersion(info types.Info, K8sVersion string) (bool, error)
|
||||
if err != nil {
|
||||
return false, err
|
||||
}
|
||||
for _, DockerVersion := range K8sDockerVersions[K8sVersion] {
|
||||
for _, DockerVersion := range metadata.K8sVersionToDockerVersions[K8sVersion] {
|
||||
supportedDockerVersion, err := convertToSemver(DockerVersion)
|
||||
if err != nil {
|
||||
return false, err
|
||||
|
Reference in New Issue
Block a user