cleanup usage of NewPodNominator

- replace NewPodNominator() with NewSafePodNominator()
- rename nominatedPodMap to nominator
This commit is contained in:
Wei Huang
2021-06-05 11:30:17 -07:00
parent 53873fbf23
commit 36eaa11d50
9 changed files with 91 additions and 71 deletions

View File

@@ -585,7 +585,7 @@ type PostFilterResult struct {
// PodNominator abstracts operations to maintain nominated Pods.
type PodNominator interface {
// AddNominatedPod adds the given pod to the nominated pod map or
// AddNominatedPod adds the given pod to the nominator or
// updates it if it already exists.
AddNominatedPod(pod *PodInfo, nodeName string)
// DeleteNominatedPodIfExists deletes nominatedPod from internal cache. It's a no-op if it doesn't exist.