1
0
mirror of https://github.com/rancher/rke.git synced 2025-04-28 03:31:24 +00:00

add ignore_docker_version

This commit is contained in:
moelsayed 2017-12-15 05:02:44 +02:00
parent e30d90f5c4
commit c671552a27
5 changed files with 14 additions and 7 deletions

View File

@ -20,6 +20,7 @@ network:
flannel_cni_image: quay.io/coreos/flannel-cni:v0.2.0
ssh_key_path: ~/.ssh/test
ignore_docker_version: false
nodes:
- address: 1.1.1.1

View File

@ -40,6 +40,9 @@ func (c *Cluster) InvertIndexHosts() error {
if err := newHost.RegisterDialer(c.Dialer); err != nil {
return fmt.Errorf("Failed to register new Dialer for host [%s]: %v", host.Address, err)
}
newHost.IgnoreDockerVersion = c.IgnoreDockerVersion
for _, role := range host.Role {
logrus.Debugf("Host: " + host.Address + " has role: " + role)
switch role {

View File

@ -273,8 +273,8 @@ func getServiceConfig(reader *bufio.Reader) (*v3.RKEConfigServices, error) {
return &servicesConfig, nil
}
func getAuthConfig(reader *bufio.Reader) (*v3.AuthConfig, error) {
authConfig := v3.AuthConfig{}
func getAuthConfig(reader *bufio.Reader) (*v3.AuthnConfig, error) {
authConfig := v3.AuthnConfig{}
authType, err := getConfig(reader, "Authentication Strategy", "x509")
if err != nil {

View File

@ -15,10 +15,11 @@ import (
type Host struct {
v3.RKEConfigNode
DClient *client.Client
Dialer Dialer
IsControl bool
IsWorker bool
DClient *client.Client
Dialer Dialer
IsControl bool
IsWorker bool
IgnoreDockerVersion bool
}
const (

View File

@ -46,8 +46,10 @@ func (h *Host) TunnelUp() error {
return fmt.Errorf("Error while determining supported Docker version [%s]: %v", info.ServerVersion, err)
}
if !isvalid {
if !isvalid && !h.IgnoreDockerVersion {
return fmt.Errorf("Unsupported Docker version found [%s], supported versions are %v", info.ServerVersion, docker.K8sDockerVersions[K8sVersion])
} else if !isvalid {
logrus.Warnf("Unsupported Docker version found [%s], supported versions are %v", info.ServerVersion, docker.K8sDockerVersions[K8sVersion])
}
return nil