the component status health check should check whether the scheme of backend storage url is https or not

This commit is contained in:
zhouhaibing089 2016-04-06 11:44:45 +08:00 committed by haibzhou
parent 4f329516ae
commit 597fdede5a

View File

@ -513,7 +513,13 @@ func (m *Master) getServersToValidate(c *Config) map[string]apiserver.Server {
port = 4001
}
// TODO: etcd health checking should be abstracted in the storage tier
serversToValidate[fmt.Sprintf("etcd-%d", ix)] = apiserver.Server{Addr: addr, Port: port, Path: "/health", Validate: etcdutil.EtcdHealthCheck}
serversToValidate[fmt.Sprintf("etcd-%d", ix)] = apiserver.Server{
Addr: addr,
EnableHTTPS: etcdUrl.Scheme == "https",
Port: port,
Path: "/health",
Validate: etcdutil.EtcdHealthCheck,
}
}
return serversToValidate
}