Repository navigation
crucible-kueue: disposable vcluster environments - #546
Open
MatthewBonanni wants to merge 3 commits into
Open
MatthewBonanni wants to merge 3 commits into
MatthewBonanni wants to merge 3 commits into
Conversation
Adds ADR-0083 and the environment module: creating an LLMWorkloadEnvironment, building a guest client from the kubeconfig its status publishes, the guest admission policies that stamp the queue label and let the host assign pod UIDs, and server-side apply into the guest. Assisted-by: Claude Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
environment_create/status/apply/delete provision an LLMWorkloadEnvironment (mode VCluster) through the operator and keep its guest kubeconfig on the server. The workload tools take an optional environment: the object, its pods, events and logs live in the guest, while its Kueue Workloads and queue position are read in the backing host namespace, so guest pods keep queueing against the host's quota. Before any write into a guest the server applies two MutatingAdmissionPolicies: one stamps the environment's queue label on every pod, one drops pinned runAsUser/fsGroup and gives containers a writable HOME so the host's SCC admits them. Access checks for calls in an environment are made on the llmworkloadenvironments object; deploy RBAC grants the server and callers the verbs, and the server cluster-wide read of LocalQueues and Workloads for backing namespaces. Clients take environment on wait and the workload calls. Assisted-by: Claude Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
No Kueue runs in the guest to release it; the host's Kueue admits each of its pods. Adds a cluster e2e for an environment's lifecycle and a guest Job. Assisted-by: Claude Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Matthew Bonanni <mbonanni@redhat.com>
MatthewBonanni
marked this pull request as ready for review
December 1, 2026 22:57
This branch has not been deployed
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.
Lets a run get a disposable vcluster from crucible-kueue, install a platform the host does not run into it (for example a pinned upstream KServe release), and run workloads there. Its GPU pods still queue through the host's Kueue, and the guest's credential never leaves the server. Decision: ADR-0083.
New tools
environment_create {name, queue, duration_seconds}creates anLLMWorkloadEnvironment(modeVCluster). Its ClusterQueue is the named LocalQueue's. Lifetime is 15 minutes to 12 hours, 4 hours by default.environment_statusreturns the operator's conditions.readyis true once the guest answers and the backing namespace has the operator's LocalQueue; otherwiseproblemssays why.environment_apply {name, objects}server-side applies any objects into the guest, in order. On failure the error names the index of the object that failed.environment_deletedeletes an environment this run created.Workload tools in an environment
workload_plan,workload_submit,workload_status,workload_logs,workload_scale,workload_stop,workload_resumeandworkload_deletetake an optionalenvironment.defaultnamespace.Guest policies. Before any write into a guest, the server applies two MutatingAdmissionPolicies there:
runAsUser/fsGroupso OpenShift's SCC assigns them, and setsHOME=/tmpon containers that have noHOME.Access and RBAC
llmworkloadenvironmentsobject:getto read,updateto act,create(plus the queue) to create,deleteto delete.get/liston LocalQueues, Workloads and pending workloads, because backing namespaces are created dynamically.Clients. The Python and Rust clients take
environmentonwaitand on the workload calls, and the Python client gains the four environment methods.Host prerequisites. The LLMWorkloadEnvironment operator must have its Kueue integration on, so backing namespaces get the managed label and a LocalQueue
default. A host that must not rely on the guest-side queue stamp should add a ValidatingAdmissionPolicy that refuses pods without a queue label in the operator's namespaces.Validation
cargo clippy --workspace --all-targets -- -D warnings: clean.cargo test -p crucible-kueue -p crucible-kueue-client: 206 unit tests and the client tests pass.cargo test -p crucible deploy::: 190 tests pass.pytest crucible-kueue-py/tests: 13 tests pass, against the real router.govctl check: no new warnings.LLMInferenceService(Envoy Gateway, GIE, llm-d) ran in the guest, and a chat completion through its gateway succeeded.a_job_in_an_environment_runs_in_its_guest_and_queues_on_the_host(new) passes in 81 s.--features kube/http-proxy.defaultin its place.ready; apply, with acrucible-kueue-*object refused; plan, submit, status, logs and delete of a guest Job, which the host's Kueue admitted and which finished; thenenvironment_delete.🤖 Generated with Claude Code