From 420be00e94bba13d1ccdb300f79693c5890c2dba Mon Sep 17 00:00:00 2001 From: CMGS Date: Tue, 23 May 2023 17:51:19 +0800 Subject: [PATCH] remove useless resource params --- resource/plugins/cpumem/types/workload.go | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/resource/plugins/cpumem/types/workload.go b/resource/plugins/cpumem/types/workload.go index 6d7da8d2a..85685ac62 100644 --- a/resource/plugins/cpumem/types/workload.go +++ b/resource/plugins/cpumem/types/workload.go @@ -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 }