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): Add argocd.argoproj.io/application-set-name to rendered appset applications #13456

Merged
merged 8 commits into from
May 29, 2023

Conversation

MeNsaaH
Copy link
Contributor

@MeNsaaH MeNsaaH commented May 4, 2023

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).
  • The title of the PR conforms to the Toolchain Guide
  • 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).
  • My new feature complies with the feature status guidelines.
  • I have added a brief description of why this PR is necessary and/or what this PR solves.

Please see Contribution FAQs if you have questions about your pull-request.

As part of #13309, this PR adds a new label to all applications generated by appsets. This way, we can list all the apps belonging to an appset by running

argocd app list -l argocd.argoproj.io/appset-instance=app-set-name

closes #13309

@MeNsaaH MeNsaaH changed the title feat: Add app.kubernetes.io/appset-instance to rendered applications feat: Add app.kubernetes.io/appset-instance to rendered appset applications May 4, 2023
@MeNsaaH MeNsaaH force-pushed the appset-instance-label branch from 864d800 to 44b0708 Compare May 4, 2023 18:55
@MeNsaaH MeNsaaH changed the title feat: Add app.kubernetes.io/appset-instance to rendered appset applications feat(appset): Add app.kubernetes.io/appset-instance to rendered appset applications May 4, 2023
@MeNsaaH MeNsaaH force-pushed the appset-instance-label branch 3 times, most recently from 38c6be3 to 820f308 Compare May 4, 2023 22:59
@codecov
Copy link

codecov bot commented May 4, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -0.09 ⚠️

Comparison is base (56d1733) 49.15% compared to head (62a08fd) 49.07%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13456      +/-   ##
==========================================
- Coverage   49.15%   49.07%   -0.09%     
==========================================
  Files         248      250       +2     
  Lines       42902    43248     +346     
==========================================
+ Hits        21090    21225     +135     
- Misses      19694    19892     +198     
- Partials     2118     2131      +13     
Impacted Files Coverage Δ
...cationset/controllers/applicationset_controller.go 62.72% <100.00%> (-0.66%) ⬇️

... and 38 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.

@MeNsaaH MeNsaaH force-pushed the appset-instance-label branch 2 times, most recently from d97acb0 to 45b6bd8 Compare May 5, 2023 15:59
MeNsaaH added 7 commits May 6, 2023 01:13
Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>
Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>
Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>
Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>
Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>
Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>
Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>
@MeNsaaH MeNsaaH force-pushed the appset-instance-label branch from 1122de4 to 430ffc5 Compare May 6, 2023 00:13
Copy link
Member

@blakepettersson blakepettersson left a comment

Choose a reason for hiding this comment

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

This looks reasonable for me at least, at $dayjob we currently work around this by setting our own custom label. Let's see if my sentiment is shared by the others 😄

@crenshaw-dev crenshaw-dev changed the title feat(appset): Add app.kubernetes.io/appset-instance to rendered appset applications feat(appset): Add argocd.argoproj.io/appset-instance to rendered appset applications May 28, 2023
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.

Thanks, @MeNsaaH!

applicationset/controllers/applicationset_controller.go Outdated Show resolved Hide resolved
Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>
@crenshaw-dev crenshaw-dev changed the title feat(appset): Add argocd.argoproj.io/appset-instance to rendered appset applications feat(appset): Add argocd.argoproj.io/application-set-name to rendered appset applications May 29, 2023
@crenshaw-dev crenshaw-dev merged commit 7192eab into argoproj:master May 29, 2023
@MeNsaaH MeNsaaH deleted the appset-instance-label branch May 29, 2023 18:54
yyzxw pushed a commit to yyzxw/argo-cd that referenced this pull request Aug 9, 2023
… appset applications (argoproj#13456)

* Add app.kubernetes.io/appset-instance to rendered applications

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* initialize labels map if nil

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* Fix tests

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* Fix tests

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* Fix tests

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* fix tests

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* Fix tests

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* Updated label ->argocd.argoproj.io/application-set-name

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

---------

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>
@dyatlov
Copy link

dyatlov commented Aug 29, 2023

This PR introduced a regression: #15282
It is no longer possible to have ApplicationSets with names longer than 63 chars.

I don't think forcing a custom label for an application was a good idea in the first place, honestly:

  1. because of the issue above
  2. because ApplicationSet is not creating applications synchronously and argocd app list -l argocd.argoproj.io/appset-instance=app-set-name (or its API analogue) can provide an incomplete view (especially if part of the applications are created and another part are not - which is the case for the issue above)

A better approach is to add wanna-be generated application names into ApplicationSet resource itself.
A much better approach is to also include application sync statuses next to application names within a given ApplicationSet.

tesla59 pushed a commit to tesla59/argo-cd that referenced this pull request Dec 16, 2023
… appset applications (argoproj#13456)

* Add app.kubernetes.io/appset-instance to rendered applications

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* initialize labels map if nil

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* Fix tests

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* Fix tests

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* Fix tests

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* fix tests

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* Fix tests

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

* Updated label ->argocd.argoproj.io/application-set-name

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>

---------

Signed-off-by: Mmadu Manasseh <mmadumanasseh@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

argo cli should be able to show all apps of an appset
4 participants