Keep event reason consistant in scheduler and controller

This commit is contained in:
jiangyaoguo
2015-08-12 01:05:53 +08:00
parent a6148e79c3
commit 5d3522dc7a
6 changed files with 23 additions and 22 deletions

View File

@@ -281,11 +281,11 @@ func (r RealPodControl) CreateReplica(namespace string, controller *api.Replicat
return fmt.Errorf("unable to create pod replica, no labels")
}
if newPod, err := r.KubeClient.Pods(namespace).Create(pod); err != nil {
r.Recorder.Eventf(controller, "failedCreate", "Error creating: %v", err)
r.Recorder.Eventf(controller, "FailedCreate", "Error creating: %v", err)
return fmt.Errorf("unable to create pod replica: %v", err)
} else {
glog.V(4).Infof("Controller %v created pod %v", controller.Name, newPod.Name)
r.Recorder.Eventf(controller, "successfulCreate", "Created pod: %v", newPod.Name)
r.Recorder.Eventf(controller, "SuccessfulCreate", "Created pod: %v", newPod.Name)
}
return nil
}