Repository navigation
test(e2e): run the gateway live test on OpenShift - #13627
Merged
Merged
Conversation
The managed-gateway live test could run only on kind. It always deployed runtime.provider kubernetes, whose chart UID and fsGroup 1000 restricted-v2 refuses on OpenShift, and it waited for volumes that a Retain StorageClass keeps. The OpenShift-profile test writes the namespace's UID range itself, which on an OpenShift cluster would replace the range the cluster assigns. NEMOCLAW_TEST_KUBE_RUNTIME=openshift now deploys the gateway with the openshift provider and requires every pod to be admitted under restricted-v2, running as the namespace's first UID and group. Before deleting the namespace, the test switches the volumes provisioned for its claims to Delete, so that the provisioner removes their storage. The OpenShift-profile test refuses a cluster that serves security.openshift.io, and cargo ci live-kind pins the variable to kubernetes. Passed on OpenShift Local 2.64.0 (OpenShift 4.22.14, one arm64 node) in 59.28 s, with both pods under restricted-v2 as UID 1000670000 and no test namespace, volume or node-reader ClusterRole left afterwards; the guard refused the same cluster before deploying. cargo fmt, clippy, git diff --check and fern check pass; Live / Kind runs in CI. Part of #12733. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
cuongdangn
marked this pull request as ready for review
October 22, 2026 08:46
cv
enabled auto-merge (squash)
October 26, 2026 08:38
gaveezy
added a commit
that referenced
this pull request
Oct 26, 2026
Two files conflicted with #13627 (69e0eab), which runs the gateway live test on OpenShift; #13704 (f2d92ad) switched the live agent to OpenClaw without conflicts. Keep both sides: - kubernetes_live.rs: this branch's `random_hex` and `create` helpers and #13627's `runtime_provider`. The OpenShift-profile test starts with #13627's refusal of a cluster that serves `security.openshift.io`, then deploys this branch's three agents. - live-tests.md: this branch's description of the shared flow, with #13627's sentence about that refusal after the UID-range sentence. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #12733.
The managed-gateway live test could run only on kind.
It always deployed
runtime.provider: kubernetes, so on OpenShift the chart's UID and fsGroup 1000 fall outside the namespace's range andrestricted-v2refuses the gateway pod.Its last step waited for the gateway's volumes to disappear after deleting the namespace, which never happens under the
Retainreclaim policy of OpenShift Local's default StorageClass.The OpenShift-profile test writes the namespace's UID range itself, so on an OpenShift cluster it would replace the range that the cluster assigns.
This change:
NEMOCLAW_TEST_KUBE_RUNTIME(kubernetesby default, oropenshift) to the gateway test.With
openshift, after each installation every pod in the namespace must be admitted underrestricted-v2, run every container as the first UID of the namespace's range, and use the first supplemental group asfsGroup.The SCC name is asserted because [Kubernetes/OpenShift] Qualify v1 platform support and verify real OpenShift behavior #12733 asks whether the gateway needs any SCC grant beyond the cluster's default.
DeletetoDelete, after checking that the provisioner created it for that PVC, so that the provisioner removes the volume and its storage.kind's volumes already use
Deleteand are left as they are.security.openshift.ioAPI group, before it deploys anything.NEMOCLAW_TEST_KUBE_RUNTIME=kubernetesincargo ci live-kind, so a value exported for an OpenShift run cannot reach the kind run.docs/contributing/live-tests.md, including the chart's cluster-scoped ClusterRole and ClusterRoleBinding, and updates the matching sentence indocs/usage.md.Validation
On OpenShift Local 2.64.0 (OpenShift 4.22.14, Kubernetes v1.35.6, one arm64 RHCOS node, Agent Sandbox v0.5.0), with a bundle from
cargo ci bundle:NEMOCLAW_TEST_KUBE_RUNTIME=openshiftpassed in 59.28 s.The gateway and development-issuer pods ran under
restricted-v2with UID and fsGroup 1000670000 in both cycles; afterwards no test namespace, volume, ClusterRole or ClusterRoleBinding remained.Locally:
cargo fmt --check,cargo clippy --all-targets -- -D warningsfornemoclaw-e2eandnemoclaw-build,git diff --check, andcargo run -p nemoclaw-build -- fern check(0 errors).Deferred to CI:
Live / Kind, which runs the gateway and OpenShift-profile tests on kind and refuses non-Linux hosts, and the bundle and lifecycle checks thatcargo ciselects for the changed e2e crate.Not covered: sandbox pods on OpenShift (they need an agent image the cluster can pull), multi-node and amd64 OpenShift, and an existing OIDC issuer instead of the development one.
#13551 edits the same two files and renames the OpenShift-profile test; whichever merges second resolves the overlap.
🤖 Generated with Claude Code