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

Allow configuring root path like argocd #3577

Open
3 tasks done
han-steve opened this issue Feb 26, 2025 · 3 comments
Open
3 tasks done

Allow configuring root path like argocd #3577

han-steve opened this issue Feb 26, 2025 · 3 comments

Comments

@han-steve
Copy link

han-steve commented Feb 26, 2025

Checklist

  • I've searched the issue queue to verify this is not a duplicate feature request.
  • I've pasted the output of kargo version, if applicable.
  • I've pasted logs, if applicable.

Proposed Feature

Add a new parameter, rootPath, to allow serving the webapp and api from a different url path. For ArgoCD, we can use the following args to serve the web app at the /argo endpoint:

args:                        
     - /usr/local/bin/argocd-server                                       
     - --insecure                                                   
     - --rootpath=/argo  

Motivation

We currently use the same base url for all of our apps that are behind our reverse proxy. For example, argo cd would be hosted at https://base-url/argo, and kargo would be at https://base-url/kargo. However, without the ability to specify a base path for the backend server, the kargo web app would make request to https://base-url/assets, which wouldn't work with our reverse proxy. We need the request to go to https://base-url/kargo/assets.

Suggested Implementation

Since we serve the frontend and backend from the same go server, we can use argo cd's approach here:
https://github.com/argoproj/argo-cd/blob/c09e6fa6ad2f48017e2d66e65a679226414e6653/server/server.go#L1122

(is there a reason we bundle everything (controller, backend, frontend etc) in the same docker container?)

@danielloader
Copy link

Could your ingress/httpRoute objects not do a path rewrite to strip the prefix?

@han-steve
Copy link
Author

Yes, we can. But the problem is that subsequent requests wouldn’t have the /kargo route, so we don’t know to route them to kargo

@punkwalker
Copy link

Wow, I have been trying to hack it for last 2 days and finally gave up. We need this option to host kargo and other apps behind same proxy. I guess we can also allow something like --basehref for UI.
https://github.com/argoproj/argo-cd/blob/55f8a434d06ee335b195783a0a83c6a7c8dd3078/docs/operator-manual/ingress.md?plain=1#L829

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants