-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Apply webrouteprefix on debug endpoints #2524
Conversation
The current solution for this is when web route prefix is provided, then web external prefix should also be provided, to make the static resources in the valid path. |
cmd/thanos/bucket.go
Outdated
@@ -335,7 +335,8 @@ func registerBucketWeb(m map[string]setupFunc, root *kingpin.CmdClause, name str | |||
prober.NewInstrumentation(comp, logger, extprom.WrapRegistererWithPrefix("thanos_", reg)), | |||
) | |||
|
|||
srv := httpserver.New(logger, reg, comp, httpProbe, | |||
srv := httpserver.New(logger, reg, comp, "/", |
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.
Do we want webRoutePrefix
for all components, instead of just using /
here? cc @GiedriusS @bwplotka
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.
I am not sure if it is required for all components.
@bwplotka any inputs here?
Got it. So, I think the above screenshots shouldn't be an issue. |
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.
Thanks, looks good, but I think we can simplify by using path.Join
to concatenate the URL paths.
@@ -247,7 +247,8 @@ func runCompact( | |||
prober.NewInstrumentation(component, logger, extprom.WrapRegistererWithPrefix("thanos_", reg)), | |||
) | |||
|
|||
srv := httpserver.New(logger, reg, component, httpProbe, | |||
srv := httpserver.New(logger, reg, component, "/", |
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.
Why not we route as well?
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.
I checked existing compacter flags in which there was no web.route-prefix
. I was not sure whether I should add web.route-prefix
flag to all components.
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.
Should I add web.route-prefix
to all components?
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.
ping
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.
May be we can do it in a separate PR.
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.
I think it would be nice to have --web.route-prefix
in other components as well, but let's leave it for a separate PR.
e5b6d9b
to
b772db1
Compare
failing e2e unrelated to PR |
Rerunning :) |
@ranjithkumar007 E2E still failing. Would you mind fixing this e2e test?
I think the problem is here https://github.com/thanos-io/thanos/blob/master/test/e2e/e2ethanos/services.go#L170, you should add the web route prefix to readiness probe path as well. |
Thanks @yeya24 . |
beef968
to
5eab2d7
Compare
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.
Great! Looks good and CI passed.
@kakkoyun Would you mind giving some 👀 on this pr? I am not sure if this pr affects something in the kube-thanos repo.
Signed-off-by: ranjithkumar007 <ranjith.dakshana2015@gmail.com>
Signed-off-by: Ranjith Kumar <ranjith.dakshana2015@gmail.com>
Signed-off-by: Ranjith Kumar <ranjith.dakshana2015@gmail.com>
cfd00b3
to
4127475
Compare
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.
These changes look good regarding kube-thanos
. We just need to change a mixin we have in queried specs https://github.com/thanos-io/kube-thanos/blob/3b7d80d643dec546f1bfa8dc18b38460d0d57f53/jsonnet/kube-thanos/kube-thanos-query.libsonnet#L142-L164
We can do this after these changes are merged.
Signed-off-by: Ranjith Kumar <ranjith.dakshana2015@gmail.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.
Looks great. LGTM 🎉
Anything left here? |
@ranjithkumar007 sorry we let this get so stale. Can you please rebase? CC @prmsrswt for review considering web route prefix changes |
There are some changes in route and external prefix handling in |
@ranjithkumar007 Hello. Sorry for the delay, but this pr is pretty close now. Can you please rebase master and fix the conflict? Thank you! |
The new component Query Frontend also uses the |
@prmsrswt Thanks for this! It is fine for Query frontend now. I need to investigate whether route prefix breaks anything in Query frontend first. If it doesn't bring any risk, then I will add it in another pr. @ranjithkumar007 Can you please fix the CI failures? |
The CI failures are because Query Frontend now has to use the modified HTTP server, which expects web route prefix as an argument. As @yeya24 said, we can pass an empty string for now in the case of Query Frontend and then investigate it further if it makes sense. |
Oh yes, I missed that the function signature is changed 👍 |
@ranjithkumar007 Friendly ping. Any update on this? |
@ranjithkumar007 Any update? We can take this over if you're busy. @yeya24 @prmsrswt What do you think? Shall we take this one over? |
Sorry, I wasn't getting time outside of work. Please feel free to take over. |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Fixes #2486
Signed-off-by: ranjithkumar007 ranjith.dakshana2015@gmail.com
Verification
Verified locally by checking the URLs with and without webrouteprefix.