[Backport release-1.2] fix(platform): propagate resource allocation ratios to packages (#2301)

# Description
Backport of #2296 to `release-1.2`.
This commit is contained in:
Andrei Kvapil 2026-03-30 20:16:15 +02:00 committed by GitHub
commit 02e200372b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -36,6 +36,9 @@ stringData:
branding:
{{- . | toYaml | nindent 8 }}
{{- end }}
cpu-allocation-ratio: {{ .Values.resources.cpuAllocationRatio | quote }}
memory-allocation-ratio: {{ .Values.resources.memoryAllocationRatio | quote }}
ephemeral-storage-allocation-ratio: {{ .Values.resources.ephemeralStorageAllocationRatio | quote }}
{{- with .Values.scheduling }}
scheduling:
{{- . | toYaml | nindent 8 }}

View file

@ -2,7 +2,11 @@
{{- fail "bundles.iaas.enabled can only be true when bundles.system.variant is 'isp-full' or 'isp-full-generic'" }}
{{- end }}
{{- if and .Values.bundles.iaas.enabled (or (eq .Values.bundles.system.variant "isp-full") (eq .Values.bundles.system.variant "isp-full-generic")) }}
{{include "cozystack.platform.package.default" (list "cozystack.kubevirt" $) }}
{{- $kubevirtComponents := dict -}}
{{- if .Values.resources.cpuAllocationRatio -}}
{{- $_ := set $kubevirtComponents "kubevirt" (dict "values" (dict "cpuAllocationRatio" (.Values.resources.cpuAllocationRatio | int))) -}}
{{- end -}}
{{include "cozystack.platform.package" (list "cozystack.kubevirt" "default" $ $kubevirtComponents) }}
{{include "cozystack.platform.package.default" (list "cozystack.kubevirt-cdi" $) }}
{{include "cozystack.platform.package.optional.default" (list "cozystack.gpu-operator" $) }}
{{include "cozystack.platform.package.default" (list "cozystack.kamaji" $) }}