This commit adds type information to events.
This addresses issue #15624.
This commit is contained in:
@@ -308,11 +308,11 @@ func (r RealPodControl) createPods(nodeName, namespace string, template *api.Pod
|
||||
return fmt.Errorf("unable to create pods, no labels")
|
||||
}
|
||||
if newPod, err := r.KubeClient.Pods(namespace).Create(pod); err != nil {
|
||||
r.Recorder.Eventf(object, "FailedCreate", "Error creating: %v", err)
|
||||
r.Recorder.Eventf(object, api.EventTypeWarning, "FailedCreate", "Error creating: %v", err)
|
||||
return fmt.Errorf("unable to create pods: %v", err)
|
||||
} else {
|
||||
glog.V(4).Infof("Controller %v created pod %v", meta.Name, newPod.Name)
|
||||
r.Recorder.Eventf(object, "SuccessfulCreate", "Created pod: %v", newPod.Name)
|
||||
r.Recorder.Eventf(object, api.EventTypeNormal, "SuccessfulCreate", "Created pod: %v", newPod.Name)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user