cozystack/packages/core/platform/templates
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
..
bundles fix(platform): propagate resource allocation ratios to packages 2026-03-30 09:50:08 +05:00
_helpers.tpl [platform] Added resource-policy to keep installed packages 2026-03-26 19:06:04 +05:00
apps.yaml fix(platform): propagate resource allocation ratios to packages 2026-03-30 09:50:08 +05:00
containerd-registry-secret.yaml refactor(platform): restructure bundles and add PackageSources 2026-01-15 14:15:00 +01:00
cozystack-version.yaml [platform] Prevent version cm from deletion 2026-02-26 23:11:36 +05:00
migration-hook.yaml refactor(platform): restructure bundles and add PackageSources 2026-01-15 14:15:00 +01:00
repository.yaml refactor(platform): restructure bundles and add PackageSources 2026-01-15 14:15:00 +01:00
scheduling.yaml refactor(platform): restructure bundles and add PackageSources 2026-01-15 14:15:00 +01:00
sources.yaml refactor(platform): restructure bundles and add PackageSources 2026-01-15 14:15:00 +01:00