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

Add project Filter to argocd app sync sub-dommand #8320

Closed
justinwatkinson opened this issue Jan 30, 2022 · 0 comments · Fixed by #10133
Closed

Add project Filter to argocd app sync sub-dommand #8320

justinwatkinson opened this issue Jan 30, 2022 · 0 comments · Fixed by #10133
Assignees
Labels
component:cli Affects the Argo CD CLI enhancement New feature or request

Comments

@justinwatkinson
Copy link
Contributor

Summary

The argocd app list command supports adding a --project filter, in addition to the selector argument. This will allow users of the CLI to avoid additional looping by having to first issue an argocd app list (with project filter) to get a list of unique Applications names, then separately call argocd app sync.

Motivation

This will make the CLI operation more consistent and allow a similar set of arguments to be used for both sub-command options.

Proposal

It looks like the struct on the L1339 of the link below can just have the Projects []string populated. To keep it consistent, it would continue to support multiple just like the list sub-command

Ref to Sync app name generation (struct is on L1339):

if selector != "" {
list, err := appIf.List(context.Background(), &applicationpkg.ApplicationQuery{Selector: selector})

Ref to App list:

if len(projects) != 0 {

@justinwatkinson justinwatkinson added the enhancement New feature or request label Jan 30, 2022
@chetan-rns chetan-rns added the component:cli Affects the Argo CD CLI label Jan 31, 2022
@chetan-rns chetan-rns self-assigned this Jan 31, 2022
crenshaw-dev pushed a commit that referenced this issue Aug 8, 2022
* feat: add projects filter to app sync command

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* test: add e2e sync by project

Signed-off-by: Justin Watkinson <justin.watkinson@gmail.com>

* Retrigger CI pipeline

Signed-off-by: Justin Watkinson <justin.watkinson@gmail.com>

Co-authored-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
ashutosh16 pushed a commit to ashutosh16/argo-cd that referenced this issue Aug 11, 2022
…oj#10133)

* feat: add projects filter to app sync command

Signed-off-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>

* test: add e2e sync by project

Signed-off-by: Justin Watkinson <justin.watkinson@gmail.com>

* Retrigger CI pipeline

Signed-off-by: Justin Watkinson <justin.watkinson@gmail.com>

Co-authored-by: Chetan Banavikalmutt <chetanrns1997@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:cli Affects the Argo CD CLI enhancement New feature or request
Projects
None yet
2 participants