tests: harden sandbox sizing manifests for k8s cpu workloads

Route runtime-rs tests to dedicated manifests/templates and ensure the
CPU allocation workloads always carry explicit memory limits, avoiding
Dragonball sandbox startup failures from InvalidMemorySize(0).

Signed-off-by: Fabiano Fidêncio <ffidencio@nvidia.com>
Assisted-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Fabiano Fidêncio
2026-06-24 18:52:25 +02:00
parent 346a3be9ad
commit b2f7314d31
6 changed files with 23 additions and 3 deletions

View File

@@ -31,8 +31,14 @@ setup() {
# Create the pods
kubectl create -f "${yaml_file}"
# Wait for completion
kubectl wait --for=jsonpath='{.status.phase}'=Succeeded --timeout=$timeout pod --all
# Wait for each test container to terminate successfully. Using container
# termination state is more robust than pod phase checks, which can lag.
for pod in "${pods[@]}"; do
kubectl wait \
--for=jsonpath='{.status.containerStatuses[0].state.terminated.reason}'=Completed \
--timeout=$timeout \
"pod/${pod}"
done
# Check the pods
for i in {0..2}; do

View File

@@ -13,3 +13,8 @@ spec:
- name: default-cpu-demo-ctr
image: quay.io/prometheus/busybox:latest
command: ["tail", "-f", "/dev/null"]
resources:
limits:
memory: "128Mi"
requests:
memory: "64Mi"

View File

@@ -18,5 +18,7 @@ spec:
resources:
limits:
cpu: "1"
memory: "128Mi"
requests:
cpu: "500m"
memory: "64Mi"

View File

@@ -16,6 +16,7 @@ spec:
resources:
limits:
cpu: "500m"
memory: "128Mi"
- name: c2
image: quay.io/prometheus/busybox:latest
command:
@@ -24,3 +25,4 @@ spec:
resources:
limits:
cpu: "500m"
memory: "128Mi"

View File

@@ -15,6 +15,9 @@ spec:
containers:
- name: vcpus-less-than-one-with-no-limits
image: quay.io/prometheus/busybox:latest
resources:
limits:
memory: "128Mi"
command: ['nproc', '--all']
restartPolicy: Never
---
@@ -32,6 +35,7 @@ spec:
resources:
limits:
cpu: "0.25"
memory: "128Mi"
command: ['nproc', '--all']
restartPolicy: Never
---
@@ -49,5 +53,6 @@ spec:
resources:
limits:
cpu: "1.2"
memory: "128Mi"
command: ['nproc', '--all']
restartPolicy: Never

View File

@@ -223,7 +223,7 @@ remove_kata_runtime_config_dropin_file() {
}
is_runtime_rs() {
[[ "${KATA_HYPERVISOR}" == *-runtime-rs ]]
[[ "${KATA_HYPERVISOR}" == *-runtime-rs ]] || [[ "${KATA_HYPERVISOR}" == "dragonball" ]]
}
# Copy the right combination of drop-ins from drop-in-examples/ into