use the core client with version

This commit is contained in:
supereagle
2017-07-25 12:35:12 +08:00
parent 744455c69d
commit edce96c5b6
19 changed files with 34 additions and 34 deletions

View File

@@ -52,7 +52,7 @@ import (
func createRecorder(kubecli *clientset.Clientset, s *options.SchedulerServer) record.EventRecorder {
eventBroadcaster := record.NewBroadcaster()
eventBroadcaster.StartLogging(glog.Infof)
eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: v1core.New(kubecli.Core().RESTClient()).Events("")})
eventBroadcaster.StartRecordingToSink(&v1core.EventSinkImpl{Interface: v1core.New(kubecli.CoreV1().RESTClient()).Events("")})
return eventBroadcaster.NewRecorder(api.Scheme, v1.EventSource{Component: s.SchedulerName})
}

View File

@@ -121,7 +121,7 @@ func Run(s *options.SchedulerServer) error {
rl, err := resourcelock.New(s.LeaderElection.ResourceLock,
s.LockObjectNamespace,
s.LockObjectName,
kubecli.Core(),
kubecli.CoreV1(),
resourcelock.ResourceLockConfig{
Identity: id,
EventRecorder: recorder,