-
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
feat(appset): Implement Plugin Generator #13017
feat(appset): Implement Plugin Generator #13017
Conversation
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #13017 +/- ##
==========================================
+ Coverage 49.27% 49.48% +0.20%
==========================================
Files 251 256 +5
Lines 43541 43847 +306
==========================================
+ Hits 21455 21697 +242
- Misses 19951 19988 +37
- Partials 2135 2162 +27
☔ View full report in Codecov by Sentry. |
Signed-off-by: Sébastien Crocquesel <88554524+scrocquesel@users.noreply.github.com>
@binboum Intuit has an internal hackathon 3 weeks from now where I plan to build a POC for this on an internal use case. Looking forward to helping move this PR forward! |
Hello @crenshaw-dev On our side, the PR is functional technically, we kept it in draft because we wanted to have a feedback on the architecture discussed with the proposal, but in fact, it is functional and tested. What we have to push now is the documentation, but we were waiting for a return from you :) |
docs(plugin-generator): minor improvments
@binboum we're going to start a PoC Monday. :-) |
End of day 1: already have a plugin set up querying an internal API to generate our Argo Rollouts deployment apps. It was super easy. I expect to be able to open a PR against this one with changes we've discussed above, to save y'all some coding. :-) |
Code as promised: binboum#2 |
Do we / should we hot-load plugin configmap changes? |
AFAIR, yes, the http client is recreated at reconcile time from the config map which is cached with an informer. @binboum do you confirm that ? Regarding "should we", secrets/secret refs/appset are hot reloaded so I guess admins expect the conf to be hot reloaded and so does the plugin config map. |
* changes Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * wrap output Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * nested parameters Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * simplify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
636ac86
to
f4d7a38
Compare
Signed-off-by: Maxence Laude <maxence@laude.pro>
* more changes Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clearer docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * abstract Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * naming Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * revert accidental change Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * ugh Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix accidental renames 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: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
Signed-off-by: Maxence Laude <maxence@laude.pro>
* fix plugin generator nil panic Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * input.parameters Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
2b6acb9
to
264fcd4
Compare
* change param structure Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * nest parameters 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: Maxence Laude <maxence@laude.pro>
Signed-off-by: Maxence Laude <maxence@laude.pro>
* add internal http package Signed-off-by: Maxence Laude <maxence@laude.pro> * add services plugin Signed-off-by: Maxence Laude <maxence@laude.pro> * add generator plugin Signed-off-by: Maxence Laude <maxence@laude.pro> * adapted matrix && merge generator Signed-off-by: Maxence Laude <maxence@laude.pro> * adapted plugin to webhook Signed-off-by: Maxence Laude <maxence@laude.pro> * update applicationset controller and types for plugin Signed-off-by: Maxence Laude <maxence@laude.pro> * add proposal for applicationset plugin generator Signed-off-by: Maxence Laude <maxence@laude.pro> * execute codegen Signed-off-by: Maxence Laude <maxence@laude.pro> * First draft of documentation Signed-off-by: Maxence Laude <maxence@laude.pro> * Fix wrong expected error on client_test Signed-off-by: Maxence Laude <maxence@laude.pro> * docs(plugin-generator): minor improvements Signed-off-by: Sébastien Crocquesel <88554524+scrocquesel@users.noreply.github.com> * Improvement * changes Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * wrap output Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * nested parameters Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * simplify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Add plugin to GetRequeueAfter function (merge && matrix) Signed-off-by: Maxence Laude <maxence@laude.pro> * Improvement : renaming * more changes Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clearer docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * abstract Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * naming Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * revert accidental change Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * ugh Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix accidental renames Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Fix typo renaming Signed-off-by: Maxence Laude <maxence@laude.pro> * Improve docs Signed-off-by: Maxence Laude <maxence@laude.pro> * Webhook implementation Signed-off-by: Maxence Laude <maxence@laude.pro> * Typo docs Signed-off-by: Maxence Laude <maxence@laude.pro> * fix plugin generator nil panic Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Add company to USERS.md Signed-off-by: Maxence Laude <maxence@laude.pro> * input.parameters * fix plugin generator nil panic Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * input.parameters Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Change param structure * change param structure Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * nest parameters Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Fix conflicts Signed-off-by: Maxence Laude <maxence@laude.pro> * Fix docs Signed-off-by: Maxence Laude <maxence@laude.pro> * Fix docs Signed-off-by: Maxence Laude <maxence@laude.pro> --------- Signed-off-by: Maxence Laude <maxence@laude.pro> Signed-off-by: Sébastien Crocquesel <88554524+scrocquesel@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Sébastien Crocquesel <88554524+scrocquesel@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
* add internal http package Signed-off-by: Maxence Laude <maxence@laude.pro> * add services plugin Signed-off-by: Maxence Laude <maxence@laude.pro> * add generator plugin Signed-off-by: Maxence Laude <maxence@laude.pro> * adapted matrix && merge generator Signed-off-by: Maxence Laude <maxence@laude.pro> * adapted plugin to webhook Signed-off-by: Maxence Laude <maxence@laude.pro> * update applicationset controller and types for plugin Signed-off-by: Maxence Laude <maxence@laude.pro> * add proposal for applicationset plugin generator Signed-off-by: Maxence Laude <maxence@laude.pro> * execute codegen Signed-off-by: Maxence Laude <maxence@laude.pro> * First draft of documentation Signed-off-by: Maxence Laude <maxence@laude.pro> * Fix wrong expected error on client_test Signed-off-by: Maxence Laude <maxence@laude.pro> * docs(plugin-generator): minor improvements Signed-off-by: Sébastien Crocquesel <88554524+scrocquesel@users.noreply.github.com> * Improvement * changes Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * wrap output Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix test Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix tests Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * nested parameters Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * simplify Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Add plugin to GetRequeueAfter function (merge && matrix) Signed-off-by: Maxence Laude <maxence@laude.pro> * Improvement : renaming * more changes Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * clearer docs Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * abstract Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * naming Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * revert accidental change Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * ugh Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * fix accidental renames Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Fix typo renaming Signed-off-by: Maxence Laude <maxence@laude.pro> * Improve docs Signed-off-by: Maxence Laude <maxence@laude.pro> * Webhook implementation Signed-off-by: Maxence Laude <maxence@laude.pro> * Typo docs Signed-off-by: Maxence Laude <maxence@laude.pro> * fix plugin generator nil panic Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Add company to USERS.md Signed-off-by: Maxence Laude <maxence@laude.pro> * input.parameters * fix plugin generator nil panic Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * input.parameters Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Change param structure * change param structure Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * nest parameters Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --------- Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> * Fix conflicts Signed-off-by: Maxence Laude <maxence@laude.pro> * Fix docs Signed-off-by: Maxence Laude <maxence@laude.pro> * Fix docs Signed-off-by: Maxence Laude <maxence@laude.pro> --------- Signed-off-by: Maxence Laude <maxence@laude.pro> Signed-off-by: Sébastien Crocquesel <88554524+scrocquesel@users.noreply.github.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: Sébastien Crocquesel <88554524+scrocquesel@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
ApplicationSet generators are useful for modeling templates using external data sources to deploy applications.
Today, generators have been developed based on the needs of the community, and when a new need arises, it's necessary to modify the Appset codebase.
The proposal here is to have a "plugin" generator that would allow extending the codebase according to specific needs, without having to modify it directly.
It's inspired by the Plugin functionality of Argo Workflows
PR includes:
Labs :
Discussions : https://cloud-native.slack.com/archives/C01TSERG0KZ/p1677240673615059 @crenshaw-dev @scrocquesel
Related :
#12429
#12368
Credits @binboum @scrocquesel
Checklist:
Please see Contribution FAQs if you have questions about your pull-request.