Skip to content

Commit e443f21

Browse files
committed
koord-runtime-proxy: regard empty string for CpusetCpus and CpusetMems as valid
Signed-off-by: honpey <honpey@gmail.com>
1 parent ddffb65 commit e443f21

File tree

1 file changed

+4
-6
lines changed
  • pkg/runtimeproxy/resexecutor/cri

1 file changed

+4
-6
lines changed

pkg/runtimeproxy/resexecutor/cri/utils.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,10 @@ func updateResource(a, b *v1alpha1.LinuxContainerResources) *v1alpha1.LinuxConta
8686
if b.OomScoreAdj >= -1000 && b.OomScoreAdj <= 1000 {
8787
a.OomScoreAdj = b.OomScoreAdj
8888
}
89-
if b.CpusetCpus != "" {
90-
a.CpusetCpus = b.CpusetCpus
91-
}
92-
if b.CpusetMems != "" {
93-
a.CpusetMems = b.CpusetMems
94-
}
89+
90+
a.CpusetCpus = b.CpusetCpus
91+
a.CpusetMems = b.CpusetMems
92+
9593
a.Unified = utils.MergeMap(a.Unified, b.Unified)
9694
if b.MemorySwapLimitInBytes > 0 {
9795
a.MemorySwapLimitInBytes = b.MemorySwapLimitInBytes

0 commit comments

Comments
 (0)