mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 18:54:06 +00:00
Add an event for health check failures.
This commit is contained in:
parent
4d141025da
commit
c03a435501
@ -1077,6 +1077,12 @@ func (kl *Kubelet) syncPod(pod *api.BoundPod, dockerContainers dockertools.Docke
|
|||||||
containersToKeep[containerID] = empty{}
|
containersToKeep[containerID] = empty{}
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
ref, ok := kl.getRef(containerID)
|
||||||
|
if !ok {
|
||||||
|
glog.Warningf("No ref for pod '%v' - '%v'", ID, name)
|
||||||
|
} else {
|
||||||
|
record.Eventf(ref, "unhealthy", "Health Check Failed %v - %v", ID, name)
|
||||||
|
}
|
||||||
glog.V(1).Infof("pod %q container %q is unhealthy. Container will be killed and re-created.", podFullName, container.Name, live)
|
glog.V(1).Infof("pod %q container %q is unhealthy. Container will be killed and re-created.", podFullName, container.Name, live)
|
||||||
} else {
|
} else {
|
||||||
glog.V(1).Infof("pod %q container %q hash changed (%d vs %d). Container will be killed and re-created.", podFullName, container.Name, hash, expectedHash)
|
glog.V(1).Infof("pod %q container %q hash changed (%d vs %d). Container will be killed and re-created.", podFullName, container.Name, hash, expectedHash)
|
||||||
|
Loading…
Reference in New Issue
Block a user