1

I am seeking help to get the URL path to work in redisinsight

as per documentation i added config-map envs:

RIPROXYENABLE: "ture" RIPROXYPATH: "/redis" RITRUSTEDORIGINS: "https://host.example.com"

However when I call the service on https://host.example.com/redis/, the bundle.js is returned on the root path https://host.example.com/static/app/bundle.e7efa0031208bf65925b.js

As image is run redislabs/redisinsight:latest

Any insight how I might overcome this? Thank you in advance

I tried to set the RIPROXYPATH: "/redis" to RIPROXYPATH: "/redis/", nginx rewrite of the path. Non had any success.

1 Answers1

2

I sumbled upon this unanswered question. I have a similar problem to solve. I found following links that I am exploring. The solution is based on docker so currently I am looking to convert this to Kubernetes world. https://docs.redis.com/latest/ri/using-redisinsight/proxy/

It appears to just set up a proxy server to filter URLs thru, that match the subpath.

Seperately, I am also exploring URL rewrite from this sample to achieve same goals as what redis insight website advises in the above link.

https://kubernetes.github.io/ingress-nginx/examples/rewrite/

Hope this helps. Once I have a precise answer , will be sure to post that.

UPDATE: Here is a solution - thanks to my Boss's second pair of eyes on rewrite rule to catch my missing annotation.

  1. I am using Docker image latest or 1.14 from https://hub.docker.com/r/redislabs/redisinsight/tags

  2. Add following to the Deployment template of your helm chart/container/spces

    env:
       - name: "RIPROXYPATH"
         value: "/rui/"
       - name: "RIPROXYENABLE"
         value: "t"
    
  3. In your redisinsight ingress add following: Reference https://kubernetes.github.io/ingress-nginx/examples/rewrite/ Do not forget annotation.

     annotations:
       nginx.ingress.kubernetes.io/rewrite-target: /$2
     ...
     paths:
           - path: /rui(/|$)(.*)
             pathType: Prefix
             backend:
    
  • Did you find a solution to this? I am having the same issue, googled the same resources but it just doesn't work. RedisInsight tries to load it's config from /api/config instead of /redisinsight/api/config. When i configure the ingress to serve RedisInsight from root / it works. – Markus S. Jul 12 '23 at 09:15
  • 1
    Unfortunately not yet. I did open issue on their github. Reommend up voting to get some attention. Here are links. https://github.com/RedisInsight/RedisInsight/issues/258#issuecomment-1625633617 https://github.com/RedisInsight/RedisInsight/issues/2290 https://github.com/RedisInsight/RedisInsight/issues/2289 – user13059238 Jul 13 '23 at 17:24
  • @MarkusS. how did you figure out its loading from /api/config? I am trying to enable debug logs with no luck – user13059238 Jul 13 '23 at 17:33
  • I later figured out, that the UI was loading because i previously mapped the application to the root path and the browser had those frontend bundles still cached. So the frontend was still requesting it's data from the root url but the service was not listening at this endpoint (as i changed the ingress to serve the application from /redisinsight). – Markus S. Jul 14 '23 at 09:58
  • 1
    @MarkusS. Ok. Checkout the updated answer above. Hope that works for you too.. – user13059238 Jul 14 '23 at 15:27
  • It kindof worked but now when i try to accept the EULA and Privacy Settings i get the error "Something went wrong submitting your preference." and the popup "Are you behind a proxy? If so, please set the RedisInsight environment variables.". The POST to /redisinsight/api/eula-screen-settings/ fails with a 404 error. /redisinsight is the subpath i configured, so this seems to be correct. – Markus S. Jul 25 '23 at 06:15
  • You prolly already did but just in case - did you configure the environment variables in the solution above? Also I tried some other path than redisinsight - not that it should matter but you never know as debug log doesn't print much to decipher what may be going on under the hood – user13059238 Jul 25 '23 at 20:10