Open suxiaoxiaomm opened 1 year ago
I was trying to do the same thing and got stuck here.
I can use the Ingress Path Prefix just fine with Thanos Query and Thanos Bucket Web, but couldn't get the Compactor to load. The only way I could use this was without the web.external-prefix, and access directly through NodePort.
I'm not sure if they're related, but the bucket, rule and query seem to try and handle the route prefix, while the compactor doesn't. Hope it helps. (from another troubled user)
https://github.com/thanos-io/thanos/blob/main/cmd/thanos/tools_bucket.go#L607 https://github.com/thanos-io/thanos/blob/main/cmd/thanos/rule.go#L780 https://github.com/thanos-io/thanos/blob/main/cmd/thanos/query.go#L693
https://github.com/thanos-io/thanos/blob/main/cmd/thanos/compact.go#L567
We are trying to utilize the sub-path for compactor UI(compactor version: 0.29.0-scratch-r0). While what we define args as below:
While with port-forward to the deployment service(we are using kubernetes ), If I visit the url(e.g.: localhost:9092) without sub-path, I can see the top bar is loaded, but main body shows 404, Page not Found!
If I visit the sub-paths, (e.g.: localhost:9092/thanos-compactor/loaded), I directly get 404 page not found
While with basically same setting for Qurier or Ruler, they works fine.
While checking the code for setting Compactor web router, I didn't see it actually ulitized the args "web.route-prefix", I am wondering whether this is the cause.
Appreciate the help and suggestions.