You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(runtime-config): Add default tenant ID for runtime config fallback
Add -runtime-config.default-tenant-id flag that enables a synthetic tenant
entry in the runtime config overrides to serve as the default for all tenants
without per-tenant overrides. This allows changing default limits via the
config pipeline (hot-reloaded) instead of requiring a Cortex restart.
Resolution order: per-tenant override → default tenant → CLI flags.
When the flag is empty (default), the feature is disabled and behavior is
unchanged.
This is an experimental feature.
Signed-off-by: Ben Ye <benye@amazon.com>
Copy file name to clipboardExpand all lines: docs/configuration/v1-guarantees.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,3 +133,5 @@ Currently experimental features are:
133
133
- Ingester: Active Series Tracker
134
134
- Per-tenant `active_series_trackers` configuration in runtime config overrides
135
135
- Counts active series matching PromQL label matchers and exposes `cortex_ingester_active_series_per_tracker` metric
136
+
- Runtime Config: Default Tenant ID
137
+
-`-runtime-config.default-tenant-id` (string) - Synthetic tenant ID used as fallback for runtime config defaults. Overrides for this tenant apply to all tenants without per-tenant overrides.
Copy file name to clipboardExpand all lines: pkg/util/runtimeconfig/manager.go
+7Lines changed: 7 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -36,12 +36,19 @@ type Config struct {
36
36
LoaderLoader`yaml:"-"`
37
37
38
38
StorageConfig bucket.Config`yaml:",inline"`
39
+
40
+
// DefaultTenantID is the synthetic tenant ID used as a fallback for default
41
+
// runtime config values. When set, overrides for this tenant ID are applied
42
+
// to all tenants that do not have their own per-tenant override, before
43
+
// falling back to CLI flag defaults. This is an experimental feature.
44
+
DefaultTenantIDstring`yaml:"default_tenant_id"`
39
45
}
40
46
41
47
// RegisterFlags registers flags.
42
48
func (mc*Config) RegisterFlags(f*flag.FlagSet) {
43
49
f.StringVar(&mc.LoadPath, "runtime-config.file", "", "File with the configuration that can be updated in runtime.")
44
50
f.DurationVar(&mc.ReloadPeriod, "runtime-config.reload-period", 10*time.Second, "How often to check runtime config file.")
51
+
f.StringVar(&mc.DefaultTenantID, "runtime-config.default-tenant-id", "", "[Experimental] Synthetic tenant ID used as fallback for runtime config defaults. When set, overrides for this tenant ID apply to all tenants without per-tenant overrides, before falling back to CLI flag defaults.")
Copy file name to clipboardExpand all lines: schemas/cortex-config-schema.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7810,6 +7810,11 @@
7810
7810
"type": "string",
7811
7811
"x-cli-flag": "runtime-config.backend"
7812
7812
},
7813
+
"default_tenant_id": {
7814
+
"description": "[Experimental] Synthetic tenant ID used as fallback for runtime config defaults. When set, overrides for this tenant ID apply to all tenants without per-tenant overrides, before falling back to CLI flag defaults.",
7815
+
"type": "string",
7816
+
"x-cli-flag": "runtime-config.default-tenant-id"
7817
+
},
7813
7818
"file": {
7814
7819
"description": "File with the configuration that can be updated in runtime.",
0 commit comments