🐛 redhat-argocd: app-namespace issues
Workspace
redhat-argocd
📜 Description
a)
when using argocd/app-namespace (with argocd/app-selector annotations) href links to ArgoCD in ArgocdDeploymentSummary and DeploymentLifeCycle are missing namespace in url.
b)
Why app-namespace only works with argocd/app-selector and not with argocd/app-name?
👍 Expected behavior
a)
link should include namespace in url: https://<argocdurl>/applications/<namespace name>/appname
b)
argocd/app-namespace and argocd/app-project should be possible with argocd/app-name
👎 Actual Behavior with Screenshots
👟 Reproduction steps
use Applications in any Namespace in app-config.yaml
argocd:
baseUrl: https://${ARGOCD_URL}
namespacedApps: true
appLocatorMethods:
- type: 'config'
instances:
- name: main
url: https://${ARGOCD_URL}
token: ${ARGOCD_AUTH_TOKEN}
📃 Provide the context for the Bug.
No response
👀 Have you spent some time to check if this bug has been raised before?
- [x] I checked and didn't find similar issue
🏢 Have you read the Code of Conduct?
- [x] I have read the Code of Conduct
Are you willing to submit PR?
No, I don't have time to work on this right now
The issue involving the URL seems to come from here: https://github.com/backstage/community-plugins/blob/main/workspaces/redhat-argocd/plugins/argocd/src/components/DeploymentLifeCycle/DeploymentLifecycleHeader.tsx#L28-L34
It looks like it tries to build a URL using the instance name from the metadata, but looking at the actual ArgoCD API that doesn't actually exist. Once we can build the URL then we can append the namespace.
This will need to get added to the backend, similar to how RoadieHQ does it for their plugin: https://github.com/RoadieHQ/roadie-backstage-plugins/blob/main/plugins/backend/backstage-plugin-argo-cd-backend/src/service/argocd.service.ts#L318-L327
The second one is an easy fix, the backend just doesn't pick up the appNamespace or project query params when fetching an app by name: https://github.com/backstage/community-plugins/blob/main/workspaces/redhat-argocd/plugins/argocd-backend/src/router.ts#L90-L99
Re-opening (I think it auto-closed?), still need to merge #3990
Both PRs have been merged and the changes are on NPM. Closing, reopen if needed.