feat(appset): add progressive sync strategy CRDS#15313
feat(appset): add progressive sync strategy CRDS#15313alexymantha wants to merge 7 commits intoargoproj:masterfrom
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #15313 +/- ##
==========================================
+ Coverage 49.88% 49.92% +0.03%
==========================================
Files 263 263
Lines 45204 45275 +71
==========================================
+ Hits 22549 22602 +53
- Misses 20439 20453 +14
- Partials 2216 2220 +4 ☔ View full report in Codecov by Sentry. |
1d71ceb to
315aff0
Compare
commit 315aff0 Merge: effd359 ef7f32e Author: Alexy Mantha <alexy@mantha.dev> Date: Thu Aug 31 17:05:33 2023 -0700 Merge branch 'master' into add-syncstrategy commit effd359 Author: Alexy Mantha <alexy.mantha@goto.com> Date: Thu Aug 31 19:55:56 2023 -0400 add tests commit 0b4e77d Author: Alexy Mantha <alexy.mantha@goto.com> Date: Thu Aug 31 16:32:09 2023 -0400 fix tests commit 461046b Merge: d670109 dd49e22 Author: Alexy Mantha <alexy.mantha@goto.com> Date: Thu Aug 24 17:01:21 2023 -0400 Merge branch 'master' into add-syncstrategy commit d670109 Author: Alexy Mantha <alexy.mantha@goto.com> Date: Thu Aug 24 16:41:49 2023 -0400 add clusterkind commit f398c57 Author: Alexy Mantha <alexy.mantha@goto.com> Date: Mon Aug 21 23:31:37 2023 -0400 add clustersyncstrategy commit df5ad7d Merge: ac86c16 bfaac2b Author: Alexy Mantha <alexy.mantha@goto.com> Date: Tue Aug 15 21:09:27 2023 -0400 Merge branch 'master' into add-syncstrategy commit ac86c16 Author: Alexy Mantha <alexy.mantha@goto.com> Date: Thu Aug 10 18:04:13 2023 -0400 changes from codegen commit 587f866 Author: Alexy Mantha <alexy.mantha@goto.com> Date: Thu Aug 10 17:35:08 2023 -0400 fix naming conflict commit 21f58e5 Author: Alexy Mantha <alexy.mantha@goto.com> Date: Thu Aug 10 16:11:27 2023 -0400 Changes from codegen commit bbb7de8 Merge: 89b2ba9 c31da64 Author: Alexy Mantha <alexy.mantha@goto.com> Date: Thu Aug 10 16:09:41 2023 -0400 Merge branch 'master' into add-syncstrategy commit 89b2ba9 Author: Alexy Mantha <alexy.mantha@goto.com> Date: Wed Aug 9 17:21:23 2023 -0400 wip commit 110bda5 Author: Alexy Mantha <alexy.mantha@goto.com> Date: Wed Aug 9 13:26:20 2023 -0400 wip Signed-off-by: Alexy Mantha <alexy@mantha.dev>
315aff0 to
00d0a3e
Compare
Signed-off-by: Alexy Mantha <alexy@mantha.dev>
| // SyncStrategy controls the manner in which a sync is performed | ||
| type SyncStrategy struct { | ||
| // SyncOperationStrategy controls the manner in which a sync is performed | ||
| type SyncOperationStrategy struct { |
There was a problem hiding this comment.
I had to rename this because it was colliding the SyncStrategy CRD. I considered using ApplicationSetSyncStrategy for the CRD and leaving this one as SyncStrategy but I think it is better to have SyncStrategy as the front-facing CRD and have the longer name for this internal type. Open to suggestions
| var spec *argov1alpha1.SyncStrategySpec | ||
| if ref.Kind == application.ClusterSyncStrategyKind { | ||
| css := &argov1alpha1.ClusterSyncStrategy{} | ||
| err := r.Get( |
There was a problem hiding this comment.
You might have to update the default argocd ClusterRole/Role to explicitly add this. It makes it easier for people with custom roles other than *
Signed-off-by: Alexy Mantha <alexy@mantha.dev>
Signed-off-by: Alexy Mantha <alexy@mantha.dev>
jannfis
left a comment
There was a problem hiding this comment.
While I really like the idea and also appreciate the effort that went into this PR, I think we shouldn't introduce new CRDs lightly, or just after some brief discussion.
IMHO, a change like this has to go through our proposal process
|
Working on the proposal! |
As discussed in #14458, adds new CRDs to define sync strategies that can be referenced and used by multiple ApplicationSets.
SyncStrategyis a namespaced resource and needs to be in the same namespace as the ApplicationSet referencing it.ClusterSyncStrategyis a cluster-wide SyncStrategy that can be referenced by ApplicationSets from any namespace.Closes #14458
Checklist: