Merge pull request #111239 from HecarimV/fix-22071914

fix: add pod info to the error log
This commit is contained in:
Kubernetes Prow Robot 2022-07-29 13:17:50 -07:00 committed by GitHub
commit 6a71632f65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,7 @@ func (hr *handlerRunner) runHTTPHandler(pod *v1.Pod, container *v1.Container, ha
if len(host) == 0 {
status, err := hr.containerManager.GetPodStatus(pod.UID, pod.Name, pod.Namespace)
if err != nil {
klog.ErrorS(err, "Unable to get pod info, event handlers may be invalid.")
klog.ErrorS(err, "Unable to get pod info, event handlers may be invalid.", "pod", klog.KObj(pod))
return "", err
}
if len(status.IPs) == 0 {