1
0
mirror of https://github.com/rancher/rke.git synced 2025-04-27 19:25:44 +00:00
rke/services/controlplane.go
galal-hussein ad34392a3c Add default cluster config file and return service container pointer
Add more generic functions to go services

Add x509 authentication
2017-11-06 19:40:15 +02:00

30 lines
741 B
Go

package services
import (
"github.com/Sirupsen/logrus"
"github.com/rancher/rke/hosts"
)
func RunControlPlane(controlHosts []hosts.Host, etcdHosts []hosts.Host, controlServices Services) error {
logrus.Infof("[%s] Building up Controller Plane..", ControlRole)
for _, host := range controlHosts {
// run kubeapi
err := runKubeAPI(host, etcdHosts, controlServices.KubeAPI)
if err != nil {
return err
}
// run kubecontroller
err = runKubeController(host, controlServices.KubeController)
if err != nil {
return err
}
// run scheduler
err = runScheduler(host, controlServices.Scheduler)
if err != nil {
return err
}
}
logrus.Infof("[%s] Successfully started Controller Plane..", ControlRole)
return nil
}