Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Provide a param that can set the web context root path of cryostat-web #1810

Closed
mircea-lemnaru-aera opened this issue Dec 5, 2023 · 6 comments · Fixed by cryostatio/cryostat-web#1175
Assignees
Labels
feat New feature or request user report

Comments

@mircea-lemnaru-aera
Copy link

mircea-lemnaru-aera commented Dec 5, 2023

Current Behavior

Hi all,

We are currently deploying cryostat in k8s and istio.
For the cryostat service we have a VirtualService ( istio ) that will redirect the traffic sent to : http://my-k8-host/cryostat/ to the cryostat service and together with that also rewriting the url to / ( simply removing cryostat )

This works fine when calling http://my-k8-host/cryostat/ and will fetch index.html but the problem is that index.html is containing references to other files that are not prefixed by /cryostat for example:

    <script defer="defer" src="/runtime.20ffed4cb17dadc3.bundle.js"></script>

this will be searched under: http://my-k8-host/runtime.20ffed4cb17dadc3.bundle.js and it's not present there.

Because of this behaviour we are sort of blocked and cannot tell how to resolve this.

The base path of the resources is set to / via <base href="/">
If for example we are to set it to /cryostat/ via <base href="/cryostat/">

Then I believe we can solve this , but we do not have access to change that.

Thank you
Mircea

Expected Behavior

There should be a param CRYOSTAT_WEB_ROOT_PATH or similar that we can provide to the container and that should set the path to : <base href="/"> in the index.html

Steps To Reproduce

  1. Deploy cryostat-operator in a k8s namespace.
  2. Plan to access cryostat and everything related to cryostat under http://myhost/cryostat/

Environment

- OS: NA
- Environment: k8s
- Version: Cryostat 2.3.0

Anything else?

No response

@mircea-lemnaru-aera mircea-lemnaru-aera added bug Something isn't working needs-triage Needs thorough attention from code reviewers labels Dec 5, 2023
@andrewazores andrewazores removed the needs-triage Needs thorough attention from code reviewers label Dec 5, 2023
@andrewazores andrewazores self-assigned this Dec 5, 2023
@andrewazores
Copy link
Member

Hi @mircea-lemnaru-aera , thanks for the report and suggestion. I think this will be fixed in our 3.0 release next year as a side effect of some other deeper changes, but that is a long way away from being released. In the meantime I'll try to implement something that works for the existing 2.x series. It will be too late to make it into the 2.4.0 release, but perhaps this can be in 2.4.1.

@andrewazores andrewazores added feat New feature or request and removed bug Something isn't working labels Dec 5, 2023
@andrewazores andrewazores changed the title [Bug] Provide a param that can set the web context root path of cryostat-web [Request] Provide a param that can set the web context root path of cryostat-web Dec 5, 2023
@andrewazores
Copy link
Member

andrewazores commented Dec 5, 2023

@mircea-lemnaru-aera are you using the Cryostat Operator to help deploy and manage this instance, or are you doing it some other way? I'm wondering if it's enough to put a configuration parameter on just the Cryostat container here, or if this also needs to be configurable through the Cryostat Operator's CRs. I think for simplicity's sake and to target this as a bugfix for a 2.4.1 release I would prefer to keep the change contained to just the one configuration parameter on this container (maybe with a small patch for cryostat-web as well). If it needs to trickle through to configuration on the Operator and Helm chart as well then it's a bit of a bigger scope and might not be suitable for a bugfix update.

@mircea-lemnaru-aera
Copy link
Author

@andrewazores sorry , I missed the message. We are using the operator to deploy the cryostat instance as its easier that way. Nice approach with <base href="./"> didn't know that's possible.

Thanks

@andrewazores
Copy link
Member

@mircea-lemnaru-aera would you be able to test that <base href="./"> change and verify that it works for your case? I think you will still run into the in-app "Not Found" page that I mentioned on that PR, but that seems more like a relatively minor annoyance and should at least unblock you.

Let me know if you need any help getting a container image with that change included, or if you need help with getting the Operator to deploy that. My testing reverse proxy setup is much more primitive than yours so I'm not 100% satisfied that I have solved this case for you :-)

@mircea-lemnaru-aera
Copy link
Author

@andrewazores I again missed the notifications. There seems to be something wrong with my filter settings in gmail. Thanks for taking care of this.
I see that this is planned for 2.4.1 release. Any idea when that will be available to test via the operator ?

Thanks

@andrewazores
Copy link
Member

@mircea-lemnaru-aera no worries!

We don't have a firm timeline for 2.4.1 release yet but our initial estimate would be roughly March.

If you're comfortable using a development image then those are already available: https://quay.io/repository/cryostat/cryostat?tab=tags (2.4.1-snapshot). If you try deploying a development build of the Operator then it will deploy that 2.4.1-snapshot Cryostat image for you. Let us know if you need any help getting that running!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat New feature or request user report
Projects
No open projects
Status: Done
2 participants