mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-25 14:14:14 +09:00
Kubelet on worker VMs used to join with empty kubeletExtraArgs, so allocatable memory equaled guest memory and the OS plus kubelet had no reservation. Under pressure, Linux OOM killer could terminate kubelet, taking the node NotReady before graceful pod eviction. Introduce per-group kubelet reservations with sane defaults: - system-reserved and kube-reserved memory auto-computed as 5% of effective guest memory, clamped to [256Mi, 1Gi] - CPU reserved 100m for each - eviction-hard memory.available<10% (scales with VM size) Effective memory is taken from group.resources.memory when set, otherwise resolved from instanceType via the existing Helm lookup already used for capacity annotations. Users can override any field per node group via nodeGroups[*].kubelet. Signed-off-by: Arsolitt <arsolitt@gmail.com>
How to test packages local
cd packages/core/installer
make image-cozystack REGISTRY=YOUR_CUSTOM_REGISTRY
make apply
kubectl delete po -l app=source-controller -n cozy-fluxcd