mirror of
https://github.com/rancher/rke.git
synced 2025-09-25 06:33:56 +00:00
Cluster Down/Remove
Reverse order and add force flag
This commit is contained in:
@@ -25,6 +25,18 @@ func RunEtcdPlane(etcdHosts []hosts.Host, etcdService v1.ETCDService) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func RemoveEtcdPlane(etcdHosts []hosts.Host) error {
|
||||
logrus.Infof("[%s] Tearing down Etcd Plane..", ETCDRole)
|
||||
for _, host := range etcdHosts {
|
||||
err := docker.DoRemoveContainer(host.DClient, EtcdContainerName, host.AdvertisedHostname)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
logrus.Infof("[%s] Successfully teared down Etcd Plane..", ETCDRole)
|
||||
return nil
|
||||
}
|
||||
|
||||
func buildEtcdConfig(host hosts.Host, etcdService v1.ETCDService, initCluster string) (*container.Config, *container.HostConfig) {
|
||||
imageCfg := &container.Config{
|
||||
Image: etcdService.Image,
|
||||
|
Reference in New Issue
Block a user