1
0
mirror of https://github.com/rancher/rke.git synced 2025-05-10 09:24:32 +00:00

Change Ignore to enforce docker version

This commit is contained in:
galal-hussein 2018-01-08 22:22:20 +02:00
parent 6cebe31ed3
commit 203bd005e3
4 changed files with 8 additions and 8 deletions

View File

@ -19,7 +19,7 @@ network:
flannel_cni_image: quay.io/coreos/flannel-cni:v0.2.0
ssh_key_path: ~/.ssh/test
ignore_docker_version: false
enforce_docker_version: false
# Kubernetes authorization mode; currently only `rbac` is supported and enabled by default.
# Use `mode: none` to disable authorization
authorization:

View File

@ -38,7 +38,7 @@ func (c *Cluster) InvertIndexHosts() error {
RKEConfigNode: host,
}
newHost.IgnoreDockerVersion = c.IgnoreDockerVersion
newHost.EnforceDockerVersion = c.EnforceDockerVersion
for _, role := range host.Role {
logrus.Debugf("Host: " + host.Address + " has role: " + role)

View File

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

View File

@ -47,7 +47,7 @@ func (h *Host) TunnelUp(dialerFactory DialerFactory) error {
return fmt.Errorf("Error while determining supported Docker version [%s]: %v", info.ServerVersion, err)
}
if !isvalid && !h.IgnoreDockerVersion {
if !isvalid && h.EnforceDockerVersion {
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])