Checklist
Describe the bug
When using instance workload, min members of pod group caculation is incorrect
|
func (rbg *RoleBasedGroup) GetGroupSize() int { |
|
ret := 0 |
|
for _, role := range rbg.Spec.Roles { |
|
if role.Workload.String() == LeaderWorkerSetWorkloadType { |
|
if role.LeaderWorkerSet == nil { |
|
ret += 1 * int(*role.Replicas) |
|
continue |
|
} |
|
ret += int(*role.LeaderWorkerSet.Size) * int(*role.Replicas) |
|
} else { |
|
ret += int(*role.Replicas) |
|
} |
|
} |
|
return ret |
Reproduction
set scheduling policy and use instance workload
Environment
latest v0.6.0
Checklist
Describe the bug
When using instance workload, min members of pod group caculation is incorrect
rbg/api/workloads/v1alpha1/helper.go
Lines 27 to 40 in b5e566c
Reproduction
set scheduling policy and use instance workload
Environment
latest v0.6.0