feat(mimir.rules.kubernetes, loki.rules.kubernetes): Add configurable mimir_namespace_separator and loki_namespace_separator arguments to allow using a URL-safe separator#5961
Open
QuentinBisson wants to merge 11 commits intografana:mainfrom
Conversation
… namespace separator Add mimir_namespace_separator (default "/") and loki_namespace_separator (default "-") arguments so users can replace the hardcoded separator with a URL-safe character (e.g. "_") when a reverse proxy sits in front of the ruler API and does not preserve encoded slashes (%2F). The isManagedMimirNamespace/isManagedLokiNamespace checks are now separator-agnostic, matching by prefix+UUID pattern regardless of separator. This means rules stored under the old separator are still recognised as managed and automatically garbage-collected on the next reconciliation cycle when the separator changes — no manual cleanup required. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
docs/sources/reference/components/loki/loki.rules.kubernetes.md
Outdated
Show resolved
Hide resolved
docs/sources/reference/components/mimir/mimir.rules.kubernetes.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Co-authored-by: Clayton Cornell <131809008+clayton-cornell@users.noreply.github.com>
Contributor
Author
|
Hey @clayton-cornell I was waiting for you to show up :D Thank you for reviewing this PR |
Contributor
|
Haha... happy to review the PRs :-) Over to @grafana/grafana-alloy-maintainers for the code review |
mimir_namespace_separator and loki_namespace_separator arguments to allow using a URL-safe separator
QuentinBisson
commented
Apr 4, 2026
QuentinBisson
commented
Apr 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brief description of Pull Request
Fixes #5915
Add
mimir_namespace_separator(default"/") andloki_namespace_separator(default"-") arguments so users can replace the hardcoded separator with a URL-safe character (e.g._) when a reverse proxy decodes%2Fbefore routing to the ruler API.The managed-namespace check is now separator-agnostic, so rules stored under the old separator are automatically cleaned up on the next reconciliation when the separator changes.
PR Checklist