1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-18 16:36:41 +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

@@ -36,7 +36,7 @@ func RemoveCommand() cli.Command {
func ClusterRemove(rkeConfig *v3.RancherKubernetesEngineConfig, dialerFactory hosts.DialerFactory) error {
logrus.Infof("Tearing down Kubernetes cluster")
kubeCluster, err := cluster.ParseCluster(rkeConfig, clusterFilePath, dialerFactory)
kubeCluster, err := cluster.ParseCluster(rkeConfig, clusterFilePath, dialerFactory, nil)
if err != nil {
return err
}

View File

@@ -31,10 +31,10 @@ func UpCommand() cli.Command {
}
}
func ClusterUp(rkeConfig *v3.RancherKubernetesEngineConfig, dialerFactory hosts.DialerFactory) (string, string, string, string, error) {
func ClusterUp(rkeConfig *v3.RancherKubernetesEngineConfig, dockerDialerFactory, healthcheckDialerFactory hosts.DialerFactory) (string, string, string, string, error) {
logrus.Infof("Building Kubernetes cluster")
var APIURL, caCrt, clientCert, clientKey string
kubeCluster, err := cluster.ParseCluster(rkeConfig, clusterFilePath, dialerFactory)
kubeCluster, err := cluster.ParseCluster(rkeConfig, clusterFilePath, dockerDialerFactory, healthcheckDialerFactory)
if err != nil {
return APIURL, caCrt, clientCert, clientKey, err
}
@@ -113,6 +113,6 @@ func clusterUpFromCli(ctx *cli.Context) error {
if err != nil {
return fmt.Errorf("Failed to parse cluster file: %v", err)
}
_, _, _, _, err = ClusterUp(rkeConfig, nil)
_, _, _, _, err = ClusterUp(rkeConfig, nil, nil)
return err
}