-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
docs(proposal): share sync strategies across ApplicationSets #15408
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Alexy Mantha <[email protected]>
Signed-off-by: Alexy Mantha <[email protected]>
Signed-off-by: Alexy Mantha <[email protected]>
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## master #15408 +/- ##
=======================================
Coverage 50.00% 50.00%
=======================================
Files 266 266
Lines 45631 45631
=======================================
Hits 22818 22818
Misses 20581 20581
Partials 2232 2232 ☔ View full report in Codecov by Sentry. |
While writing this proposal, I realized that maybe there should be a mechanism to offer optional/opt-in CRDs for this kind of purpose. I realize that adding CRDs for a specific feature that is used by a minority is a significant drawback but that may be mitigated by making them optional. This could also extend to other features where there is significant repetition, such as when defining sync windows. The same pattern could be used where we can specify a syncWindow ref that refers to a CRDs that defines the configuration for the sync window. This is out of scope, but I think this proposal could set a precedent for other similar features. |
Thank you, @alexymantha! Do you see a chance to bring up this proposal to our weekly contributors meeting for broader discussion? |
Following our discussion in the contributor's meeting, I tried using Kustomize to inject the strategy in the ApplicationSets. It works, but it has a caveat that I want to highlight. Our setup is the following: we have >10 GitOps repositories, each containing the ApplicationSets for the teams using that repo. Here's a visual example:
We can fairly easily use Kustomize to inject a SyncStrategy into the ApplicationSets but this only partly solves the duplication issue. As far as I can tell, Kustomize does not support referencing a Git repo in a patch. This means that although the strategy is not duplicated within 1 repository, it still needs to be duplicated in every other repo. IMO due to how we structure repositories, this is a significant drawback compared to using CRDs Note: I'm very new to Kustomize and there might be a solution I'm overlooking so I'm more than happy if you have other suggestions. |
I'm wondering if, as an alternative to CRDs, we could use a ConfigMap instead. We could achieve the same behaviour with a CM, the only drawback is that it will not have the automatic validation that a CRD provides |
Relates to #15313 and #14458
Is also a follow up of the original proposal: #9979
Checklist: