argo-workflows: baseUrl doesnt appear to work
Pre-requisites
- I have double-checked my configuration
- I can confirm the issues exists when I tested with
:latest - I’d like to contribute the fix myself (see contributing guide)
What happened/what you expected to happen?
When running the argo-server, I have added the environment variable BASE_HREF=/argo/. However, when I port-forward the argo-server to localhost, I notice that localhost:8081 still works and redirects to localhost:8081/workflows, and I can navigate the UI. However, if I try to navigate to localhost:8081/argo/ I get Uncaught SyntaxError: Unexpected token '<' (at main.2430295409b8b54e52ad.js:1:1). I confirmed in the logs that argo is picking up the BASE_HREF env var (see logs below), but it just seems to ignore it.
I expected to be able to see the UI on localhost:8081/argo. I am trying to use the BASE_HREF in order to point an nginx instance at the UI.
Here are the logs from the server:
time="2022-12-08T21:27:31.747Z" level=info msg="not enabling pprof debug endpoints"
time="2022-12-08T21:27:31.747Z" level=info authModes="[server client]" baseHRef=/argo/ managedNamespace=quilter-dev-sergiy namespace=quilter-dev-sergiy secure=false ssoNamespace=quilter-dev-sergiy
time="2022-12-08T21:27:31.747Z" level=warning msg="You are running in insecure mode. Learn how to enable transport layer security: https://argoproj.github.io/argo-workflows/tls/"
time="2022-12-08T21:27:31.747Z" level=info msg="SSO disabled"
time="2022-12-08T21:27:31.758Z" level=info msg="Starting Argo Server" instanceID= version=v3.4.3
time="2022-12-08T21:27:31.767Z" level=info msg="Creating event controller" asyncDispatch=false operationQueueSize=16 workerCount=4
time="2022-12-08T21:27:31.769Z" level=info msg="GRPC Server Max Message Size, MaxGRPCMessageSize, is set" GRPC_MESSAGE_SIZE=104857600
time="2022-12-08T21:27:31.770Z" level=info msg="Argo Server started successfully on http://localhost:2746" url="http://localhost:2746"
time="2022-12-08T21:27:51.135Z" level=info duration="80.64µs" method=GET path=index.html size=478 status=0
Version
3.4.3 or latest
Paste a small workflow that reproduces the issue. We must be able to run the workflow; don’t enter a workflows that uses private images.
N/A
Logs from the workflow controller
N/A
Logs from in your workflow’s wait container
N/A
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15
Commits related to this issue
- fix: base href does not work #11401 #10194 #2134 Signed-off-by: Son Bui <sonbv00@gmail.com> — committed to sonbui00/argo-workflows by sonbui00 3 years ago
- fix: base href does not work #11401 #10194 #2134 Signed-off-by: Son Bui <sonbv00@gmail.com> — committed to sonbui00/argo-workflows by sonbui00 3 years ago
I think what some folks might be looking for here is actually
rootpathsupport, which would modify the path Argo actually serves from (and would usually be used in tandem withBASE_HREF).See #7767 which is an open enhancement request for that.
Did a bit more digging and I believe this is working correctly. The logs do show the env var being read and set correctly.
From my comment in #11401:
If you aren’t proxying Argo to a subpath, then setting
BASE_HREFto a subpath would be a misconfiguration. Only setBASE_HREFif you are proxying to a subpath.A port-forward to
localhostis not proxying to a subpath.