-
Notifications
You must be signed in to change notification settings - Fork 820
Add proposal for tenant limits API #6818
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add proposal for tenant limits API #6818
Conversation
Hello, this has been something that has been bothering me and my team for a while. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. it's a great idea
docs/proposals/limits-api.md
Outdated
|
||
### Endpoints | ||
|
||
#### 1. GET /api/v1/limits/{tenant_id} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The standard way to specify the cortex tenant is using the header X-Scope-OrgID. We don't need the extra tenant_id in the path.
docs/proposals/limits-api.md
Outdated
- Trigger a reload of the runtime config | ||
|
||
2. Security: | ||
- The API will require admin-level authentication |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is out of scope for cortex per se. As long as we get the right header in cortex, we should modify the limits for the tenant
|
||
2. Security: | ||
- The API will require admin-level authentication | ||
- Rate limiting will be implemented to prevent abuse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
2. Security: | ||
- The API will require admin-level authentication | ||
- Rate limiting will be implemented to prevent abuse | ||
- Changes will be validated before being applied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
docs/proposals/limits-api.md
Outdated
|
||
1. The API will be integrated into the existing Cortex components to: | ||
- Read the current runtime config from the configured storage backend | ||
- Apply changes to the in-memory configuration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need this line, it's not how it works today
docs/proposals/limits-api.md
Outdated
- Read the current runtime config from the configured storage backend | ||
- Apply changes to the in-memory configuration | ||
- Persist changes back to the storage backend | ||
- Trigger a reload of the runtime config |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is already implemented in all cortex components. No need to say it here.
docs/proposals/limits-api.md
Outdated
|
||
### Implementation Details | ||
|
||
1. The API will be integrated into the existing Cortex components to: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. The API will be integrated into the existing Cortex components to: | |
1. The API will be integrated into the cortex-overrides component |
We already have a component that reads limits, so it's perfect for this use case.
What this PR does:
This PR adds a proposal for a tenant limits API.
Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]