mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-15 06:43:54 +00:00
adjust container event message
This commit is contained in:
parent
02f8e4277f
commit
55bf786216
@ -770,7 +770,7 @@ func (dm *DockerManager) runContainer(
|
||||
return kubecontainer.ContainerID{}, err
|
||||
}
|
||||
|
||||
dm.recorder.Eventf(ref, "Created", "Created with docker id %v", util.ShortenString(dockerContainer.ID, 12))
|
||||
dm.recorder.Eventf(ref, "Created", "Created container with docker id %v", util.ShortenString(dockerContainer.ID, 12))
|
||||
|
||||
podHasSELinuxLabel := pod.Spec.SecurityContext != nil && pod.Spec.SecurityContext.SELinuxOptions != nil
|
||||
binds := makeMountBindings(opts.Mounts, podHasSELinuxLabel)
|
||||
@ -827,10 +827,11 @@ func (dm *DockerManager) runContainer(
|
||||
|
||||
if err = dm.client.StartContainer(dockerContainer.ID, hc); err != nil {
|
||||
dm.recorder.Eventf(ref, "Failed",
|
||||
"Failed to start with docker id %v with error: %v", util.ShortenString(dockerContainer.ID, 12), err)
|
||||
"Failed to start container with docker id %v with error: %v", util.ShortenString(dockerContainer.ID, 12), err)
|
||||
return kubecontainer.ContainerID{}, err
|
||||
}
|
||||
dm.recorder.Eventf(ref, "Started", "Started with docker id %v", util.ShortenString(dockerContainer.ID, 12))
|
||||
dm.recorder.Eventf(ref, "Started", "Started container with docker id %v", util.ShortenString(dockerContainer.ID, 12))
|
||||
|
||||
return kubetypes.DockerID(dockerContainer.ID).ContainerID(), nil
|
||||
}
|
||||
|
||||
@ -1441,7 +1442,7 @@ func (dm *DockerManager) killContainer(containerID kubecontainer.ContainerID, co
|
||||
if !ok {
|
||||
glog.Warningf("No ref for pod '%q'", name)
|
||||
} else {
|
||||
message := fmt.Sprintf("Killing with docker id %v", util.ShortenString(ID, 12))
|
||||
message := fmt.Sprintf("Killing container with docker id %v", util.ShortenString(ID, 12))
|
||||
if reason != "" {
|
||||
message = fmt.Sprint(message, ": ", reason)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user