Make kubevirt's CPU allocation ratio configurable

Kubevirt's default cpu-to-vcpu ration is 1:10, which might be a bit
extreme for some users. This patch introduces a new key in the Cozystack
configmap, "cpu-allocation-ratio" where admins of Cozystack can specify
an alternative value, if needed.

Signed-off-by: Timofei Larkin <lllamnyp@gmail.com>
This commit is contained in:
Timofei Larkin
2025-04-29 16:13:15 +03:00
parent 108fc647ea
commit 6106a9fe51
2 changed files with 8 additions and 0 deletions

View File

@@ -134,6 +134,11 @@ releases:
namespace: cozy-kubevirt
privileged: true
dependsOn: [cilium,kubeovn,kubevirt-operator]
{{- $cpuAllocationRatio := index $cozyConfig.data "cpu-allocation-ratio" }}
{{- if $cpuAllocationRatio }}
values:
cpuAllocationRatio: {{ $cpuAllocationRatio }}
{{- end }}
- name: kubevirt-instancetypes
releaseName: kubevirt-instancetypes

View File

@@ -10,6 +10,9 @@ spec:
commonInstancetypesDeployment:
enabled: false
developerConfiguration:
{{- if .Values.cpuAllocationRatio }}
cpuAllocationRatio: {{ .Values.cpuAllocationRatio }}
{{- end }}
featureGates:
- HotplugVolumes
- ExpandDisks