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

Restore backup to a new etcd plane

This commit is contained in:
moelsayed
2019-03-04 18:59:43 +02:00
committed by Alena Prokharchyk
parent bfbdf33820
commit e3d6fb4db9
8 changed files with 54 additions and 20 deletions

View File

@@ -9,7 +9,7 @@ import (
"github.com/rancher/rke/pki"
"github.com/rancher/rke/services"
"github.com/rancher/rke/util"
"github.com/rancher/types/apis/management.cattle.io/v3"
v3 "github.com/rancher/types/apis/management.cattle.io/v3"
"golang.org/x/sync/errgroup"
)
@@ -85,7 +85,8 @@ func (c *Cluster) RemoveOldNodes(ctx context.Context) error {
}
uniqueHosts := hosts.GetUniqueHostList(c.EtcdHosts, c.ControlPlaneHosts, c.WorkerHosts)
for _, node := range nodeList.Items {
if k8s.IsNodeReady(node) {
_, isEtcd := node.Labels[etcdRoleLabel]
if k8s.IsNodeReady(node) && !isEtcd {
continue
}
host := &hosts.Host{}