adamant-kite-43734
02/12/2024, 7:56 AMbored-painting-68221
02/12/2024, 3:11 PMpowerful-soccer-11224
02/13/2024, 8:05 AMspec.domain.cpu.cores
takes precedence over limits but after reading docs I found that max cpu cores which can be used is bounded by spec.domain.cpu.cores
Also I need one clarification
I tried setting a spec.domain.resources.limits[cpu] = 8
and spec.domain.resources.Request[cpu] = 4
but when the VMI object is getting created , I observe both being set to equal to limits as shown below. Is it default behavior where harvester/kubevirt set resources.requets = resources.limits or am I missing anything herebored-painting-68221
02/13/2024, 2:53 PMpowerful-soccer-11224
02/15/2024, 1:07 PMspec.domain.resources.limits[cpu] = 8
and spec.domain.resources.Request[cpu] = 4
without requests being getting overwritten by limits ?bored-painting-68221
02/15/2024, 3:05 PMpowerful-soccer-11224
02/19/2024, 1:10 PMspec.domain.resources.limits[cpu] = 8
and spec.domain.resources.Request[cpu] = 4
but when the VMI object gets created , spec.domain.resources.limits[cpu] = spec.domain.resources.Request[cpu] = 8
. But when I updated the overcommit-config setting in Harvester UI from default (100% for cpu) to (200%)
CPU : 200%
Memory: 100%
Storage: 1000%
, the VMI object got created with desired spec.domain.resources.limits[cpu] = 8
and spec.domain.resources.Request[cpu] = 4
.
Now what I want is to pass requests and limits say spec.domain.resources.limits[cpu] = 7
and spec.domain.resources.Request[cpu] = 5
in the VMI object and without overriding each other. How can this be done in harvester without updating the overcommit-config setting and on a per Virtual Machine level.
I tried https://docs.harvesterhci.io/v1.2/vm/resource-overcommit/#configure-overcommit-for-a-single-virtual-machine but the requests gets overridden by limits if cpu % is set to 100 in overcommit-config setting.
Moreover after looking into the harvester code , I found that there's a webhook (mutating webhook) which patches the incoming object (VMI) spec.domain.resources.Requests.cpu
with value equal to `spec.domain.resources.Limits.cpu`https://github.com/harvester/harvester/blob/master/pkg/webhook/resources/virtualmachine/mutator.go#L198.
Is there any way we can avoid this ?