Our great sponsors
-
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:
-
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.
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
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.
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
Related posts
- Terminal Music Tracker Mock-Up
- Recommendations on file/dir/module structure, common dependencies, and/or anti-patterns for writing CLI tool in Rust
- Best Programming Language for writing scripts to run on other computers?
- Portal - a modern file transfer utility 🌌✨
- Re-introducing "define" - A command-line dictionary (thesaurus) app, with access to multiple sources, written in Go.