mirror of
https://github.com/rancher/rke.git
synced 2025-09-01 06:56:29 +00:00
Restore backup to a new etcd plane
This commit is contained in:
committed by
Alena Prokharchyk
parent
bfbdf33820
commit
e3d6fb4db9
@@ -185,10 +185,11 @@ func removeFromHosts(hostToRemove *hosts.Host, hostList []*hosts.Host) []*hosts.
|
||||
}
|
||||
|
||||
func removeFromRKENodes(nodeToRemove v3.RKEConfigNode, nodeList []v3.RKEConfigNode) []v3.RKEConfigNode {
|
||||
for i := range nodeList {
|
||||
if nodeToRemove.Address == nodeList[i].Address {
|
||||
return append(nodeList[:i], nodeList[i+1:]...)
|
||||
l := []v3.RKEConfigNode{}
|
||||
for _, node := range nodeList {
|
||||
if nodeToRemove.Address != node.Address {
|
||||
l = append(l, node)
|
||||
}
|
||||
}
|
||||
return nodeList
|
||||
return l
|
||||
}
|
||||
|
Reference in New Issue
Block a user