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 expressing the namespace list with a label selector #1118

Open
raffaelespazzoli opened this issue Dec 19, 2023 · 3 comments
Open

allow expressing the namespace list with a label selector #1118

raffaelespazzoli opened this issue Dec 19, 2023 · 3 comments

Comments

@raffaelespazzoli
Copy link

if your feature request is a large change and requires a formal proposal or design doc, please read the docs for contributing first. You may need to submit an additional Pull Request using the enhancement proposal template.

Is your feature request related to a problem? Please describe.
When deploying ArgoCD in the Applications in any namespace mode, one has to specify a static array of namespace spaces.
In many cases the namespaces that ArgoCD should watch will be dynamically changing. Let's think for example about the use case in which these namespaces represent teams or applications that are being on-boarded to the platform. They will come and go.
So one has too constantly update that static array.

Describe the solution you'd like
I'd like to have the option of expressing the list of namespaces that should be watched by ArgoCD as a label selector. This would be very idiomatic in Kubernetes.

Describe alternatives you've considered
I have not found a good gitops-friendly alternative. One would have to drop to imperative automation and trigger a job to update that list every time one of the namespace is created or destroyed.

@etsauer
Copy link

etsauer commented Feb 2, 2024

we are running into this same limitation right now as well. onboarding teams/apps into specific namespaces, we can do everything with declarative automation driven by labels on a namespace. The only thing we can't do is update that sourceNamespaces list without a separate PR against our ArgoCD instance.

@svghadi
Copy link
Collaborator

svghadi commented Feb 16, 2024

Thanks for creating enhancement request @raffaelespazzoli. For such use-cases, applications in any namespace supports wildcards. Have you explored that option?

The --application-namespaces parameter takes a comma-separated list of namespaces where Applications are to be allowed in. Each entry of the list supports shell-style wildcards such as *, so for example the entry app-team-* would match app-team-one and app-team-two. To enable all namespaces on the cluster where Argo CD is running on, you can just specify *, i.e. --application-namespaces=*.

@BronzeDeer
Copy link

Potentially relevant/related argoproj/argo-cd#19895

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

No branches or pull requests

4 participants