Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
07bd50be
Unverified
Commit
07bd50be
authored
Oct 14, 2016
by
Clayton Coleman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Internal weight field for affinity must be int32
parent
65042efb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
types.go
pkg/api/types.go
+1
-1
interpod_affinity.go
...n/pkg/scheduler/algorithm/priorities/interpod_affinity.go
+1
-1
No files found.
pkg/api/types.go
View file @
07bd50be
...
@@ -1605,7 +1605,7 @@ type PodAntiAffinity struct {
...
@@ -1605,7 +1605,7 @@ type PodAntiAffinity struct {
type
WeightedPodAffinityTerm
struct
{
type
WeightedPodAffinityTerm
struct
{
// weight associated with matching the corresponding podAffinityTerm,
// weight associated with matching the corresponding podAffinityTerm,
// in the range 1-100.
// in the range 1-100.
Weight
int
`json:"weight"`
Weight
int
32
`json:"weight"`
// Required. A pod affinity term, associated with the corresponding weight.
// Required. A pod affinity term, associated with the corresponding weight.
PodAffinityTerm
PodAffinityTerm
`json:"podAffinityTerm"`
PodAffinityTerm
PodAffinityTerm
`json:"podAffinityTerm"`
}
}
...
...
plugin/pkg/scheduler/algorithm/priorities/interpod_affinity.go
View file @
07bd50be
...
@@ -105,7 +105,7 @@ func (p *podAffinityPriorityMap) processTerm(term *api.PodAffinityTerm, podDefin
...
@@ -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
)
{
func
(
p
*
podAffinityPriorityMap
)
processTerms
(
terms
[]
api
.
WeightedPodAffinityTerm
,
podDefiningAffinityTerm
,
podToCheck
*
api
.
Pod
,
fixedNode
*
api
.
Node
,
multiplier
int
)
{
for
i
:=
range
terms
{
for
i
:=
range
terms
{
term
:=
&
terms
[
i
]
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
)
))
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment