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

feat(appset): ApplicationSet in any namespace #12378

Merged
merged 37 commits into from
Jun 27, 2023

Conversation

speedfl
Copy link
Contributor

@speedfl speedfl commented Feb 9, 2023

Signed-off-by: gmuselli geoffrey.muselli@gmail.com

Closes #10655

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:

  • Either (a) I've created an enhancement proposal and discussed it with the community, (b) this is a bug fix, or (c) this does not need to be in the release notes.
  • The title of the PR states what changed and the related issues number (used for the release note).
  • I've included "Closes [ISSUE #]" or "Fixes [ISSUE #]" in the description to automatically close the associated issue.
  • I've updated both the CLI and UI to expose my feature, or I plan to submit a second PR with them.
  • Does this PR require documentation updates?
  • I've updated documentation as required by this PR.
  • Optional. My organization is added to USERS.md.
  • I have signed off all my commits as required by DCO
  • I have written unit and/or e2e tests for my change. PRs without these are unlikely to be merged.
  • My build is green (troubleshooting builds).

@codecov
Copy link

codecov bot commented Feb 14, 2023

Codecov Report

Patch coverage: 59.21% and no project coverage change.

Comparison is base (771012b) 49.64% compared to head (fec35ea) 49.65%.

Additional details and impacted files
@@           Coverage Diff            @@
##           master   #12378    +/-   ##
========================================
  Coverage   49.64%   49.65%            
========================================
  Files         257      258     +1     
  Lines       43948    44423   +475     
========================================
+ Hits        21820    22060   +240     
- Misses      19981    20193   +212     
- Partials     2147     2170    +23     
Impacted Files Coverage Δ
cmd/argocd/commands/app.go 21.81% <0.00%> (ø)
cmd/argocd/commands/app_actions.go 0.00% <0.00%> (ø)
cmd/argocd/commands/app_resources.go 9.55% <0.00%> (ø)
pkg/apiclient/apiclient.go 1.19% <0.00%> (ø)
pkg/apis/application/v1alpha1/types.go 59.11% <ø> (-0.57%) ⬇️
server/application/terminal.go 12.67% <0.00%> (ø)
cmd/argocd/commands/applicationset.go 16.33% <19.23%> (-0.72%) ⬇️
.../apis/application/v1alpha1/applicationset_types.go 31.25% <25.00%> (+0.13%) ⬆️
...cationset/controllers/applicationset_controller.go 62.35% <50.00%> (-0.37%) ⬇️
server/applicationset/applicationset.go 60.24% <85.18%> (ø)
... and 8 more

... and 6 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@speedfl
Copy link
Contributor Author

speedfl commented Feb 15, 2023

@crenshaw-dev
Copy link
Member

@speedfl I haven't dived into this yet, but: for appsets outside of the argocd namespace, how will secrets such as GitHub API tokens be resolved? Will we look for them in the argocd namespace or in the AppSet's namespace?

@speedfl
Copy link
Contributor Author

speedfl commented Feb 15, 2023

@crenshaw-dev you are right, it will take the secrets into the argocd namespace.

It can represent a security concern however after thinking about it I arrived to this conclusion:

  • If people wants to share the tokens / clusters they can use this model
  • if people doesn't want to share the tokens / clusters they can still deploy in namespace mode

Maybe an addendum in the doc could be required

@crenshaw-dev
Copy link
Member

@speedfl yep I think good documentation should do the trick.

I need to implement a change to allow-list SCMs so folks can't exfiltrate secrets by setting api: https://server-i-own.bad.

@speedfl
Copy link
Contributor Author

speedfl commented Feb 16, 2023

@crenshaw-dev I pushed an update on the documentaion

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>
Signed-off-by: Geoffrey Muselli <geoffrey.muselli@gmail.com>
@robertvarjasi
Copy link

Can you guys do the review? We would like to leverage this feature.

@crenshaw-dev
Copy link
Member

@robertvarjasi probably not in time for 2.7. I'll set it to target 2.8.

@alexbde
Copy link
Contributor

alexbde commented Apr 6, 2023

@crenshaw-dev will the issue #11104 also be fixed within this PR? It would be great if we could decide to have App Sets in the one namespace and generated Applications in another one.

@speedfl
Copy link
Contributor Author

speedfl commented Apr 12, 2023

@alexbde I would prefer to go incremental. I can work on #11104 later

@ishitasequeira ishitasequeira self-requested a review May 2, 2023 18:33
speedfl added 2 commits May 2, 2023 18:17
Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>
@iandelahorne
Copy link
Contributor

Looking forward to this in a coming release, we leverage apps in any namespace and just now ran into not being able to use appsets in any namespace

@speedfl
Copy link
Contributor Author

speedfl commented May 17, 2023

Hi @crenshaw-dev could we set the milestones for this one to 2.8 ? I think this one is really a big added values. Even more than full templating as it allows to use applicationset without being an admin :)

@crenshaw-dev
Copy link
Member

it allows to use applicationset without being an admin :)

I don't think this is entirely true yet. Non-admin users could use appsets to exfiltrate secrets, including the Argo CD API Server key, used to sign JWTs. They could exfiltrate that secret and then use it to sign themselves an admin JWT.

@speedfl speedfl requested a review from crenshaw-dev June 7, 2023 12:24
@speedfl
Copy link
Contributor Author

speedfl commented Jun 7, 2023

@crenshaw-dev @ishitasequeira I fixed everything 👍

@crenshaw-dev crenshaw-dev self-assigned this Jun 20, 2023
@speedfl
Copy link
Contributor Author

speedfl commented Jun 21, 2023

@crenshaw-dev I looked at #9353 content. It looks really clear.
Do you want me to treat it as part of this PR so that applicationset can be fully delivered as non admin ready ?

@crenshaw-dev
Copy link
Member

@speedfl maybe as a new PR based on this one? Wanna make sure nothing slows down this PR, so we can definitely get it into 2.8.

@speedfl
Copy link
Contributor Author

speedfl commented Jun 21, 2023

Ok I will fix conflict as soon as possible!

speedfl added 5 commits June 22, 2023 06:35
Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>
Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>
Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>
Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>
@speedfl
Copy link
Contributor Author

speedfl commented Jun 22, 2023

All done @crenshaw-dev

Copy link
Member

@crenshaw-dev crenshaw-dev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small things, I hope. :-)

speedfl and others added 6 commits June 22, 2023 18:08
Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
@crenshaw-dev crenshaw-dev merged commit e8f5126 into argoproj:master Jun 27, 2023
@speedfl
Copy link
Contributor Author

speedfl commented Jun 27, 2023

Thanks a lot @crenshaw-dev 🙂

yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
* 12107: ApplicationSet in any namespaces

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: fix build

Signed-off-by: Geoffrey Muselli <geoffrey.muselli@gmail.com>

* 12107: Fix lint

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix After review 2

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix After review 2

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix after rebase

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix syncspolicy after rebase

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix tests labels

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix tests labels 2

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix after review

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* match existing appset controller arg pattern

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* remove unused env var

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>
Signed-off-by: Geoffrey Muselli <geoffrey.muselli@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
* 12107: ApplicationSet in any namespaces

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: fix build

Signed-off-by: Geoffrey Muselli <geoffrey.muselli@gmail.com>

* 12107: Fix lint

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix After review 2

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix After review 2

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix after rebase

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix syncspolicy after rebase

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix tests labels

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix tests labels 2

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* 12107: Fix after review

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>

* match existing appset controller arg pattern

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

* remove unused env var

Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>

---------

Signed-off-by: gmuselli <geoffrey.muselli@gmail.com>
Signed-off-by: Geoffrey Muselli <geoffrey.muselli@gmail.com>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Completed
Development

Successfully merging this pull request may close these issues.

Multi-namespace support for applicationset
5 participants