mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Internal weight field for affinity must be int32
This commit is contained in:
parent
65042efb0f
commit
07bd50be0d
@ -1605,7 +1605,7 @@ type PodAntiAffinity struct {
|
||||
type WeightedPodAffinityTerm struct {
|
||||
// weight associated with matching the corresponding podAffinityTerm,
|
||||
// in the range 1-100.
|
||||
Weight int `json:"weight"`
|
||||
Weight int32 `json:"weight"`
|
||||
// Required. A pod affinity term, associated with the corresponding weight.
|
||||
PodAffinityTerm PodAffinityTerm `json:"podAffinityTerm"`
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ func (p *podAffinityPriorityMap) processTerm(term *api.PodAffinityTerm, podDefin
|
||||
func (p *podAffinityPriorityMap) processTerms(terms []api.WeightedPodAffinityTerm, podDefiningAffinityTerm, podToCheck *api.Pod, fixedNode *api.Node, multiplier int) {
|
||||
for i := range terms {
|
||||
term := &terms[i]
|
||||
p.processTerm(&term.PodAffinityTerm, podDefiningAffinityTerm, podToCheck, fixedNode, float64(term.Weight*multiplier))
|
||||
p.processTerm(&term.PodAffinityTerm, podDefiningAffinityTerm, podToCheck, fixedNode, float64(term.Weight*int32(multiplier)))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user