mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
fix(*):inter pod affinity default min score is zero
This commit is contained in:
parent
083290d996
commit
8eb8f8ab26
@ -19,6 +19,7 @@ package interpodaffinity
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"math"
|
||||||
"sync/atomic"
|
"sync/atomic"
|
||||||
|
|
||||||
v1 "k8s.io/api/core/v1"
|
v1 "k8s.io/api/core/v1"
|
||||||
@ -252,7 +253,8 @@ func (pl *InterPodAffinity) NormalizeScore(ctx context.Context, cycleState *fram
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var maxCount, minCount int64
|
var minCount int64 = math.MaxInt64
|
||||||
|
var maxCount int64
|
||||||
for i := range scores {
|
for i := range scores {
|
||||||
score := scores[i].Score
|
score := scores[i].Score
|
||||||
if score > maxCount {
|
if score > maxCount {
|
||||||
|
Loading…
Reference in New Issue
Block a user