Merge pull request #92130 from chendave/InterPodAffinity_cleanup

cleanup: remove invalid comments in plugin of InterPodAffinity
This commit is contained in:
Kubernetes Prow Robot 2020-06-16 19:24:02 -07:00 committed by GitHub
commit 42cb4d5510
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -212,8 +212,9 @@ func getPreScoreState(cycleState *framework.CycleState) (*preScoreState, error)
}
// Score invoked at the Score extension point.
// The "score" returned in this function is the matching number of pods on the `nodeName`,
// The "score" returned in this function is the sum of weights got from cycleState which have its topologyKey matching with the node's labels.
// it is normalized later.
// Note: the returned "score" is positive for pod-affinity, and negative for pod-antiaffinity.
func (pl *InterPodAffinity) Score(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, nodeName string) (int64, *framework.Status) {
nodeInfo, err := pl.sharedLister.NodeInfos().Get(nodeName)
if err != nil || nodeInfo.Node() == nil {
@ -236,8 +237,6 @@ func (pl *InterPodAffinity) Score(ctx context.Context, cycleState *framework.Cyc
}
// NormalizeScore normalizes the score for each filteredNode.
// The basic rule is: the bigger the score(matching number of pods) is, the smaller the
// final normalized score will be.
func (pl *InterPodAffinity) NormalizeScore(ctx context.Context, cycleState *framework.CycleState, pod *v1.Pod, scores framework.NodeScoreList) *framework.Status {
s, err := getPreScoreState(cycleState)
if err != nil {