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
143bfeb4
Commit
143bfeb4
authored
Jun 29, 2015
by
Alex Robinson
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10471 from bprashanth/master_list
Kubelet doesn't fight apiserver for cputime on the master.
parents
70644b68
029e0ad3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
status_manager.go
pkg/kubelet/status_manager.go
+7
-4
No files found.
pkg/kubelet/status_manager.go
View file @
143bfeb4
...
@@ -64,6 +64,13 @@ func isStatusEqual(oldStatus, status *api.PodStatus) bool {
...
@@ -64,6 +64,13 @@ func isStatusEqual(oldStatus, status *api.PodStatus) bool {
}
}
func
(
s
*
statusManager
)
Start
()
{
func
(
s
*
statusManager
)
Start
()
{
// Don't start the status manager if we don't have a client. This will happen
// on the master, where the kubelet is responsible for bootstrapping the pods
// of the master components.
if
s
.
kubeClient
==
nil
{
glog
.
Infof
(
"Kubernetes client is nil, not starting status manager."
)
return
}
// syncBatch blocks when no updates are available, we can run it in a tight loop.
// syncBatch blocks when no updates are available, we can run it in a tight loop.
glog
.
Info
(
"Starting to sync pod status with apiserver"
)
glog
.
Info
(
"Starting to sync pod status with apiserver"
)
go
util
.
Forever
(
func
()
{
go
util
.
Forever
(
func
()
{
...
@@ -142,10 +149,6 @@ func (s *statusManager) RemoveOrphanedStatuses(podFullNames map[string]bool) {
...
@@ -142,10 +149,6 @@ func (s *statusManager) RemoveOrphanedStatuses(podFullNames map[string]bool) {
// syncBatch syncs pods statuses with the apiserver.
// syncBatch syncs pods statuses with the apiserver.
func
(
s
*
statusManager
)
syncBatch
()
error
{
func
(
s
*
statusManager
)
syncBatch
()
error
{
if
s
.
kubeClient
==
nil
{
glog
.
V
(
4
)
.
Infof
(
"Kubernetes client is nil, skipping pod status updates"
)
return
nil
}
syncRequest
:=
<-
s
.
podStatusChannel
syncRequest
:=
<-
s
.
podStatusChannel
pod
:=
syncRequest
.
pod
pod
:=
syncRequest
.
pod
podFullName
:=
kubecontainer
.
GetPodFullName
(
pod
)
podFullName
:=
kubecontainer
.
GetPodFullName
(
pod
)
...
...
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