Make each new instance of kubelet generate a new event channel (instead of reusing existing).

This commit is contained in:
saadali
2015-03-16 21:03:07 -07:00
parent 10b4fe6f30
commit e0f71cb21f
13 changed files with 172 additions and 151 deletions

View File

@@ -26,6 +26,7 @@ import (
"os"
"strconv"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
"github.com/GoogleCloudPlatform/kubernetes/pkg/master/ports"
@@ -77,8 +78,6 @@ func (s *SchedulerServer) Run(_ []string) error {
glog.Fatalf("Invalid API configuration: %v", err)
}
record.StartRecording(kubeClient.Events(""))
go func() {
if s.EnableProfiling {
mux := http.NewServeMux()
@@ -95,6 +94,10 @@ func (s *SchedulerServer) Run(_ []string) error {
glog.Fatalf("Failed to create scheduler configuration: %v", err)
}
eventBroadcaster := record.NewBroadcaster()
config.Recorder = eventBroadcaster.NewRecorder(api.EventSource{Component: "scheduler"})
eventBroadcaster.StartRecordingToSink(kubeClient.Events(""))
sched := scheduler.New(config)
sched.Run()