Open OpenGuidou opened 1 week ago
The behavior you are observing is actually due to the naming convention required when creating applications in a specific namespace via the UI. As per the documentation, the application name must follow the namespace/app format to indicate the target namespace explicitly. Please refer to this doc app-any-namespace .
Thanks for the info. It's not optimal in terms of user experience, but that works.
However, there should still be the check on the allowed namespaces in which the user can deploy the application.
I agree, the user experience could be better. Since this behaviour is working as intended, I suggest changing the label to feature instead of a bug and also updating the title. Adding a check for allowed namespaces would be a great enhancement!
I would rather fix the missing check as a bug, and provide a better user experience via an additional option to provide the application namespace in the UI and the CLI as a feature
for cli, you can use the flag --app-namespace. here is the doc https://argo-cd.readthedocs.io/en/stable/user-guide/commands/argocd_app_create/
Checklist:
argocd version
.Describe the bug
When creating an app from the UI, it is not possible to provide the namespace in which the app will be created. It's always created in argo-cd's namespace.
Even when going to the yaml view and setting the namespace, it's overrided and created in the argo-cd namespace anyway.
Furthermore, it is not checking the project settings to know if it's ok to deploy in Argo-cd namespace. I've set the
spec.sourceNamespaces
in the project to reference only the other namespace (not the argo-cd one), and the app is created without issue.To Reproduce
not-argo-namespace
application-namespaces=not-argo-namespace
preventing to use argo-cd namespacespec.sourceNamespace
in the default project tonot-argo-namespace
Expected behavior
We should be able to select the authorized namespaces in which to create the App. If by any mean we set one not in the application-namespaces nor in the project sourceNamespace, it should be rejected.
Version
2.13
Logs