Skip to content

Instantly share code, notes, and snippets.

@MuellerMH
Last active July 29, 2018 08:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MuellerMH/bdd723b3f2a24bf13b75f8be52f76a10 to your computer and use it in GitHub Desktop.
Save MuellerMH/bdd723b3f2a24bf13b75f8be52f76a10 to your computer and use it in GitHub Desktop.

Addons

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.

gernal handling

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 )

requirement

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment