Repository navigation
test(e2e): support configurable Kata RuntimeClass - #4454
jiripetrlik wants to merge 1 commit into
Conversation
Pass KATA_CONTAINERS_RUNTIME_CLASS to the Helm chart and label the selected RuntimeClass for sandbox resource admission. Signed-off-by: Jiri Petrlik <jpetrlik@redhat.com>
Bobbins228
left a comment
There was a problem hiding this comment.
The configurable RuntimeClass wiring looks correct. Please restore the RuntimeClass's prior admission label after e2e runs against an existing cluster; the inline comment explains the persistent cluster-wide effect.
| helm_extra_args+=(--set "server.telemetryEnabled=${OPENSHELL_TELEMETRY_ENABLED}") | ||
| helm_extra_args+=(--set supervisor.sandboxRuntime.networkPolicyEnforced=true) | ||
| if [ -n "${KATA_CONTAINERS_RUNTIME_CLASS:-}" ]; then | ||
| kctl label runtimeclass "${KATA_CONTAINERS_RUNTIME_CLASS}" \ |
There was a problem hiding this comment.
On an existing cluster (OPENSHELL_E2E_KUBE_CONTEXT), this overwrites a cluster-scoped admission label, but cleanup() never restores its previous value. Before the run, an unlabeled RuntimeClass (or one labeled false) is not approved for sandbox attachment. After the run, other OpenShell workspaces on that cluster can select it even though the test release is gone. Please record the previous label and restore it during cleanup, including when the run fails.
Pass KATA_CONTAINERS_RUNTIME_CLASS to the Helm chart and label the selected RuntimeClass for sandbox resource admission.
Summary
Allow Kubernetes e2e runs to select a Kata RuntimeClass through KATA_CONTAINERS_RUNTIME_CLASS. Label the selected RuntimeClass for sandbox resource admission before installing OpenShell.
Related Issue
Changes
Testing
Bash syntax, ShellCheck, and git diff --check passed.
Ran Kubernetes e2e on Podman-backed Kind with kata-qemu and IMAGE_TAG=dev.
Confirmed RuntimeClass labeling and Kata workload execution.
All 6 CLI conformance scenarios passed.
Rust e2e results: 81 passed, 1 failed, 15 timed out, 3 skipped.
Kubernetes reported Kata sandbox creation errors:
"Creating watcher returned error too many open files".
The assertion failure concerned an SSH session failing to reattach.
[*] Checks appropriate to the affected code and behavior pass
Unit tests added/updated (not applicable)
E2E tests added/updated (harness updated; no new test cases
Checklist