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: add the ability to filter apps based on clusters #10465
Conversation
The test result: $ ./dist/argocd app list -c https://10.29.8.20:16443
NAME CLUSTER NAMESPACE PROJECT STATUS HEALTH SYNCPOLICY CONDITIONS REPO PATH TARGET
argocd/guestbookproj https://10.29.8.20:16443 kube-public test OutOfSync Healthy <none> SharedResourceWarning(2) https://gitlab.daocloud.cn/xin.li/argocd-example.git guestbook
$
$ ./dist/argocd app list --cluster https://kubernetes.default.svc
NAME CLUSTER NAMESPACE PROJECT STATUS HEALTH SYNCPOLICY CONDITIONS REPO PATH TARGET
argocd/apps https://kubernetes.default.svc default default OutOfSync Progressing <none> <none> https://gitlab.daocloud.cn/xin.li/argocd-example.git apps HEAD
argocd/guestbook https://kubernetes.default.svc default default Synced Healthy Auto <none> https://gitlab.daocloud.cn/xin.li/argocd-example.git guestbook HEAD
argocd/guestbook-helm https://kubernetes.default.svc default default Synced Healthy <none> <none> https://gitlab.daocloud.cn/xin.li/argocd-example.git helm-guestbook HEAD
argocd/guestbook-pub https://kubernetes.default.svc kube-public default Synced Healthy <none> <none> https://gitlab.daocloud.cn/xin.li/argocd-example.git guestbook
argocd/test https://kubernetes.default.svc default default Synced Healthy <none> <none> https://gitlab.daocloud.cn/xin.li/argocd-example.git helm-hooks
|
Codecov Report
@@ Coverage Diff @@
## master #10465 +/- ##
==========================================
- Coverage 45.78% 45.67% -0.11%
==========================================
Files 233 234 +1
Lines 28383 28518 +135
==========================================
+ Hits 12995 13027 +32
- Misses 13614 13704 +90
- Partials 1774 1787 +13
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
ca2545e
to
1d57e8a
Compare
Hi @jannfis, Can you review this PR? Thanks |
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
cmd/argocd/commands/app.go
Outdated
@@ -1293,6 +1296,7 @@ func NewApplicationListCommand(clientOpts *argocdclient.ClientOptions) *cobra.Co | |||
command.Flags().StringArrayVarP(&projects, "project", "p", []string{}, "Filter by project name") | |||
command.Flags().StringVarP(&repo, "repo", "r", "", "List apps by source repo URL") | |||
command.Flags().StringVarP(&appNamespace, "app-namespace", "N", "", "Only list applications in namespace") | |||
command.Flags().StringVarP(&cluster, "cluster", "c", "", "List apps by cluster") |
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.
Thanks for this @my-git9! Can you update this string to clarify that either a URL or cluster name is acceptable?
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.
Updated.Do you think this is ok?
Signed-off-by: xin.li <xin.li@daocloud.io>
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.
Thanks @my-git9!
Signed-off-by: xin.li <xin.li@daocloud.io> Signed-off-by: xin.li <xin.li@daocloud.io>
Add the ability to filter apps based on clusters
Note on DCO:
If the DCO action in the integration test fails, one or more of your commits are not signed off. Please click on the Details link next to the DCO action for instructions on how to resolve this.
Checklist: