Skip to content

Commit

Permalink
koord-runtime-proxy: regard empty string for CpusetCpus and CpusetMem… (
Browse files Browse the repository at this point in the history
#487)

Signed-off-by: honpey <[email protected]>
Co-authored-by: honpey <[email protected]>
  • Loading branch information
zwzhang0107 and honpey committed Aug 15, 2022
1 parent 492a861 commit 535bc21
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/runtimeproxy/resexecutor/cri/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,10 @@ func updateResource(a, b *v1alpha1.LinuxContainerResources) *v1alpha1.LinuxConta
if b.OomScoreAdj >= -1000 && b.OomScoreAdj <= 1000 {
a.OomScoreAdj = b.OomScoreAdj
}
if b.CpusetCpus != "" {
a.CpusetCpus = b.CpusetCpus
}
if b.CpusetMems != "" {
a.CpusetMems = b.CpusetMems
}

a.CpusetCpus = b.CpusetCpus
a.CpusetMems = b.CpusetMems

a.Unified = utils.MergeMap(a.Unified, b.Unified)
if b.MemorySwapLimitInBytes > 0 {
a.MemorySwapLimitInBytes = b.MemorySwapLimitInBytes
Expand Down

0 comments on commit 535bc21

Please sign in to comment.