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:
parent
6cebe31ed3
commit
203bd005e3
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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 (
|
||||
|
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user