mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #23903 from zhouhaibing089/https-fix
Automatic merge from submit-queue the component status health check should check whether the scheme of backend storage url is https or not fix https://github.com/kubernetes/kubernetes/issues/23897, when querying the component status of etcd (backend storage), the scheme of url is not checked and use `http` always, this commit aims to fix this.
This commit is contained in:
commit
d44457ebaf
@ -517,7 +517,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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user