Setup basic project structure #71
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With this commit we are defining the new structure of the kobsio/kobs
repository. In the future we will use yarn workspaces and lerna for
managing the React app and all the plugins for kobs. The corresponding
Go code for the plugins also lives in the plugins directory. This allows
us to manage the dependencies separately for each plugin and later we
can introduce a small repository template, which allows users to create
their own Docker images for kobs, where they can register only the
plugins the really use.
Each plugin must export the IPluginComponents interface, which must
contain a icon and a panel component and an optional page and preview
component for the plugin. The Go code for each plugin must export an
Route, to determine the API path and a Register function which must
return a chi.Router to add the API paths to the API server.
With this commit we are adding the resources plugin, which can be used
to view the Kubernetes resources for the configured clusters. The
components are mainly the same as for the original resurces components.
Besides the resources plugin we also created a core plugin, which
contains the basic App component, some shared components and the
contexts for kobs. The exported functions and components can be accessed
by all other plugins.