mirror of
https://github.com/rancher/rke.git
synced 2025-09-25 14:48:06 +00:00
Don't remove Ready nodes during restore
This commit is contained in:
committed by
Alena Prokharchyk
parent
c6a60bfd83
commit
2bf2cd8f5b
@@ -85,6 +85,9 @@ 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) {
|
||||
continue
|
||||
}
|
||||
host := &hosts.Host{}
|
||||
host.HostnameOverride = node.Name
|
||||
if !hosts.IsNodeInList(host, uniqueHosts) {
|
||||
|
Reference in New Issue
Block a user