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
c1943739
Commit
c1943739
authored
Apr 10, 2015
by
Dawn Chen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6702 from ddysher/remove-nodeinfo
Remove nodeinfo endpoint from kubelet
parents
cf357dfa
868e05ce
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 @
c1943739
...
@@ -103,10 +103,6 @@ func (fakeKubeletClient) GetPodStatus(host, podNamespace, podName string) (api.P
...
@@ -103,10 +103,6 @@ func (fakeKubeletClient) GetPodStatus(host, podNamespace, podName string) (api.P
return
r
,
nil
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
)
{
func
(
fakeKubeletClient
)
GetConnectionInfo
(
host
string
)
(
string
,
uint
,
http
.
RoundTripper
,
error
)
{
return
""
,
0
,
nil
,
errors
.
New
(
"Not Implemented"
)
return
""
,
0
,
nil
,
errors
.
New
(
"Not Implemented"
)
}
}
...
...
pkg/api/register.go
View file @
c1943739
...
@@ -34,7 +34,6 @@ func init() {
...
@@ -34,7 +34,6 @@ func init() {
&
Service
{},
&
Service
{},
&
NodeList
{},
&
NodeList
{},
&
Node
{},
&
Node
{},
&
NodeInfo
{},
&
Status
{},
&
Status
{},
&
Endpoints
{},
&
Endpoints
{},
&
EndpointsList
{},
&
EndpointsList
{},
...
@@ -75,7 +74,6 @@ func (*ServiceList) IsAnAPIObject() {}
...
@@ -75,7 +74,6 @@ func (*ServiceList) IsAnAPIObject() {}
func
(
*
Endpoints
)
IsAnAPIObject
()
{}
func
(
*
Endpoints
)
IsAnAPIObject
()
{}
func
(
*
EndpointsList
)
IsAnAPIObject
()
{}
func
(
*
EndpointsList
)
IsAnAPIObject
()
{}
func
(
*
Node
)
IsAnAPIObject
()
{}
func
(
*
Node
)
IsAnAPIObject
()
{}
func
(
*
NodeInfo
)
IsAnAPIObject
()
{}
func
(
*
NodeList
)
IsAnAPIObject
()
{}
func
(
*
NodeList
)
IsAnAPIObject
()
{}
func
(
*
Binding
)
IsAnAPIObject
()
{}
func
(
*
Binding
)
IsAnAPIObject
()
{}
func
(
*
Status
)
IsAnAPIObject
()
{}
func
(
*
Status
)
IsAnAPIObject
()
{}
...
...
pkg/api/types.go
View file @
c1943739
...
@@ -1107,15 +1107,6 @@ type NodeStatus struct {
...
@@ -1107,15 +1107,6 @@ type NodeStatus struct {
NodeInfo
NodeSystemInfo
`json:"nodeInfo,omitempty"`
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
type
NodePhase
string
// These are the valid phases of node.
// These are the valid phases of node.
...
...
pkg/api/v1beta3/register.go
View file @
c1943739
...
@@ -38,7 +38,6 @@ func init() {
...
@@ -38,7 +38,6 @@ func init() {
&
Endpoints
{},
&
Endpoints
{},
&
EndpointsList
{},
&
EndpointsList
{},
&
Node
{},
&
Node
{},
&
NodeInfo
{},
&
NodeList
{},
&
NodeList
{},
&
Binding
{},
&
Binding
{},
&
Status
{},
&
Status
{},
...
@@ -78,7 +77,6 @@ func (*ServiceList) IsAnAPIObject() {}
...
@@ -78,7 +77,6 @@ func (*ServiceList) IsAnAPIObject() {}
func
(
*
Endpoints
)
IsAnAPIObject
()
{}
func
(
*
Endpoints
)
IsAnAPIObject
()
{}
func
(
*
EndpointsList
)
IsAnAPIObject
()
{}
func
(
*
EndpointsList
)
IsAnAPIObject
()
{}
func
(
*
Node
)
IsAnAPIObject
()
{}
func
(
*
Node
)
IsAnAPIObject
()
{}
func
(
*
NodeInfo
)
IsAnAPIObject
()
{}
func
(
*
NodeList
)
IsAnAPIObject
()
{}
func
(
*
NodeList
)
IsAnAPIObject
()
{}
func
(
*
Binding
)
IsAnAPIObject
()
{}
func
(
*
Binding
)
IsAnAPIObject
()
{}
func
(
*
Status
)
IsAnAPIObject
()
{}
func
(
*
Status
)
IsAnAPIObject
()
{}
...
...
pkg/api/v1beta3/types.go
View file @
c1943739
...
@@ -1104,15 +1104,6 @@ type NodeStatus struct {
...
@@ -1104,15 +1104,6 @@ type NodeStatus struct {
NodeInfo
NodeSystemInfo
`json:"nodeInfo,omitempty"`
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
type
NodePhase
string
// These are the valid phases of node.
// These are the valid phases of node.
...
...
pkg/client/kubelet.go
View file @
c1943739
...
@@ -39,7 +39,6 @@ var ErrPodInfoNotAvailable = errors.New("no pod info available")
...
@@ -39,7 +39,6 @@ var ErrPodInfoNotAvailable = errors.New("no pod info available")
type
KubeletClient
interface
{
type
KubeletClient
interface
{
KubeletHealthChecker
KubeletHealthChecker
PodInfoGetter
PodInfoGetter
NodeInfoGetter
ConnectionInfoGetter
ConnectionInfoGetter
}
}
...
@@ -56,10 +55,6 @@ type PodInfoGetter interface {
...
@@ -56,10 +55,6 @@ type PodInfoGetter interface {
GetPodStatus
(
host
,
podNamespace
,
podID
string
)
(
api
.
PodStatusResult
,
error
)
GetPodStatus
(
host
,
podNamespace
,
podID
string
)
(
api
.
PodStatusResult
,
error
)
}
}
type
NodeInfoGetter
interface
{
GetNodeInfo
(
host
string
)
(
api
.
NodeInfo
,
error
)
}
type
ConnectionInfoGetter
interface
{
type
ConnectionInfoGetter
interface
{
GetConnectionInfo
(
host
string
)
(
scheme
string
,
port
uint
,
transport
http
.
RoundTripper
,
error
error
)
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.
...
@@ -136,13 +131,6 @@ func (c *HTTPKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.
return
status
,
err
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.
// getEntity might return a nil response.
func
(
c
*
HTTPKubeletClient
)
getEntity
(
host
,
path
,
query
string
,
entity
runtime
.
Object
)
(
*
http
.
Response
,
error
)
{
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
)
request
,
err
:=
http
.
NewRequest
(
"GET"
,
c
.
url
(
host
,
path
,
query
),
nil
)
...
@@ -179,11 +167,6 @@ func (c FakeKubeletClient) GetPodStatus(host, podNamespace string, podID string)
...
@@ -179,11 +167,6 @@ func (c FakeKubeletClient) GetPodStatus(host, podNamespace string, podID string)
return
api
.
PodStatusResult
{},
errors
.
New
(
"Not Implemented"
)
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
)
{
func
(
c
FakeKubeletClient
)
HealthCheck
(
host
string
)
(
probe
.
Result
,
error
)
{
return
probe
.
Unknown
,
errors
.
New
(
"Not Implemented"
)
return
probe
.
Unknown
,
errors
.
New
(
"Not Implemented"
)
}
}
...
...
pkg/cloudprovider/controller/nodecontroller_test.go
View file @
c1943739
...
@@ -146,10 +146,6 @@ func (c *FakeKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.
...
@@ -146,10 +146,6 @@ func (c *FakeKubeletClient) GetPodStatus(host, podNamespace, podID string) (api.
return
api
.
PodStatusResult
{},
errors
.
New
(
"Not Implemented"
)
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
)
{
func
(
c
*
FakeKubeletClient
)
GetConnectionInfo
(
host
string
)
(
string
,
uint
,
http
.
RoundTripper
,
error
)
{
return
""
,
0
,
nil
,
errors
.
New
(
"Not Implemented"
)
return
""
,
0
,
nil
,
errors
.
New
(
"Not Implemented"
)
}
}
...
...
pkg/kubelet/server.go
View file @
c1943739
...
@@ -136,7 +136,6 @@ func (s *Server) InstallDefaultHandlers() {
...
@@ -136,7 +136,6 @@ func (s *Server) InstallDefaultHandlers() {
)
)
s
.
mux
.
HandleFunc
(
"/podInfo"
,
s
.
handlePodInfoOld
)
s
.
mux
.
HandleFunc
(
"/podInfo"
,
s
.
handlePodInfoOld
)
s
.
mux
.
HandleFunc
(
"/api/v1beta1/podInfo"
,
s
.
handlePodInfoVersioned
)
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
(
"/pods"
,
s
.
handlePods
)
s
.
mux
.
HandleFunc
(
"/stats/"
,
s
.
handleStats
)
s
.
mux
.
HandleFunc
(
"/stats/"
,
s
.
handleStats
)
s
.
mux
.
HandleFunc
(
"/spec/"
,
s
.
handleSpec
)
s
.
mux
.
HandleFunc
(
"/spec/"
,
s
.
handleSpec
)
...
@@ -346,31 +345,6 @@ func (s *Server) handleLogs(w http.ResponseWriter, req *http.Request) {
...
@@ -346,31 +345,6 @@ func (s *Server) handleLogs(w http.ResponseWriter, req *http.Request) {
s
.
host
.
ServeLogs
(
w
,
req
)
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.
// handleSpec handles spec requests against the Kubelet.
func
(
s
*
Server
)
handleSpec
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
func
(
s
*
Server
)
handleSpec
(
w
http
.
ResponseWriter
,
req
*
http
.
Request
)
{
info
,
err
:=
s
.
host
.
GetCachedMachineInfo
()
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