litmuschaos / litmus

Litmus helps SREs and developers practice chaos engineering in a Cloud-native way. Chaos experiments are published at the ChaosHub (https://hub.litmuschaos.io). Community notes is at https://hackmd.io/a4Zu_sH4TZGeih-xCimi3Q
https://litmuschaos.io
Apache License 2.0
4.44k stars 698 forks source link

Run Litmus behind reverse-proxy #3323

Open dorroddorrod opened 3 years ago

dorroddorrod commented 3 years ago

Question

Hi, I would like to deploy Litmus in one of my EKS clusters, All of my infra applications run's on the same domain but different path (www.example.com/<<app>>) by using nginx-ingress controller

When trying to load Litmus, the frontend app is trying to get static content from www.example.com/ and i would like to know if there is a way to set BaseURL to Litmus to load the client with /litmus . (something like this https://argoproj.github.io/argo-workflows/argo-server/#base-href)

Screen Shot 2021-11-01 at 10 20 57

imrajdas commented 3 years ago

Hi @dorroddorrod, currently, it is possible to run the frontend in a "/litmuschaos" path. You just need to replace frontend's docker image with litmuschaos/litmusportal-frontend-path-litmuschaos:<version>

Please note, only "/litmuschaos" path is possible with this image.

dorroddorrod commented 3 years ago

Cool ! thanks for the quick response :)

dorroddorrod commented 3 years ago

@rajdas98 After changing the default image to litmuschaos/litmusportal-frontend-path-litmuschaos:<version> I'm getting the following error from the subscriber pod

***@IL-C02FF8LHMD6P ~ % kubectl logs -f subscriber-6cb89f4d97-r2vcl -n litmus
time="2021-11-04T12:08:37Z" level=info msg="Go Version: go1.16.9"
time="2021-11-04T12:08:37Z" level=info msg="Go OS/Arch: linux/amd64"
time="2021-11-04T12:08:37Z" level=info msg="all deployments up"
time="2021-11-04T12:08:37Z" level=info msg="all components live...starting up subscriber"
time="2021-11-04T12:08:37Z" level=fatal msg="failed to parse cluster confirm data" data="<html>\r\n<head><title>405 Not Allowed</title></head>\r\n<body>\r\n<center><h1>405 Not Allowed</h1></center>\r\n<hr><center>nginx/1.18.0</center>\r\n</body>\r\n</html>\r\n" error="invalid character '<' looking for beginning of value"

Any idea's ?

dorroddorrod commented 2 years ago

Hi, Still getting this error with the latest version (2.4.0 )

kubectl logs -f subscriber-6ff65bc955-w8g69 -n litmus 

time="2022-01-09T10:39:25Z" level=info msg="Go Version: go1.16.12"
time="2022-01-09T10:39:25Z" level=info msg="Go OS/Arch: linux/amd64"
time="2022-01-09T10:39:25Z" level=info msg="all deployments up"
time="2022-01-09T10:39:25Z" level=info msg="all components live...starting up subscriber"
time="2022-01-09T10:39:26Z" level=fatal msg="failed to parse cluster confirm data" data= error="unexpected end of JSON input"
SteamSpoon commented 1 month ago

This is still an issue - is the base URL configurable?

I see that litmuschaos/litmusportal-frontend-path-litmuschaos is still being pushed but as of v3.11.0 it is identical to the normal version.