kuby-core icon indicating copy to clipboard operation
kuby-core copied to clipboard

Write docs for authoring providers

Open camertron opened this issue 2 years ago • 0 comments

The documentation site (getkuby.io) currently doesn't contain any documentation for writing providers. While providers are very much like plugins, they have a slightly different interface that should be documented. For those looking to write a provider, the interface is defined here. The only methods subclasses are required to define are kubeconfig_path and storage_class_name, which are described in further detail below.

  • kubeconfig_path. Returns a string containing the path to the kubeconfig file used to communicate with the Kubernetes cluster. Most hosting providers like DigitalOcean, Linode, etc, feature an API that can be used to fetch a copy of the kubeconfig that can be used by kubectl (what Kuby uses under the hood) to communicate with the cluster.
  • storage_class_name. Returns a string that corresponds to the storage class the provider uses for persistent volumes. For example, DigitalOcean's storage class is "do-block-storage". Consult the provider's documentation for the right storage class to use. When in doubt, try "default" (which should probably just be the default if you don't provide one, I'll work on that).

Until I have a chance to write up some real documentation, enterprising plugin authors can also consult the implementations of the existing provider gems:

  • https://github.com/getkuby/kuby-digitalocean
  • https://github.com/getkuby/kuby-linode
  • https://github.com/getkuby/kuby-azure
  • https://github.com/getkuby/kuby-eks

camertron avatar Jul 21 '22 17:07 camertron