To add a addon to the tk8 it would be greate to give a existing git repository so tk8 can clone and install it on the cluster.
The general handling of addons must be defined in a interface and must be avaible for thirt party developer in the form of a pkg.
The pkg age need to provice a cmd helper. so the 3th party developer easily add his stuff and can call tk8 dependencies but not the internal api
At the end the user cann call tk8 addon [-i|--install] https://git..../3thParty/MyAddon.git
or over the rest API curl -X POST -d 'https://git..../3thParty/MyAddon.git' {host}:{port}\addons
to install it in his configurated cluster
If there a option for later to manage multi cluster so the option is needed to define which cluster to use.
Code go: /pkg/addons/
Interface Addon whith follow methods
-
(a *Addon) init()
- check config or set some needed configs
-
(a *Addon) install()
- the process to install this addon
-
(a *Addon) update()
- the update process
-
(a *Addon) destroy()
- the process to destroy this addon
Helper AddonHelper whith some methods to support the developer or a kubectl Handler for example
- (ah *AddonHelper) execCmd(String cmd )
Addons should be easily integrated via external git repositories of third party developers Addon should be able to extend the Rest API A small framework should be available for third party addon development. This should provide the developer with an interface to ensure a uniform implementation. Wrappers should also exist for the commands and encapsulate them accordingly. Furthermore, it would be good if helpers exist to provide the recurring functions.