Skip to content

Commit

Permalink
Merge pull request #204 from qclc/fix-get-current-replicas-bug
Browse files Browse the repository at this point in the history
fix(scheduler): unable to get current replicas from federatedObject correctly
  • Loading branch information
limhawjia authored Aug 16, 2023
2 parents b571bc0 + e1b93f2 commit f601110
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 f601110

Please sign in to comment.