stefanprodan / timoni

Timoni is a package manager for Kubernetes, powered by CUE and inspired by Helm.
https://timoni.sh
Apache License 2.0
1.45k stars 66 forks source link

Add support for file based module in bundle #348

Closed b4nst closed 4 months ago

b4nst commented 5 months ago

Hey folks! This PR brings local module support to Bundles. Since it's quite a refactor, I'd really appreciate your input before I go any further. Hence why it's lacking tests, documentation and such.

[!IMPORTANT] Heads up, this PR involves some hefty changes to the module fetcher.

While putting together the changes we discussed privately and in #268, I realized it's going to bulk up the current Fetcher module quite a bit. So, I've gone ahead and created a new fetcher package within the engine. This should make things more manageable and set the stage for adding new fetcher types down the road (like an HTTPS fetcher). What do you think, @stefanprodan?

At the moment, the Local fetcher only handles directories (think timoni apply). I didn't want to cram too much into one PR, so I've held off on adding .tar.gz file support for now. I'll tackle that in a separate PR.

I've given it a test spin with a modified version of podinfo, which I've linked here for you to try out (it uses the local redis). If this approach aligns with our goals, it could be a winner.

Before I mark this PR as ready, I'll beef up the testing (especially in the new fetcher package), flesh out the documentation, and tidy up the BundleBuilder for easier maintenance. I'd love to hear your thoughts on these next steps!

b4nst commented 5 months ago

Okay I added a decent amount of tests, few lines of doc and refactored part of the code that I was not happy with. @stefanprodan it's ready for review.