Skip to content

Commit 968b967

Browse files
authored
Add Overrides API component and rename old overrides to overrides-configs (#6975)
1 parent 694e5e3 commit 968b967

15 files changed

Lines changed: 2257 additions & 58 deletions

File tree

.github/workflows/test-build-deploy.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ jobs:
189189
- runner: ubuntu-24.04
190190
arch: amd64
191191
tags: integration_memberlist
192+
- runner: ubuntu-24.04
193+
arch: amd64
194+
tags: integration_overrides
192195
- runner: ubuntu-24.04
193196
arch: amd64
194197
tags: integration_querier
@@ -213,6 +216,9 @@ jobs:
213216
- runner: ubuntu-24.04-arm
214217
arch: arm64
215218
tags: integration_memberlist
219+
- runner: ubuntu-24.04
220+
arch: arm64
221+
tags: integration_overrides
216222
- runner: ubuntu-24.04-arm
217223
arch: arm64
218224
tags: integration_ruler

docs/api/_index.md

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ For the sake of clarity, in this document we have grouped API endpoints by servi
6767
| [Delete Alertmanager configuration](#delete-alertmanager-configuration) | Alertmanager || `DELETE /api/v1/alerts` |
6868
| [Tenant delete request](#tenant-delete-request) | Purger || `POST /purger/delete_tenant` |
6969
| [Tenant delete status](#tenant-delete-status) | Purger || `GET /purger/delete_tenant_status` |
70+
| [Get user overrides](#get-user-overrides) | Overrides || `GET /api/v1/user-overrides` |
71+
| [Set user overrides](#set-user-overrides) | Overrides || `POST /api/v1/user-overrides` |
72+
| [Delete user overrides](#delete-user-overrides) | Overrides || `DELETE /api/v1/user-overrides` |
7073
| [Store-gateway ring status](#store-gateway-ring-status) | Store-gateway || `GET /store-gateway/ring` |
7174
| [Compactor ring status](#compactor-ring-status) | Compactor || `GET /compactor/ring` |
7275
| [Get rule files](#get-rule-files) | Configs API (deprecated) || `GET /api/prom/configs/rules` |
@@ -888,6 +891,64 @@ Returns status of tenant deletion. Output format to be defined. Experimental.
888891

889892
_Requires [authentication](#authentication)._
890893

894+
## Overrides
895+
896+
The Overrides service provides an API for managing user overrides.
897+
898+
### Get user overrides
899+
900+
```
901+
GET /api/v1/user-overrides
902+
```
903+
904+
Get the current overrides for the authenticated tenant. Returns the overrides in JSON format.
905+
906+
_Requires [authentication](#authentication)._
907+
908+
### Set user overrides
909+
910+
```
911+
POST /api/v1/user-overrides
912+
```
913+
914+
Set or update overrides for the authenticated tenant. The request body should contain a JSON object with the override values.
915+
916+
_Requires [authentication](#authentication)._
917+
918+
### Delete user overrides
919+
920+
```
921+
DELETE /api/v1/user-overrides
922+
```
923+
924+
Delete all overrides for the authenticated tenant. This will revert the tenant to using default values.
925+
926+
_Requires [authentication](#authentication)._
927+
928+
#### Example request body for PUT
929+
930+
```json
931+
{
932+
"ingestion_rate": 50000,
933+
"max_global_series_per_user": 1000000,
934+
"ruler_max_rules_per_rule_group": 100
935+
}
936+
```
937+
938+
#### Supported limits
939+
940+
The following limits can be modified via the API:
941+
- `max_global_series_per_user`
942+
- `max_global_series_per_metric`
943+
- `ingestion_rate`
944+
- `ingestion_burst_size`
945+
- `ruler_max_rules_per_rule_group`
946+
- `ruler_max_rule_groups_per_tenant`
947+
948+
#### Hard limits
949+
950+
Overrides are validated against hard limits defined in the runtime configuration file. If a requested override exceeds the hard limit for the tenant, the request will be rejected with a 400 status code.
951+
891952
## Store-gateway
892953

893954
### Store-gateway ring status

docs/configuration/v1-guarantees.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ Cortex is an actively developed project and we want to encourage the introductio
3333

3434
Currently experimental features are:
3535

36+
- Overrides API
37+
- Runtime configuration API for managing tenant limits
3638
- Ruler
3739
- Evaluate rules to query frontend instead of ingesters (enabled via `-ruler.frontend-address`).
3840
- When `-ruler.frontend-address` is specified, the response format can be specified (via `-ruler.query-response-format`).

0 commit comments

Comments
 (0)