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

@@ -20,9 +20,6 @@ import (
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/resource"
"github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
"github.com/golang/glog"
cadvisorApi "github.com/google/cadvisor/info/v1"
)
@@ -34,17 +31,6 @@ func SetupCapabilities(allowPrivileged bool, hostNetworkSources []string) {
})
}
// TODO: Split this up?
func SetupLogging() {
// Log the events locally too.
record.StartLogging(glog.Infof)
}
func SetupEventSending(client *client.Client, hostname string) {
glog.Infof("Sending events to api server.")
record.StartRecording(client.Events(""))
}
func CapacityFromMachineInfo(info *cadvisorApi.MachineInfo) api.ResourceList {
c := api.ResourceList{
api.ResourceCPU: *resource.NewMilliQuantity(