Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kubelet doesn't fight apiserver for cputime on the master. #10471

Merged
merged 1 commit into from
Jun 29, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions pkg/kubelet/status_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ func isStatusEqual(oldStatus, status *api.PodStatus) bool {
}

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.
glog.Info("Starting to sync pod status with apiserver")
go util.Forever(func() {
Expand Down Expand Up @@ -142,10 +149,6 @@ func (s *statusManager) RemoveOrphanedStatuses(podFullNames map[string]bool) {

// syncBatch syncs pods statuses with the apiserver.
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
pod := syncRequest.pod
podFullName := kubecontainer.GetPodFullName(pod)
Expand Down