koki / short

Manageable Kubernetes manifests through a composable, reusable syntax
https://docs.koki.io/short
Apache License 2.0
122 stars 14 forks source link

add support for installer plugins #207

Closed wlan0 closed 6 years ago

wlan0 commented 6 years ago

@rrati @jayunit100 this PR adds support for different installers. Will shortly be adding support for adding custom transformers.

wlan0 commented 6 years ago

In order to try this out

cd short-project-path

# ensure that it is not a static build (avoid ./scripts/build.sh)
go build  

# build the plugin. Make sure you're using go1.10 (previous versions have CGO requirements)
go build -buildmode=plugin -o .short-plugins/kube_installer.so examples/kube_installer.go

# transform and install using the plugin
./short -k --plugin=kube_installer.so -f short-file.yaml
wlan0 commented 6 years ago

This PR also add support for 3 plugin commands. Note that default plugin path is .short-plugins

# list plugins installed
./short plugin ls

# install new plugin
./short plugin install test-plugin --path=/path/to/plugin

# delete installed plugin
./short plugin rm test-plugin