Kubearchive Shared Libraries #1773
Replies: 5 comments 7 replies
-
|
Hmm... which features do you have in mind that people can import? I don't see anything worth exposing. |
Beta Was this translation helpful? Give feedback.
-
|
I had scaffolded something similar ages ago, but never got around to making it a real project: https://github.com/adambkaplan/go-k8s-middleware |
Beta Was this translation helpful? Give feedback.
-
|
Frankly most everything in |
Beta Was this translation helpful? Give feedback.
-
|
Wow. That PR has 2264 changed files. |
Beta Was this translation helpful? Give feedback.
-
|
After talking with @adambkaplan, @skoved and I agreed to go on with this effort for the API (routers and middlewares) and the sink as it's only a matter of refactoring and reorganizing the code. Diving into this matter, the main goal is to externalize api/ and sink/ so they are their own go modules so the people who import them doesn't have to import all the dependencies in kubearchive. We have to be careful with circular dependencies, and to prevent that we would need a new external component called core/ so we end up with something like this: Dependency graphNo circular dependencies: core depends on nothing internal, api and sink depend only on core, and cmd/ binaries import everything. The idea I have in mind then is to do something as follows: Module StructureSo the core and API library would include the following What goes where and whyWith this structure we can conditionally trigger rebuilding things through konflux based on changes in different directories: Conditional rebuilds |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This is a follow up on my comment in the Tekton/Kubearchive discussion thread (see tektoncd/community#1239).
Does it make sense for Kubearchive to refactor its codebase so that some of its individual features/pieces are importable as Go modules (or equivalent shareable pieces of code)?
I could see this being a potential pivot of the project's mission. Instead of Kubearchive being a "competitor" to more specific solutions like Tekton Results and the Argo Workflow Archive, Kubearchive becomes a foundation that these projects build on top of.
I don't think the current kubearchive/kubearchive repo should be torn down - IMO the full end to end archiver should remain as a "reference implementation" to validate these libraries.
Beta Was this translation helpful? Give feedback.
All reactions