Ethan Brown
04/03/2024, 6:01 PMBASE_URL
value in flyteconsole was at one point intended to be settable at runtime. See original commit at https://github.com/flyteorg/flyte/commit/506408bb4d23287b9f0e1ab76af432aaa44dbd91#diff-bbb462dd82add45799ac05fd25[…]8c07651b2612af98aa2e3a2f79f58R68
However, BASE_URL
is used not only at runtime, but also at build time in flyteconsole at https://github.com/flyteorg/flyteconsole/blob/master/Dockerfile#L22
To double check things, I tried setting BASE_URL
but all the javascript resources inside the image were still looking for assets at /console
rather than the value I set.
Should this one be filed as a bug? Or is this not supported any longer?Ethan Brown
04/04/2024, 5:22 AMBASE_URL
to hardcode the correct paths into index.html for all the links to webpack scripts -- i.e. /flyte/console
• Making sure to set that same value at runtime on the container (if it's set to the default of /console
the web app misbehaves)
• Additionally setting BASE_HREF
in the console container (otherwise the uris in the browser history are wrong, and reloading the page will fail)
• Set the ADMIN_API_URL
to point to the right place - like <https://foo.com/flyte>
• Updating the ingress to add the subpath support... carefully.
◦ The console endpoints must remain intact - so requests from /flyte/console
must go to /flyte/console
in flyteconsole service
◦ The API endpoints must be rewritten by the ingress -- so requests to /flyte/api/...
must be rewritten as /api/...
for all the API endpoints
This could be made a lot simpler... but I don't see a good way around setting all this configuration like this right now (primarily b/c the console build process uses static absolute paths rather than relative)Ethan Brown
04/04/2024, 7:25 PM/console
is hardcoded -- https://github.com/flyteorg/flyteconsole/blob/34edde1cb2c7df2f77da6f9fabdefbe2d89c6353/packages/common/src/routes/index.ts#L25
I'm going to fork / build from that fork to confirmEthan Brown
04/04/2024, 7:28 PMRichard Liu
04/04/2024, 7:36 PM/console
)