fix: add pod info to the error log

Signed-off-by: HaoJie Liu <liuhaojie@beyondcent.com>
This commit is contained in:
HaoJie Liu 2022-07-19 14:17:33 +08:00
parent 122254fc01
commit b058565f65
No known key found for this signature in database
GPG Key ID: 6CDCB10FAC001536

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 {