1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-01 06:56:29 +00:00

add support for specifc control plane IP per host

This commit is contained in:
moelsayed
2017-10-31 13:39:21 +02:00
committed by galal-hussein
parent cdb956d363
commit 5b730bcf6a
6 changed files with 26 additions and 15 deletions

View File

@@ -122,6 +122,11 @@ func parseClusterFile(clusterFile string) (*services.Container, []hosts.Host, er
return nil, nil, fmt.Errorf("User for host (%d) is not provided", i+1)
} else if len(host.Role) == 0 {
return nil, nil, fmt.Errorf("Role for host (%d) is not provided", i+1)
} else if host.ControlPlaneIP == "" {
// if control_plane_ip is not set,
// default to the main IP
host.ControlPlaneIP = host.IP
}
for _, role := range host.Role {
if role != services.ETCDRole && role != services.ControlRole && role != services.WorkerRole {