-
Notifications
You must be signed in to change notification settings - Fork 5k
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
feat: support managing cluster resources in a namespaced mode #6581
Conversation
2dcb67a
to
1320020
Compare
Codecov Report
@@ Coverage Diff @@
## master #6581 +/- ##
==========================================
- Coverage 41.30% 40.98% -0.32%
==========================================
Files 156 156
Lines 20702 20865 +163
==========================================
+ Hits 8550 8552 +2
- Misses 10944 11103 +159
- Partials 1208 1210 +2
Continue to review full report at Codecov.
|
1320020
to
fce85b3
Compare
@jessesuen can you take a look please? |
I'm wondering what exactly is the benefit of this mode? Will Argo CD still have to have full cluster level permission for this to work? Is the only benefit that we'd need to watch for changes on less namespaces, as opposed to watch for changes on all namespaces in the cluster? |
Signed-off-by: Alexander Matyushentsev <AMatyushentsev@gmail.com>
fce85b3
to
04e2782
Compare
@jannfis , this change is mostly about performance: Argo CD might be configured to "watch" some namespaces and cluster level resources. This is beneficial if Argo CD is used to manage 1~2 namespaces + CRDs in hundreds of clusters. Additionally full cluster permissions are not required. Admin can provide token that has permissions to required cluster level resources only and required namespaces. Other cluster level resources can be excluded using resource exclusions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Great Job, Argo CD lister pager is using hundred of memory in my situation. But in the previous version, cluster namespaces cannot using because it ignores the white space(none namespaced namespace). I will try the 2.1 version. |
Signed-off-by: Alexander Matyushentsev AMatyushentsev@gmail.com
Closes #4502
Depends on argoproj/gitops-engine#297
PR introduces an additional setting that enables managing cluster-level resources of a cluster in a namespace mode.
The main use case is k8s cluster addons management when one Argo CD deploys platform level app (e.g. ingress controller, argo rollouts/workflows ) into multiple clusters. In this case, Argo needs to manage resources in 2~3 namespaces and CRDs. So it is beneficial to "watch" only some namespaces instead of whole cluster + cluster level resources.
Three additional CLI commands had been added to
argocd-util
:argocd-util cluster namespaces
- prints list of clusters and namespaces managed in each clusterargocd-util cluster namespaces enable-namespaced-mode
- switches clusters into namespaced modeargocd-util cluster namespaces disable-namespaced-mode
- disables namespaced mode