chore: add pod UID in event log

This change includes preemptor pod UID in event log to allow
for easier debugging.

Signed-off-by: kwakubiney <kebiney@hotmail.com>
This commit is contained in:
kwakubiney 2023-08-16 10:57:18 +00:00
parent 6e0cb243d5
commit 5752cbd8c7

View File

@ -385,7 +385,7 @@ func (ev *Evaluator) prepareCandidate(ctx context.Context, c Candidate, pod *v1.
klog.V(2).InfoS("Preemptor Pod preempted victim Pod", "preemptor", klog.KObj(pod), "victim", klog.KObj(victim), "node", c.Name())
}
fh.EventRecorder().Eventf(victim, pod, v1.EventTypeNormal, "Preempted", "Preempting", "Preempted by a pod on node %v", c.Name())
fh.EventRecorder().Eventf(victim, pod, v1.EventTypeNormal, "Preempted", "Preempting", "Preempted by pod %v on node %v", pod.UID, c.Name())
}
fh.Parallelizer().Until(ctx, len(c.Victims().Pods), preemptPod, ev.PluginName)