From 94d42749a7b1fd01ba4f99dec7dc975b19f0f2e7 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Tue, 31 Mar 2026 12:48:07 +0200 Subject: [PATCH] fix(kubernetes): set explicit ephemeral-storage on virt-launcher pods Without explicit ephemeral-storage resources on the VirtualMachine spec, virt-launcher pods inherit default limits from the namespace LimitRange, which can be much lower than the emptyDisk capacity. This causes kubelet to evict the pod when the VM's containerd unpacks images exceeding the limit. Set domain.resources with ephemeral-storage calculated via cozy-lib allocation ratio based on the configured ephemeralStorage value. Co-Authored-By: Claude Signed-off-by: Andrei Kvapil --- packages/apps/kubernetes/templates/cluster.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/apps/kubernetes/templates/cluster.yaml b/packages/apps/kubernetes/templates/cluster.yaml index 7d71858b..10d6fd80 100644 --- a/packages/apps/kubernetes/templates/cluster.yaml +++ b/packages/apps/kubernetes/templates/cluster.yaml @@ -70,6 +70,8 @@ spec: memory: guest: {{ .group.resources.memory }} {{- end }} + resources: + {{- include "cozy-lib.resources.sanitize" (list (dict "ephemeral-storage" .group.ephemeralStorage) $) | nindent 14 }} evictionStrategy: External volumes: - name: system