[Bug]: Can't get Redisinsight to work behind Ingress
arcarmona opened this issue · comments
Preconditions (Any important steps we need to know)
I am working on GKE using redisinsight:latest and an nginx ingress.
Steps to reproduce (How to reproduce what you found step by step)
Deployed redisinsight:
# RedisInsight service with name 'redisinsight-service'
apiVersion: v1
kind: Service
metadata:
name: redisinsight-service # name should not be 'redisinsight'
# since the service creates
# environment variables that
# conflicts with redisinsight
# application's environment
# variables `RI_APP_HOST` and
# `RI_APP_PORT`
spec:
type: ClusterIP
ports:
- port: 5540
targetPort: 5540
selector:
app: redisinsight
---
# RedisInsight deployment with name 'redisinsight'
apiVersion: apps/v1
kind: Deployment
metadata:
name: redisinsight #deployment name
labels:
app: redisinsight #deployment label
spec:
replicas: 1 #a single replica pod
selector:
matchLabels:
app: redisinsight #which pods is the deployment managing, as defined by the pod template
template: #pod template
metadata:
labels:
app: redisinsight #label for pod/s
spec:
containers:
- name: redisinsight #Container name (DNS_LABEL, unique)
image: redis/redisinsight:latest #repo/image
env:
- name: "RITRUSTEDORIGINS"
value: "https://myingresspath.com/redisinsight"
- name: "RIPROXYENABLE"
value: "true"
#- name: "RIAUTHPROMPT"
# value: "true"
- name: "RIPROXYPATH"
value: "/redisinsight"
imagePullPolicy: IfNotPresent #Installs the latest RedisInsight version
volumeMounts:
- name: redisinsight #Pod volumes to mount into the container's filesystem. Cannot be updated.
mountPath: /data
ports:
- containerPort: 5540 #exposed container port and protocol
protocol: TCP
volumes:
- name: redisinsight
emptyDir: {}
Added redisinsight to ingress:
- backend:
service:
name: haproxy-routing
port:
number: 5540
path: /redisinsight/?(.*)
pathType: ImplementationSpecific
Actual behavior (A short description of what you found)
The page loads blank and when inspecting (see screenshot below) the page, there seems to be an issue with the assets, they are trying to load at https://myingresspath.com/{asset} instead of https://myingresspath.com/redisinsight/{asset} where I have tested they actually load. This might be causing the issue but so far I havent managed to fix it.
Expected behavior (A short description of what you expected to find)
What I expected is for the app to work fine through https://myingresspath.com/redisinsight . I achieved this following the advice in this stack overflow post (which I believe also originates from an issue here) but only for the image redislabs/redisinsight:1.14.0, I haven't been able to recreate for v2.
Screenshots (Paste or drag-and-drop a screenshot or a link to a recording)
Additional context (Operating system, version of RedisInsight, Redis database version, Redis module version, database type, connection type, logs, or any other information)
@arcarmona , currently, there is no subproxy support for RedisInsight (aka v2), we are planning to add it in one of the upcoming releases (most probably, in the March release).
That explains it, thanks for the answer! Looking forward to its release then!