Skip to content

Commit

Permalink
Merge pull request #115023 from mimowo/automated-cherry-pick-of-#1149…
Browse files Browse the repository at this point in the history
…23-upstream-release-1.25

Automated cherry pick of #114923: Do not leak cross namespace pod metadata in preemption events
  • Loading branch information
k8s-ci-robot committed Jan 13, 2023
2 parents e6fa39b + 99763f9 commit f98452d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/scheduler/framework/preemption/preemption.go
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,7 @@ func (ev *Evaluator) prepareCandidate(ctx context.Context, c Candidate, pod *v1.
return framework.AsStatus(err)
}
}
fh.EventRecorder().Eventf(victim, pod, v1.EventTypeNormal, "Preempted", "Preempting", "Preempted by %v/%v on node %v",
pod.Namespace, pod.Name, c.Name())
fh.EventRecorder().Eventf(victim, pod, v1.EventTypeNormal, "Preempted", "Preempting", "Preempted by a pod on node %v", c.Name())
}
metrics.PreemptionVictims.Observe(float64(len(c.Victims().Pods)))

Expand Down

0 comments on commit f98452d

Please sign in to comment.