thanos: Compact Web: Missing --web.route-prefix and --web.external-prefix wrong
Thanos, Prometheus and Golang version used: Using official docker release for 0.12.2
Object Storage Provider: NA
What happened:
--web.external-prefix=
is supposed to be for the external path as referred to in links but is supposed to serve the content still from /
--web.route-prefix=
is supposed to actually serve it on a subpath, unfortunately compact currently lacks this flag.
From the documentation of query:
--web.route-prefix="" Prefix for API and UI endpoints. This allows thanos UI to be served on a sub-path. This option is analogous to --web.route-prefix of Promethus.
--web.external-prefix="" Static prefix for all HTML links and redirect URLs in the UI query web interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos UI to be served behind a reverse proxy that strips a URL sub-path.
From the documentation of compact (same as query just missing route-prefix):
--web.external-prefix="" Static prefix for all HTML links and redirect URLs in the bucket web UI interface. Actual endpoints are still served on / or the web.route-prefix. This allows thanos bucket web UI to be served behind a reverse proxy that strips a URL sub-path.
If connecting to localhost it should be http://localhost:10902/loaded but on the reverse proxy it would be http://external/prefix/loaded which would get rewritten as http://internal/loaded
What you expected to happen: Compact should follow the behavior as defined in the documentation and the other components of thanos.
How to reproduce it (as minimally and precisely as possible):
thanos compact --http-address="0.0.0.0:10902" --web.external-prefix=/bucket
- go to http://localhost:10902/global – won’t work
- go to http://localhost:10902/bucket/global – does work but shouldn’t because it’s the wrong option.
Anything else we need to know:
This was incorrectly fixed in https://github.com/thanos-io/thanos/issues/2338
The code as it was, was correct, what the submitter really wanted was the --web.route-prefix
which is missing from thanos compact. He should not expect to see anything outside of / if using --web.external-prefix
.
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 15 (3 by maintainers)
We plan on fixing this soon. cc @prmsrswt