1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-16 15:10:12 +00:00

Update rancher types

This commit is contained in:
galal-hussein
2017-11-14 20:11:21 +02:00
parent 75448eb572
commit 37b6c8a65e
20 changed files with 134 additions and 75 deletions

View File

@@ -37,7 +37,7 @@ func (c *Cluster) InvertIndexHosts() error {
c.ControlPlaneHosts = make([]hosts.Host, 0)
for _, host := range c.Hosts {
for _, role := range host.Role {
logrus.Debugf("Host: " + host.Hostname + " has role: " + role)
logrus.Debugf("Host: " + host.AdvertisedHostname + " has role: " + role)
newHost := hosts.Host{
RKEConfigHost: host,
}
@@ -49,7 +49,7 @@ func (c *Cluster) InvertIndexHosts() error {
case services.WorkerRole:
c.WorkerHosts = append(c.WorkerHosts, newHost)
default:
return fmt.Errorf("Failed to recognize host [%s] role %s", host.Hostname, role)
return fmt.Errorf("Failed to recognize host [%s] role %s", host.AdvertisedHostname, role)
}
}
}
@@ -57,7 +57,7 @@ func (c *Cluster) InvertIndexHosts() error {
}
func (c *Cluster) SetUpHosts() error {
if c.AuthType == X509AuthenticationProvider {
if c.Authentication.Strategy == X509AuthenticationProvider {
logrus.Infof("[certificates] Deploying kubernetes certificates to Cluster nodes")
err := pki.DeployCertificatesOnMasters(c.ControlPlaneHosts, c.Certificates)
if err != nil {