cozystack/packages/core/platform
Andrei Kvapil acd1933bae
fix(platform): propagate resource allocation ratios to packages (#2296)
## What this PR does

Fixes a regression introduced in the bundle restructure (2d022e38) where
`cpuAllocationRatio`, `memoryAllocationRatio`, and
`ephemeralStorageAllocationRatio` from `platform/values.yaml` became
no-ops — never propagated to child packages.

The old monolithic bundles read these values from the cozystack
ConfigMap via `lookup` and passed them explicitly. After migration to
the Package CRD model, the bridge was lost: cozy-lib expects the ratios
in `_cluster` config (via `cozystack-values` Secret), but platform never
wrote them there, so the hardcoded defaults (10, 1, 40) were always used
regardless of what the user configured.

This commit restores the propagation by:
- Adding `cpu-allocation-ratio`, `memory-allocation-ratio`, and
`ephemeral-storage-allocation-ratio` to the `_cluster` section in the
`cozystack-values` Secret, so cozy-lib in all managed applications picks
them up
- Passing `cpuAllocationRatio` to the kubevirt Package component values,
so the KubeVirt CR gets the configured value

### Release note

```release-note
[platform] Fix propagation of resource allocation ratios (cpu, memory, ephemeral-storage) to managed applications and KubeVirt, which were silently ignored since the bundle restructure.
```

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Added new resource allocation configuration fields to platform
templates for flexible resource management.
* Enhanced conditional handling of resource settings within container
infrastructure components.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-03-30 20:15:07 +02:00
..
images/migrations fix(vm-instance): remove fail on both networks and subnets set 2026-03-30 11:11:56 +05:00
sources [apps] Add managed OpenSearch service (#1953) 2026-03-18 11:22:00 +01:00
templates fix(platform): propagate resource allocation ratios to packages (#2296) 2026-03-30 20:15:07 +02:00
Chart.yaml Calculate tags and version automatically (#100) 2024-04-24 11:31:22 +02:00
Makefile [platform] Fix Makefile targets 2026-02-12 15:28:44 +01:00
values-isp-full-generic.yaml fix(platform): use correct package names in enabledPackages 2026-01-30 23:12:23 +03:00
values-isp-full.yaml refactor(platform): restructure bundles and add PackageSources 2026-01-15 14:15:00 +01:00
values-isp-hosted.yaml refactor(platform): restructure bundles and add PackageSources 2026-01-15 14:15:00 +01:00
values.yaml feat(platform): add migration 36 to copy subnets to networks in VMInstance 2026-03-30 10:59:03 +05:00