Skip to content

Commit

Permalink
fix(scheduler): unable to get current replicas from federatedObject c…
Browse files Browse the repository at this point in the history
…orrectly
  • Loading branch information
qclc committed Aug 16, 2023
1 parent b571bc0 commit e1b93f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/controllers/scheduler/schedulingunit.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ func getCurrentReplicasFromObject(
}

for _, patch := range override.Patches {
if patch.Op == replicasPath && (patch.Op == overridePatchOpReplace || patch.Op == "") {
var replicas *int64
if patch.Path == replicasPath && (patch.Op == overridePatchOpReplace || patch.Op == "") {
replicas := new(int64)
if err := json.Unmarshal(patch.Value.Raw, replicas); err != nil {
continue
}
Expand Down

0 comments on commit e1b93f2

Please sign in to comment.