Apicurio/apicurio-registry

UI and API can't run on the same hostname

justinaslelys opened this issue · 5 comments

Description

Registry Version: 3.0.2
Persistence type: sql

Both API and UI projects loads resources (css/js) from root path /, so it makes not possible to run both of them on the same hostname as 2.x series.

Environment

Kubernetes 1.28, OpenShift

Steps to Reproduce

  1. Run apicurio-registry and apicurio-registry-api as separate pods
  2. Expose both pods as services
  3. Configure Routes, Route1 with path /apis, Route2 with path /ui and point to corresponding services.
  4. Try loading both UI and API (doc reference) in browser.

Expected vs Actual Behaviour

When you hit both in browser, both don't load correctly, because they both load css/js from root of the hostname, without path. Of course I can create Route3 with path / but only one will work correctly (depending on to which service I will point it), but not both.

I would expect css/js and other assets to be loaded from domain.tld/path/ rather than from domain.tld (where path is /ui or /apis, as their are default in Apicurio, so no additional configurations need to be introduced).

Maybe there is an option to fix that via config, but I cannot find it documented.

Thank you for reporting an issue!

Pinging @EricWittmann to respond or triage.

Yeah the expectation is that the API container image would be deployed at something like registry-api.cluster.mycompany.com and the UI would live at registry.cluster.mycompany.com.

So really not much thought has gone in to how to get them both working on the same domain. The UI does have some configuration to set the context path (so if you can create a route that includes a path, the UI can be configured with the same). But I haven't actually tried it in k8s or openshift, and the CSS and JS might still be expected at the root in any case.

This will require some testing. Thanks for reporting it.

Duplicate/similar:

This should be fixed in PR:

Fixed in #5445