test(e2e): add a GPU-less kind smoke test for chart, webhook, libsync #33
All Vouch review confidence checks passed
Residual risk 0.21 = Change Risk (0.52) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #33"
general
weight: 0.35
archlitchi
What type of PR is this?
Test. Adds a self-contained smoke test; no chart, image or API change.
What this PR does / why we need it:
Adds
hack/e2e/Dockerfileandhack/e2e/kind-smoke.sh, a GPU-less smoke test that installs this chart into a throwaway kind cluster and asserts on a real API server that the libsync DaemonSet is Ready and has placed a non-emptylibvgpu.soplus a matchingld.so.preloadin/usr/local/vgpuon the node, that thekai-resource-isolator-mutatingwebhook injects the three volumes, the three mounts andPOD_UID/CONTAINER_NAME/CONTAINER_VGPU_MOUNTinto agpu-fraction: "0.5"pod and that the injected/etc/ld.so.preloadis loaded into the process, that this pod running as uid 1000 can create its own cache directory$CONTAINER_VGPU_MOUNT/containers/${POD_UID}_${CONTAINER_NAME}, and that pods with no annotations and pods withkai-resource-isolator.io/inject: "false"are not mutated.The test image builds
/webhookand/monitorfrom the repository Go sources, mirroring thego-builderstage ofdocker/Dockerfile, and takes/artifacts/libvgpu.sofrom the published multi-archdocker.io/projecthami/kai-resource-isolator:v1.1.0viaCOPY --from, so no CUDA toolchain is needed on the test host.Why now: nothing tests this chart and the one place that installs it cannot run in CI. KAI PR #2033 deploys the chart in its hamicore e2e, but its author calls that e2e "intentionally not wired into CI for now" because it runs against a fake GPU operator, and KAI maintainer davidLif declined to test HAMi metrics there. The non-root cache-directory bug behind the stale-closed PR #22 is still on
main, and this test fails on it.Which issue(s) this PR fixes:
Fixes #29
Special notes for your reviewer:
From the repository root, nothing installed on the host beyond docker/kind/kubectl/helm:
Environment knobs:
KIND_CLUSTER(defaultkri-smoke),KEEP_CLUSTER(1leaves the cluster),IMAGE,CHART_DIR(default<repo>/chart/kai-resource-isolator),RELEASEandNAMESPACE(defaultkai-resource-isolator),HELM_EXTRA_ARGS(word-split, appended tohelm upgrade --install),TIMEOUT(default180s),EXPECT_NONROOT_WRITE(0reports the non-root mkdir check as XFAIL instead of FAIL, for a baseline run against a chart without the fix).IMAGEis optional: when unset the script buildskai-resource-isolator:e2efromhack/e2e/Dockerfileandkind loads it. The cluster is deleted on exit unlessKEEP_CLUSTER=1, and one that already existed when the script started is never deleted.Measured on macOS 26.4.1 arm64, Docker Desktop 29.4.2, kind v0.32.0, Kubernetes v1.36.1, kubectl client v1.33.9, helm v4.2.3, no GPU:
mainchart,EXPECT_NONROOT_WRITE=1: 17 checks PASS, exactly 1 FAIL (the non-root mkdir), exit 1. The default is deliberately1so an unfixed chart is red, not a flaky test.mainchart,EXPECT_NONROOT_WRITE=0, fresh single-node kind cluster where nothing was pre-created, so the755 root:rootstate was the script's own: 17 PASS,XFAIL c4, exit 0.mkdir -ppluschmod 1777pair for${DST}/containersand the host/tmp/vgpulock) on a scratch copy of the chart, not on this branch: all 18 checks PASS, 0 FAIL, exit 0, with the host/usr/local/vgpu/containersat755 root:rootbefore that fixed release and1777after.Every chart version from before the libsync fix is expected to fail check
c4, since the uid 1000 process cannot create its cache directory while the host directory is755 root:root; the script header says so. Checkc4covers only thecontainersdirectory, not the/tmp/vgpulockhalf. The reuse-an-existing-cluster path and the in-place helm upgrade were exercised separately,shellcheck0.11.0 (koalaman/shellcheck:stable,--severity=style) is clean, and a run takes 49 to 51 s creating the kind node or 36 s reusing one, with the image build cached at ~2 s.Findings worth calling out:
sleep infinityunder/etc/ld.so.preload -> /usr/local/vgpu/libvgpu.sostays Running withrestarts=0, the library is mapped in/proc/1/mapsandkubectl execworks, which is what makes a GPU-less test possible at all; checksc1andc3keep proving it.Related: KAI PR #2033, KAI issue #1821, this repo's PR #22.
Does this PR introduce a user-facing change?:
No. It adds test files only. No chart, image, default or API change.
AI Disclosure:
AI assistance was used to review repository context and help draft this change and its description. All changes were manually reviewed, verified locally, and submitted by the author.