-
Notifications
You must be signed in to change notification settings - Fork 56
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
Add support for template-based label/annotation matching #193
Comments
your alternative #1 would be my recommendation for this use case. Can you explain in which sense it is less precise? |
If I just check that a label with the key |
I am not sure I fully understand the use case. But it looks like you need to be able to do two things:
It also seems like you are trying to discriminate between tenant and system namespace with a label |
The use case is a platform-as-a-service where each tenant gets their own Argo CD server. The Argo CD server is in its own namespace so that it doesn't use the same resource quota as the resources in the namespace itself, and also because teams may want to be able to configure separate access control for deployment and development. So it's not that we're using the namespace configuration operator to create the namespace, it's that we're using it to create an additional, companion namespace. For realising this with selectors I tried these options:
This proposal is essentially to create an option 4, to be able to do this with a single label. I went with option 3 for now, but the |
Use case
When creating namespace configurations, there are scenarios where we want to match labels/annotations based on dynamic values derived from the namespace itself.
For example, a common pattern is to have ArgoCD instances managing namespaces where the instance name is derived from the namespace name:
Currently, we can't create a NamespaceConfig that matches based on this pattern without requiring additional trigger labels.
Proposed solution
Add a new field to the NamespaceConfig spec for template-based matching:
This would allow the operator to:
Benefits
Alternatives considered
Exists
operator - less precise, can't validate naming conventionWould this feature be valuable to the project? Happy to provide more details or discuss alternative approaches.
The text was updated successfully, but these errors were encountered: