-
Notifications
You must be signed in to change notification settings - Fork 816
Allow for dynamic tenant selection in query federation #6588
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
Comments
Yeah, writing many tenants to |
Yeah, or maybe we could tag tenants with labels and then be able to fetch all of the tenants with the label selectors like in Kubernetes. For example, with a list of tenants defined like this with labels: tenants:
- name: tenant1
labels:
env: dev
- name: tenant2
labels:
env: qa
- name: tenant3
labels:
env: prod
- name: tenant4
labels:
env: prod Specifying - name: tenant5
labels:
env: prod would select Perhaps these values could be set as an override in the runtime config. |
I think the both ways would be useful. :D |
Like a virtual tenant but only for reads. Sounds useful |
@CharlieTLe |
Hi @SungJin1212, please take it. Thanks! |
Is your feature request related to a problem? Please describe.
It's possible to query a list of tenants with query federation today. When this list of tenants changes, the client must update the
X-Scope-OrgId
header to match the new list.Describe the solution you'd like
Allow for accepting a header value that maps to a list of tenants.
For example, if the following tenants exist:
tenant1
tenant2
tenant3
Querying all of the tenants could be done by setting
X-Scope-OrgId
totenant1|tenant2|tenant3
.If there is a new tenant,
tenant4
, and the client wants to query this tenant as well, the client must go through the process of updatingX-Scope-OrgId
totenant1|tenant2|tenant3|tenant4
.If there is a way for the client to specify a static value in the header of the request that could map to a list of these tenants, then the client would not need to update
X-Scope-OrgId
when there is a change in the list of tenants to query.Describe alternatives you've considered
It's probably possible to set this up in a proxy to Cortex where the header value gets manipulated to expand to a list of tenants.
For example:
X-Scope-OrgId: all-tenant
->X-Scope-OrgId: tenant1|tenant2|tenant3|tenant4
The text was updated successfully, but these errors were encountered: