Skip to content
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

Helm: multitenancy by default makes migrations to mimir more difficult #2563

Closed
dimitarvdimitrov opened this issue Jul 27, 2022 · 3 comments · Fixed by #2614
Closed

Helm: multitenancy by default makes migrations to mimir more difficult #2563

dimitarvdimitrov opened this issue Jul 27, 2022 · 3 comments · Fixed by #2614
Assignees
Labels
good first issue Good for newcomers helm type/docs Improvements or additions to documentation

Comments

@dimitarvdimitrov
Copy link
Contributor

dimitarvdimitrov commented Jul 27, 2022

This has come up from a few members in the community slack since the 3.0 release (example1, example2). So I'm trying to summarize it in an issue.

Context

Deploying mimir via the helm chart. Use case is for migrating from a cortex cluster without multitenancy to a mimir cluster with multitenancy. I want to redirect my old clients to the new cluster and still ingest their metrics even though they aren't providing the x-scope-orgID header. I also want to allow new tenants to send metrics to mimir with their own tenant IDs.

Problem

With multitenancy enabled by default in the chart Mimir can only ingest metrics without x-scope-orgid header as the anonymous tenant. While the option is configurable in mimir, the nginx in the chart sets a default header value. There are workarounds:

Proposal

The chart should automatically detect my mimir config and the no_auth_tenant there and use that in the nginx config.

Alternative 1

Rename my fake tenant in cortex and then move it to mimir. Theoretically this only requires changing the name of the tenant in the folders/prefixes in the object storage.

But in reality with a running system this requires downtime. Ingestion, compaction and rule evaluation should stop, blocks should be flushed to object storage and then I can rename my tenant to anonymous in the object storage.

Alternative 2

Copy nginx.config from the chart and change the default value for the x-scope-orgid header that nginx adds from anonymous to fake. This means that I have to now keep my nginx config up to date with the one in the chart.

Alternative 3

Change my clients to now pass the correct header. Maybe doable, despite requirements, but this may be difficult to do if not all clients are managed by me.

NB all of this applies for when someone was running without multitenancy with the mimir-distributed chart and had a non-default no-auth tenant and wants to now upgrade to version 3.0 of the chart

@krajorama
Copy link
Contributor

agree with the proposal. mimir config is extremely unlikely to include the nginx config, so should not run the risk of cyclic dependency :)

@krajorama krajorama added the good first issue Good for newcomers label Jul 29, 2022
@osg-grafana
Copy link
Contributor

osg-grafana commented Aug 1, 2022

Would this issue require (internal?) documentation?

@krajorama
Copy link
Contributor

Yes, I think we'll need to update the migration guide from cortex and not just because of this issue.

@osg-grafana osg-grafana added the type/docs Improvements or additions to documentation label Aug 1, 2022
@krajorama krajorama self-assigned this Aug 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers helm type/docs Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants