Add EventSource to api to have both Component and Host information.

This commit is contained in:
Dawn Chen
2015-01-06 13:22:58 -08:00
parent 2b91c1417c
commit e3c019128e
15 changed files with 60 additions and 29 deletions

View File

@@ -22,6 +22,7 @@ import (
"net/http"
"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/healthz"
@@ -57,7 +58,7 @@ func main() {
glog.Fatalf("Invalid API configuration: %v", err)
}
record.StartRecording(kubeClient.Events(""), "scheduler")
record.StartRecording(kubeClient.Events(""), api.EventSource{Component: "scheduler"})
go http.ListenAndServe(net.JoinHostPort(address.String(), strconv.Itoa(*port)), nil)