1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-16 23:20:56 +00:00

Add healtcheck for services components

Integrate healthcheck with each service
This commit is contained in:
galal-hussein
2017-12-20 00:18:27 +02:00
parent e7e28daf23
commit ed7ca110b0
17 changed files with 166 additions and 36 deletions

View File

@@ -10,9 +10,12 @@ import (
"github.com/rancher/types/apis/management.cattle.io/v3"
)
func runKubelet(host *hosts.Host, kubeletService v3.KubeletService) error {
func runKubelet(host *hosts.Host, kubeletService v3.KubeletService, df hosts.DialerFactory) error {
imageCfg, hostCfg := buildKubeletConfig(host, kubeletService)
return docker.DoRunContainer(host.DClient, imageCfg, hostCfg, KubeletContainerName, host.Address, WorkerRole)
if err := docker.DoRunContainer(host.DClient, imageCfg, hostCfg, KubeletContainerName, host.Address, WorkerRole); err != nil {
return err
}
return runHealthcheck(host, KubeletPort, true, KubeletContainerName, df)
}
func removeKubelet(host *hosts.Host) error {