-
Notifications
You must be signed in to change notification settings - Fork 524
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
[ENHANCEMENT] Add mimir-http-prefix
option to introduce a prefix for Mimir URL when use legacy routes.
#8069
Conversation
…url when use legacy routes
var err error | ||
if path, err = url.JoinPath(cfg.MimirHTTPPrefix, legacyAPIPath); err != nil { | ||
return nil, err | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit. Should we validate that the user mustn't set MimirHTTPPrefix
if UseLegacyRoutes
is false? MimirHTTPPrefix
is a new config, I think it might be better to strictly only allow this config when UseLegacyRoutes
is set, instead of just ignoring the config.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be tricky to check here, since MimirHTTPPrefix
has a default value /prometheus
, in client we will not able to distinguish the not set and default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general LGTM. But I left two nit comments.
Co-authored-by: Jon Kartago Lamida <jon.lamida@grafana.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
a late follow-up: can you update the docs for Mimirtool https://github.com/grafana/mimir/blob/51498b2054c0bb836f9aba427fd467f43c37c206/docs/sources/mimir/manage/tools/mimirtool.md? |
…r Mimir URL when use legacy routes. (grafana#8069) * [ENHANCEMENT] Add `mimir-http-prefix` option to add prefix for mimir url when use legacy routes * fix test * Update CHANGELOG.md Co-authored-by: Jon Kartago Lamida <jon.lamida@grafana.com> --------- Co-authored-by: Jon Kartago Lamida <jon.lamida@grafana.com>
[ENHANCEMENT] Add
mimir-http-prefix
option to introduce a prefix for Mimir URL when use legacy routes.What this PR does
clean up some mimirtool bugs, adding mimir-http-prefix for mimir client when use legacy routes
Which issue(s) this PR fixes or relates to
Fixes #8018
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.