Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
868e05ce
Commit
868e05ce
authored
Apr 10, 2015
by
Deyuan Deng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove nodeinfo endpoint from kubelet
parent
8dfd7001
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
0 additions
and
73 deletions
+0
-73
integration.go
cmd/integration/integration.go
+0
-4
register.go
pkg/api/register.go
+0
-2
types.go
pkg/api/types.go
+0
-9
register.go
pkg/api/v1beta3/register.go
+0
-2
types.go
pkg/api/v1beta3/types.go
+0
-9
kubelet.go
pkg/client/kubelet.go
+0
-17
nodecontroller_test.go
pkg/cloudprovider/controller/nodecontroller_test.go
+0
-4
server.go
pkg/kubelet/server.go
+0
-26
No files found.
cmd/integration/integration.go
View file @
868e05ce
...
...
@@ -103,10 +103,6 @@ func (fakeKubeletClient) GetPodStatus(host, podNamespace, podName string) (api.P
return
r
,
nil
}
func
(
fakeKubeletClient
)
GetNodeInfo
(
host
string
)
(
api
.
NodeInfo
,
error
)
{
return
api
.
NodeInfo
{},
nil
}
func
(
fakeKubeletClient
)
GetConnectionInfo
(
host
string
)
(
string
,
uint
,
http
.
RoundTripper
,
error
)
{
return
""
,
0
,
nil
,
errors
.
New
(
"Not Implemented"
)
}
...
...
pkg/api/register.go
View file @
868e05ce
...
...
@@ -34,7 +34,6 @@ func init() {
&
Service
{},
&
NodeList
{},
&
Node
{},
&
NodeInfo
{},
&
Status
{},
&
Endpoints
{},
&
EndpointsList
{},
...
...
@@ -75,7 +74,6 @@ func (*ServiceList) IsAnAPIObject() {}
func
(
*
Endpoints
)
IsAnAPIObject
()
{}
func
(
*
EndpointsList
)
IsAnAPIObject
()
{}
func
(
*
Node
)
IsAnAPIObject
()
{}
func
(
*
NodeInfo
)
IsAnAPIObject
()
{}
func
(
*
NodeList
)
IsAnAPIObject
()
{}
func
(
*
Binding
)
IsAnAPIObject
()
{}
func
(
*
Status
)
IsAnAPIObject
()
{}
...
...
pkg/api/types.go
View file @
868e05ce
...
...
@@ -1079,15 +1079,6 @@ type NodeStatus struct {
NodeInfo
NodeSystemInfo
`json:"nodeInfo,omitempty"`
}
// NodeInfo is the information collected on the node.
type
NodeInfo
struct
{
TypeMeta
`json:",inline"`
// Capacity represents the available resources of a node
Capacity
ResourceList
`json:"capacity,omitempty"`
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node
NodeSystemInfo
`json:",inline,omitempty"`
}
type
NodePhase
string
// These are the valid phases of node.
...
...
pkg/api/v1beta3/register.go
View file @
868e05ce
...
...
@@ -38,7 +38,6 @@ func init() {
&
Endpoints
{},
&
EndpointsList
{},
&
Node
{},
&
NodeInfo
{},
&
NodeList
{},
&
Binding
{},
&
Status
{},
...
...
@@ -78,7 +77,6 @@ func (*ServiceList) IsAnAPIObject() {}
func
(
*
Endpoints
)
IsAnAPIObject
()
{}
func
(
*
EndpointsList
)
IsAnAPIObject
()
{}
func
(
*
Node
)
IsAnAPIObject
()
{}
func
(
*
NodeInfo
)
IsAnAPIObject
()
{}
func
(
*
NodeList
)
IsAnAPIObject
()
{}
func
(
*
Binding
)
IsAnAPIObject
()
{}
func
(
*
Status
)
IsAnAPIObject
()
{}
...
...
pkg/api/v1beta3/types.go
View file @
868e05ce
...
...
@@ -1073,15 +1073,6 @@ type NodeStatus struct {
NodeInfo
NodeSystemInfo
`json:"nodeInfo,omitempty"`
}
// NodeInfo is the information collected on the node.
type
NodeInfo
struct
{
TypeMeta
`json:",inline"`
// Capacity represents the available resources of a node
Capacity
ResourceList
`json:"capacity,omitempty"`
// NodeSystemInfo is a set of ids/uuids to uniquely identify the node
NodeSystemInfo
`json:",inline,omitempty"`
}
type
NodePhase
string
// These are the valid phases of node.
...
...
pkg/client/kubelet.go
View file @
868e05ce
...
...
@@ -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"
)
}
...
...
pkg/cloudprovider/controller/nodecontroller_test.go
View file @
868e05ce
...
...
@@ -146,10 +146,6 @@ func (c *FakeKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.
return
api
.
PodStatusResult
{},
errors
.
New
(
"Not Implemented"
)
}
func
(
c
*
FakeKubeletClient
)
GetNodeInfo
(
host
string
)
(
api
.
NodeInfo
,
error
)
{
return
api
.
NodeInfo
{},
errors
.
New
(
"Not Implemented"
)
}
func
(
c
*
FakeKubeletClient
)
GetConnectionInfo
(
host
string
)
(
string
,
uint
,
http
.
RoundTripper
,
error
)
{
return
""
,
0
,
nil
,
errors
.
New
(
"Not Implemented"
)
}
...
...
pkg/kubelet/server.go
View file @
868e05ce
...
...
@@ -136,7 +136,6 @@ func (s *Server) InstallDefaultHandlers() {
)
s
.
mux
.
HandleFunc
(
"/podInfo"
,
s
.
handlePodInfoOld
)
s
.
mux
.
HandleFunc
(
"/api/v1beta1/podInfo"
,
s
.
handlePodInfoVersioned
)
s
.
mux
.
HandleFunc
(
"/api/v1beta1/nodeInfo"
,
s
.
handleNodeInfoVersioned
)
s
.
mux
.
HandleFunc
(
"/pods"
,
s
.
handlePods
)
s
.
mux
.
HandleFunc
(
"/stats/"
,
s
.
handleStats
)
s
.
mux
.
HandleFunc
(
"/spec/"
,
s
.
handleSpec
)
...
...
@@ -346,31 +345,6 @@ func (s *Server) handleLogs(w http.ResponseWriter, req *http.Request) {
s
.
host
.
ServeLogs
(
w
,
req
)
}
// handleNodeInfoVersioned handles node info requests against the Kubelet.
func
(
s
*
Server
)
handleNodeInfoVersioned
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
info
,
err
:=
s
.
host
.
GetCachedMachineInfo
()
if
err
!=
nil
{
s
.
error
(
w
,
err
)
return
}
capacity
:=
CapacityFromMachineInfo
(
info
)
data
,
err
:=
json
.
Marshal
(
api
.
NodeInfo
{
Capacity
:
capacity
,
NodeSystemInfo
:
api
.
NodeSystemInfo
{
MachineID
:
info
.
MachineID
,
SystemUUID
:
info
.
SystemUUID
,
BootID
:
info
.
BootID
,
},
})
if
err
!=
nil
{
s
.
error
(
w
,
err
)
return
}
w
.
Header
()
.
Add
(
"Content-type"
,
"application/json"
)
w
.
Write
(
data
)
}
// handleSpec handles spec requests against the Kubelet.
func
(
s
*
Server
)
handleSpec
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
info
,
err
:=
s
.
host
.
GetCachedMachineInfo
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment