Skip to content

Commit

Permalink
remove useless resource params
Browse files Browse the repository at this point in the history
  • Loading branch information
CMGS committed May 23, 2023
1 parent c8365b2 commit 420be00
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions resource/plugins/cpumem/types/workload.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,8 @@ func (w *WorkloadResourceRequest) Parse(rawParams resourcetypes.RawParams) (err

w.CPURequest = rawParams.Float64("cpu-request")
w.CPULimit = rawParams.Float64("cpu-limit")
// check if cpu shortcut is set
if cpu := rawParams.Float64("cpu"); cpu > 0 {
w.CPURequest = cpu
w.CPULimit = cpu
}

w.MemRequest = rawParams.Int64("memory-request")
w.MemLimit = rawParams.Int64("memory-limit")
// check if mem shortcut is set
if rawParams.IsSet("memory") {
var mem int64
if mem, err = coreutils.ParseRAMInHuman(rawParams.String("memory")); err != nil {
return err
}
w.MemLimit = mem
w.MemRequest = mem
}

return nil
}

0 comments on commit 420be00

Please sign in to comment.