Remove nodeinfo endpoint from kubelet
This commit is contained in:
@@ -39,7 +39,6 @@ var ErrPodInfoNotAvailable = errors.New("no pod info available")
|
||||
type KubeletClient interface {
|
||||
KubeletHealthChecker
|
||||
PodInfoGetter
|
||||
NodeInfoGetter
|
||||
ConnectionInfoGetter
|
||||
}
|
||||
|
||||
@@ -56,10 +55,6 @@ type PodInfoGetter interface {
|
||||
GetPodStatus(host, podNamespace, podID string) (api.PodStatusResult, error)
|
||||
}
|
||||
|
||||
type NodeInfoGetter interface {
|
||||
GetNodeInfo(host string) (api.NodeInfo, error)
|
||||
}
|
||||
|
||||
type ConnectionInfoGetter interface {
|
||||
GetConnectionInfo(host string) (scheme string, port uint, transport http.RoundTripper, error error)
|
||||
}
|
||||
@@ -136,13 +131,6 @@ func (c *HTTPKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.
|
||||
return status, err
|
||||
}
|
||||
|
||||
// GetNodeInfo gets information about the specified node.
|
||||
func (c *HTTPKubeletClient) GetNodeInfo(host string) (api.NodeInfo, error) {
|
||||
info := api.NodeInfo{}
|
||||
_, err := c.getEntity(host, "/api/v1beta1/nodeInfo", "", &info)
|
||||
return info, err
|
||||
}
|
||||
|
||||
// getEntity might return a nil response.
|
||||
func (c *HTTPKubeletClient) getEntity(host, path, query string, entity runtime.Object) (*http.Response, error) {
|
||||
request, err := http.NewRequest("GET", c.url(host, path, query), nil)
|
||||
@@ -179,11 +167,6 @@ func (c FakeKubeletClient) GetPodStatus(host, podNamespace string, podID string)
|
||||
return api.PodStatusResult{}, errors.New("Not Implemented")
|
||||
}
|
||||
|
||||
// GetNodeInfo is a fake implementation of PodInfoGetter.GetNodeInfo
|
||||
func (c FakeKubeletClient) GetNodeInfo(host string) (api.NodeInfo, error) {
|
||||
return api.NodeInfo{}, errors.New("Not Implemented")
|
||||
}
|
||||
|
||||
func (c FakeKubeletClient) HealthCheck(host string) (probe.Result, error) {
|
||||
return probe.Unknown, errors.New("Not Implemented")
|
||||
}
|
||||
|
Reference in New Issue
Block a user