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

Handle add/remove for etcd nodes

Handle adding more than one etcd at once
This commit is contained in:
galal-hussein
2018-01-11 03:00:14 +02:00
parent f7bf07b15c
commit 67774f7e30
13 changed files with 313 additions and 64 deletions

View File

@@ -32,10 +32,10 @@ func UpCommand() cli.Command {
}
}
func ClusterUp(ctx context.Context, rkeConfig *v3.RancherKubernetesEngineConfig, dockerDialerFactory, healthcheckDialerFactory hosts.DialerFactory) (string, string, string, string, error) {
func ClusterUp(ctx context.Context, rkeConfig *v3.RancherKubernetesEngineConfig, dockerDialerFactory, localConnDialerFactory hosts.DialerFactory) (string, string, string, string, error) {
log.Infof(ctx, "Building Kubernetes cluster")
var APIURL, caCrt, clientCert, clientKey string
kubeCluster, err := cluster.ParseCluster(ctx, rkeConfig, clusterFilePath, dockerDialerFactory, healthcheckDialerFactory)
kubeCluster, err := cluster.ParseCluster(ctx, rkeConfig, clusterFilePath, dockerDialerFactory, localConnDialerFactory)
if err != nil {
return APIURL, caCrt, clientCert, clientKey, err
}
@@ -50,10 +50,6 @@ func ClusterUp(ctx context.Context, rkeConfig *v3.RancherKubernetesEngineConfig,
return APIURL, caCrt, clientCert, clientKey, err
}
if err := cluster.CheckEtcdHostsChanged(kubeCluster, currentCluster); err != nil {
return APIURL, caCrt, clientCert, clientKey, err
}
err = cluster.SetUpAuthentication(ctx, kubeCluster, currentCluster)
if err != nil {
return APIURL, caCrt, clientCert, clientKey, err