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
* Extracted AllowedUsers from Compactor code.
Signed-off-by: Peter Štibraný <[email protected]>
* Added support for enabled/disabled tenants in ruler.
Signed-off-by: Peter Štibraný <[email protected]>
* CHANGELOG.md
Signed-off-by: Peter Štibraný <[email protected]>
* CHANGELOG.md and documentation
Signed-off-by: Peter Štibraný <[email protected]>
* Removed obsolete test.
Signed-off-by: Peter Štibraný <[email protected]>
* Make lint happy.
Signed-off-by: Peter Štibraný <[email protected]>
* Review feedback.
Signed-off-by: Peter Štibraný <[email protected]>
* Fix field names.
Signed-off-by: Peter Štibraný <[email protected]>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -38,6 +38,7 @@
38
38
*[ENHANCEMENT] Add a metric `cortex_compactor_compaction_interval_seconds` for the compaction interval config value. #4040
39
39
*[ENHANCEMENT] Ingester: added following per-ingester (instance) limits: max number of series in memory (`-ingester.instance-limits.max-series`), max number of users in memory (`-ingester.instance-limits.max-tenants`), max ingestion rate (`-ingester.instance-limits.max-ingestion-rate`), and max inflight requests (`-ingester.instance-limits.max-inflight-push-requests`). These limits are only used when using blocks storage. Limits can also be configured using runtime-config feature, and current values are exported as `cortex_ingester_instance_limits` metric. #3992.
40
40
*[ENHANCEMENT] Cortex is now built with Go 1.16. #4062
41
+
*[ENHANCEMENT] Ruler: Added `-ruler.enabled-tenants` and `-ruler.disabled-tenants` to explicitly enable or disable rules processing for specific tenants. #4074
41
42
*[BUGFIX] Ruler-API: fix bug where `/api/v1/rules/<namespace>/<group_name>` endpoint return `400` instead of `404`. #4013
42
43
*[BUGFIX] Distributor: reverted changes done to rate limiting in #3825. #3948
43
44
*[BUGFIX] Ingester: Fix race condition when opening and closing tsdb concurrently. #3959
Copy file name to clipboardExpand all lines: pkg/compactor/compactor.go
+11-42Lines changed: 11 additions & 42 deletions
Original file line number
Diff line number
Diff line change
@@ -172,18 +172,13 @@ type ConfigProvider interface {
172
172
typeCompactorstruct {
173
173
services.Service
174
174
175
-
compactorCfgConfig
176
-
storageCfg cortex_tsdb.BlocksStorageConfig
177
-
cfgProviderConfigProvider
178
-
logger log.Logger
179
-
parentLogger log.Logger
180
-
registerer prometheus.Registerer
181
-
182
-
// If empty, all users are enabled. If not empty, only users in the map are enabled (possibly owned by compactor, also subject to sharding configuration).
183
-
enabledUsersmap[string]struct{}
184
-
185
-
// If empty, no users are disabled. If not empty, users in the map are disabled (not owned by this compactor).
186
-
disabledUsersmap[string]struct{}
175
+
compactorCfgConfig
176
+
storageCfg cortex_tsdb.BlocksStorageConfig
177
+
cfgProviderConfigProvider
178
+
logger log.Logger
179
+
parentLogger log.Logger
180
+
registerer prometheus.Registerer
181
+
allowedTenants*util.AllowedTenants
187
182
188
183
// Functions that creates bucket client, grouper, planner and compactor using the context.
f.DurationVar(&cfg.ForGracePeriod, "ruler.for-grace-period", 10*time.Minute, `Minimum duration between alert and restored "for" state. This is maintained only for alerts with configured "for" time greater than grace period.`)
164
167
f.DurationVar(&cfg.ResendDelay, "ruler.resend-delay", time.Minute, `Minimum amount of time to wait before resending an alert to Alertmanager.`)
165
168
169
+
f.Var(&cfg.EnabledTenants, "ruler.enabled-tenants", "Comma separated list of tenants whose rules this ruler can evaluate. If specified, only these tenants will be handled by ruler, otherwise this ruler can process rules from all tenants. Subject to sharding.")
170
+
f.Var(&cfg.DisabledTenants, "ruler.disabled-tenants", "Comma separated list of tenants whose rules this ruler cannot evaluate. If specified, a ruler that would normally pick the specified tenant(s) for processing will ignore them instead. Subject to sharding.")
171
+
166
172
cfg.RingCheckPeriod=5*time.Second
167
173
}
168
174
@@ -224,20 +230,23 @@ type Ruler struct {
224
230
ringCheckErrors prometheus.Counter
225
231
rulerSync*prometheus.CounterVec
226
232
233
+
allowedTenants*util.AllowedTenants
234
+
227
235
registry prometheus.Registerer
228
236
logger log.Logger
229
237
}
230
238
231
239
// NewRuler creates a new ruler from a distributor and chunk store.
0 commit comments