-
Now, we need to distribute our plugins. As we mentioned earlier, a plugin repository can be any static file server. The kubeshop/botkube-plugins-template repository comes with two GitHub Actions:
-
InfluxDB
Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.
-
Botkube
An app that helps you monitor your Kubernetes cluster, debug critical deployments & gives recommendations for standard practices
💡 Tip To make the code-snippets more readable, I skipped the error handling. However, it will be useful if you will add error handling for the final implementation. You can check the full gh source-code for the reference.
-
It's time to build your plugin. For that purpose, we will use GoReleaser. It simplifies building Go binaries for different architectures. The important thing is to produce the binaries for the architecture of the host platform where Botkube is running. Adjust the goos, goarch, and goarm properties based on this architecture.
-
There are a lot of great libraries supporting command parsing. The most popular is probably cobra, but for our use case, we will just use the helper function from our plugin extension package.
-
Under the hood, the pluginx.ParseCommand method uses go-arg.
-
Now, we need to distribute our plugins. As we mentioned earlier, a plugin repository can be any static file server. The kubeshop/botkube-plugins-template repository comes with two GitHub Actions:
-
GitHub provides a great gh CLI, which we use to submit our issue. To learn more about the CLI syntax, see their manual.
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives