Skip to content

feat: support cross-namespace quota backends - #2798

Open
PatilHrushikesh wants to merge 18 commits into
theagentrouter:mainfrom
PatilHrushikesh:feature/quota-policy-cross-namespace
Open

PatilHrushikesh wants to merge 18 commits into
theagentrouter:mainfrom
PatilHrushikesh:feature/quota-policy-cross-namespace

Conversation

@PatilHrushikesh

@PatilHrushikesh PatilHrushikesh commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

Add cross-namespace support for AI Gateway QuotaPolicy targets.

A QuotaPolicy can now target an AIServiceBackend in another namespace by setting targetRefs[].namespace. If the namespace is omitted, it defaults to the QuotaPolicy namespace, preserving existing behavior.

The change:

  • Resolves AIServiceBackend targets using fully qualified namespace/name identities.
  • Lists and matches QuotaPolicy resources across namespaces when building route quota configuration.
  • Propagates namespaced backend identities through controller state, xDS quota descriptors, and extproc response metadata.
  • Correctly notifies affected routes when a cross-namespace QuotaPolicy is deleted.
  • Updates the QuotaPolicy CRD, generated deepcopy code, API documentation, and quota-policy documentation.
  • Adds and updates controller and quota rate-limit tests for namespaced targets.

Related Issues/PRs (if applicable)

None.

Special notes for reviewers (if applicable)

  • Omitting targetRefs[].namespace remains backward compatible and resolves to the policy namespace.
  • Debug logging and local test/deployment artifacts are intentionally excluded from this PR.

@netlify

netlify Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for theagentrouter ready!

Name Link
🔨 Latest commit ce140db
🔍 Latest deploy log https://app.netlify.com/projects/theagentrouter/deploys/6acb2cf97df72c0008b97594
😎 Deploy Preview https://deploy-preview-2798--theagentrouter.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@PatilHrushikesh
PatilHrushikesh force-pushed the feature/quota-policy-cross-namespace branch from 151232c to 2f43f67 Compare October 6, 2026 10:26
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@PatilHrushikesh
PatilHrushikesh force-pushed the feature/quota-policy-cross-namespace branch from 2f43f67 to 7408178 Compare October 6, 2026 10:56
PatilHrushikesh and others added 3 commits October 6, 2026 12:58
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@PatilHrushikesh
PatilHrushikesh marked this pull request as ready for review October 6, 2026 20:04
@PatilHrushikesh
PatilHrushikesh requested a review from a team as a code owner October 6, 2026 20:04
PatilHrushikesh and others added 2 commits October 7, 2026 08:43
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

PatilHrushikesh and others added 11 commits October 7, 2026 11:06
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@missBerg missBerg added enhancement New feature or request area/quota Rate limiting, quota, token/cost accounting and attribution area/api Control plane API (CRDs) labels Oct 9, 2026
Signed-off-by: Hrushikesh Patil <hrushi2900@gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@PatilHrushikesh
PatilHrushikesh force-pushed the feature/quota-policy-cross-namespace branch from 2b5510a to ce140db Compare October 11, 2026 06:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api Control plane API (CRDs) area/quota Rate limiting, quota, token/cost accounting and attribution enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants