1
0
mirror of https://github.com/rancher/rke.git synced 2025-08-10 03:08:50 +00:00
rke/services/controlplane.go

31 lines
802 B
Go
Raw Normal View History

2017-10-29 09:45:21 +00:00
package services
import (
"github.com/rancher/rke/hosts"
2017-11-13 21:28:38 +00:00
"github.com/rancher/types/io.cattle.cluster/v1"
"github.com/sirupsen/logrus"
2017-10-29 09:45:21 +00:00
)
2017-11-09 19:50:49 +00:00
func RunControlPlane(controlHosts []hosts.Host, etcdHosts []hosts.Host, controlServices v1.RKEConfigServices) error {
logrus.Infof("[%s] Building up Controller Plane..", ControlRole)
for _, host := range controlHosts {
2017-10-29 09:45:21 +00:00
// run kubeapi
err := runKubeAPI(host, etcdHosts, controlServices.KubeAPI)
2017-10-29 09:45:21 +00:00
if err != nil {
return err
}
// run kubecontroller
err = runKubeController(host, controlServices.KubeController)
2017-10-29 09:45:21 +00:00
if err != nil {
return err
}
// run scheduler
err = runScheduler(host, controlServices.Scheduler)
2017-10-29 09:45:21 +00:00
if err != nil {
return err
}
}
logrus.Infof("[%s] Successfully started Controller Plane..", ControlRole)
2017-10-29 09:45:21 +00:00
return nil
}