mirror of
https://github.com/rancher/rke.git
synced 2025-09-02 07:24:20 +00:00
Add healtcheck for services components
Integrate healthcheck with each service
This commit is contained in:
@@ -11,10 +11,13 @@ import (
|
||||
"github.com/rancher/types/apis/management.cattle.io/v3"
|
||||
)
|
||||
|
||||
func runKubeAPI(host *hosts.Host, etcdHosts []*hosts.Host, kubeAPIService v3.KubeAPIService, authorizationMode string) error {
|
||||
func runKubeAPI(host *hosts.Host, etcdHosts []*hosts.Host, kubeAPIService v3.KubeAPIService, authorizationMode string, df hosts.DialerFactory) error {
|
||||
etcdConnString := GetEtcdConnString(etcdHosts)
|
||||
imageCfg, hostCfg := buildKubeAPIConfig(host, kubeAPIService, etcdConnString, authorizationMode)
|
||||
return docker.DoRunContainer(host.DClient, imageCfg, hostCfg, KubeAPIContainerName, host.Address, ControlRole)
|
||||
if err := docker.DoRunContainer(host.DClient, imageCfg, hostCfg, KubeAPIContainerName, host.Address, ControlRole); err != nil {
|
||||
return err
|
||||
}
|
||||
return runHealthcheck(host, KubeAPIPort, false, KubeAPIContainerName, df)
|
||||
}
|
||||
|
||||
func removeKubeAPI(host *hosts.Host) error {
|
||||
|
Reference in New Issue
Block a user