argoproj / argo-cd

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

Change sync window application assignment to use rules. #2528

Open adamjohnson01 opened 5 years ago

adamjohnson01 commented 5 years ago

Summary

Sync windows are currently assigned to applications by either application name, namespace or cluster. The suggestion in #2506 to support using labels is great and I think that to do that properly we should change the way the matching works.

Motivation

This will allow a much greater granularity when assigning windows. Currently there is no way of assigning only the applications that match both application name and a specified namespace or cluster.

Proposal

It is suggested in #2506 that we follow the pattern used in kubernetes label selectors when adding label support but I think that we should follow this pattern for all matching not just for labels.

We could then have rules like the following and each rule would only match if all conditions within the rule are met.

ID Rule 0 label role in (stateful), namespace notIn (production) 1 namespace notIn (dev-*), cluster in (in-house1, aws1) 2 label sync exists, namespace in (production)

voidengineer commented 1 week ago

Is this still going to happen?