1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-04 16:30:02 +00:00
Files
rke/services/controlplane.go

31 lines
806 B
Go
Raw Normal View History

2017-10-29 11:45:21 +02:00
package services
import (
"github.com/Sirupsen/logrus"
2017-11-09 21:50:49 +02:00
"github.com/alena1108/cluster-controller/client/v1"
2017-10-29 11:45:21 +02:00
"github.com/rancher/rke/hosts"
)
2017-11-09 21:50:49 +02: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 11:45:21 +02:00
// run kubeapi
err := runKubeAPI(host, etcdHosts, controlServices.KubeAPI)
2017-10-29 11:45:21 +02:00
if err != nil {
return err
}
// run kubecontroller
err = runKubeController(host, controlServices.KubeController)
2017-10-29 11:45:21 +02:00
if err != nil {
return err
}
// run scheduler
err = runScheduler(host, controlServices.Scheduler)
2017-10-29 11:45:21 +02:00
if err != nil {
return err
}
}
logrus.Infof("[%s] Successfully started Controller Plane..", ControlRole)
2017-10-29 11:45:21 +02:00
return nil
}