headlamp-k8s / headlamp

A Kubernetes web UI that is fully-featured, user-friendly and extensible
https://headlamp.dev
Apache License 2.0
2.03k stars 149 forks source link

plugin-management: make a library? #2197

Open illume opened 1 month ago

illume commented 1 month ago

The plugin-management code is used by the app and headlamp-plugin. However, the previous solution for code sharing didn't work.

So plugin-management was copied into the app/. Temporarily. It was also converted to typescript.

I suggest it is turned into a new package @headlamp-k8s/plugin-management, which can be used by headlamp-plugin and the app/. Probably it should stay in ts.

Acceptance criteria

@yolossn For after the release... What do you think of this proposal?

yolossn commented 1 month ago

Yes, it makes sense to create a new package to avoid code duplication.

sniok commented 1 month ago

This is definitely a good idea.

Probably a little out of the scope of this issue but we have a lot of inter-component dependencies, sometimes we copy, sometimes we use "../". I think we should take an even bigger step and use monorepo tools and separate all reusable parts into packages. This would make our life a lot easier.

Some other cases I can think of: