argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.98k stars 5.47k forks source link

ArgoCd Server args --rootpath and --basehref not working for some UI elements #14857

Open oisin88 opened 1 year ago

oisin88 commented 1 year ago

Summary:

Theese args not working for the following UI elemnts.

  1. Documentation --> Open API docs
  2. Open application in new tab. e.g On mac Command +click panel.
  3. Maybe others?

The URLs for clicking these UI components do not include "baseref".

These docs describe these args:

https://argo-cd.readthedocs.io/en/stable/operator-manual/ingress/#:~:text=NOTE%3A%20The%20flag%20%2D%2Drootpath%20changes%20both%20API%20Server%20and%20UI%20base%20URL.%20Example%20nginx.conf%3A

Steps to Recreate:

  1. Download the standard Argo install. https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml

  2. Add the Guestbook sample App.

  3. Update the ArgoCd Server Args with the following:

    - name: ARGOCD_SERVER_BASEHREF
      value: /foo/bar
    - name: ARGOCD_SERVER_ROOTPATH
      value: /foo/bar 
  4. Apply the Updated Manifest.

  5. The sever starts at https://localhost:8080/foo/bar at expected.

Screenshot 2023-08-02 at 17 08 42

  1. However when I try to open Guestbook in new tab. CMD+ clcik on mac. I get not found becuase the URl is wrong.

Screenshot 2023-08-02 at 17 34 25

The URL https://localhost:8080/applications/argocd/guestbook?view=tree does not have /foo/bar in it.

  1. I see the same when I click on API docs.

Screenshot 2023-08-02 at 17 36 13

The URL https://localhost:8080/swagger-ui

does not have foo/bar

I would have a try at fixing but I am not a front end engineer.

Thanks, Oisin

oisin88 commented 1 year ago

found a similar issue:

https://github.com/argoproj/argo-cd/issues/6548