add event broadcaster logging for all contoller managers

This commit is contained in:
hzxuzhonghu
2017-08-26 17:34:38 +08:00
parent ea07264251
commit 96b48d4386
4 changed files with 5 additions and 1 deletions

View File

@@ -112,6 +112,7 @@ func New(
clusterName string,
) (*ServiceController, error) {
broadcaster := record.NewBroadcaster()
broadcaster.StartLogging(glog.Infof)
broadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: v1core.New(kubeClient.Core().RESTClient()).Events("")})
recorder := broadcaster.NewRecorder(scheme.Scheme, v1.EventSource{Component: "service-controller"})
broadcaster.StartLogging(glog.Infof)