Add EventSource to api to have both Component and Host information.
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
"path"
|
||||
"strconv"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/capabilities"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
|
||||
@@ -132,7 +133,11 @@ func SetupEventSending(authPath string, apiServerList util.StringList) {
|
||||
// Send events to APIserver if there is a client.
|
||||
hostname := util.GetHostname("")
|
||||
glog.Infof("Sending events to APIserver.")
|
||||
record.StartRecording(apiClient.Events(""), "kubelet:"+hostname)
|
||||
record.StartRecording(apiClient.Events(""),
|
||||
api.EventSource{
|
||||
Component: "kubelet",
|
||||
Host: hostname,
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user