Add ruler tenant federation - #7828
Conversation
a9f4d98 to
e42ed8e
Compare
friedrichg
left a comment
There was a problem hiding this comment.
It's a good start. I have only one nit
56c4e5f to
f715432
Compare
friedrichg
left a comment
There was a problem hiding this comment.
Looks actually really good. One question only I found
| // not own them, e.g. because the feature was disabled after they were stored. | ||
| func (r *DefaultMultiTenantManager) filterFederatedRuleGroups(userID string, groups rulespb.RuleGroupList) rulespb.RuleGroupList { | ||
| ownerErr := r.federatedRules.checkOwner(userID) | ||
| if ownerErr == nil { |
There was a problem hiding this comment.
If checkOwner returns no error we should not exit the function: the owner being
allowed to have federated rule groups says nothing about whether these particular
source tenants are still acceptable under the current tenant federation config.
We should validate the source tenants here too. (Probably using r.federatedRules.validateSourceTenants)
Imagine scenarios where regex-matcher-enabled or max-tenant has changed
There was a problem hiding this comment.
Thanks for catching it. I validated the source tenants in filterFederatedRuleGroups.
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
… and regex constraints Signed-off-by: SungJin1212 <tjdwls1201@gmail.com>
f2b6ed5 to
a6eafa6
Compare
Implement the federated ruler proposal. A rule group listing tenants in its src_tenants field is evaluated against those tenants, while the resulting series, ALERTS series and notifications are written to the tenant owning the rule group.
This feature behind
-ruler.enable-federated-rulesand restrict the owning tenants with-ruler.allowed-federated-tenantsand-ruler.disallowed-federated-tenants.Which issue(s) this PR fixes:
Fixes #
Checklist
CHANGELOG.mdupdated - the order of entries should be[CHANGE],[FEATURE],[ENHANCEMENT],[BUGFIX]docs/configuration/v1-guarantees.mdupdated if this PR introduces experimental flags