mirror of
https://github.com/valitydev/botkube.git
synced 2024-11-06 08:25:19 +00:00
An app that helps you monitor your Kubernetes cluster, debug critical deployments & gives recommendations for standard practices
e94e9142b7
##### ISSUE TYPE - Bug fix Pull Request ##### SUMMARY This should fix panic on empty command. Bot will send the default message for the executor Platform (in my case its mattermost) ##### What did you do? Sent empty command to botkube via mattermost (type @botkube) ##### What did you expect to see? > Command not supported. Please run /botkubehelp to see supported commands. or at least nothing ##### What did you see? `panic: runtime error: index out of range [0] with length 0 goroutine 28 [running]: github.com/infracloudio/botkube/pkg/execute.(*DefaultExecutor).Execute(0xc000a11020, 0x0, 0x0) go/src/github.com/gohumble/botkube/pkg/execute/executor.go:191 +0xe13 github.com/infracloudio/botkube/pkg/bot.(*mattermostMessage).handleMessage(0xc000b75de8, 0xc0003d1940, 0x1a, 0xc00046b7c0, 0x5, 0xc00046b7cc, 0x4, 0xc00046b120, 0xd, 0x1, ...) go/src/github.com/gohumble/botkube/pkg/bot/mattermost.go:154 +0x54e github.com/infracloudio/botkube/pkg/bot.MMBot.listen(0xc0003d1940, 0x1a, 0xc00046b7c0, 0x5, 0xc00046b7cc, 0x4, 0xc00046b120, 0xd, 0x1, 0xc0003d1880, ...) go/src/github.com/gohumble/botkube/pkg/bot/mattermost.go:253 +0x4d1 github.com/infracloudio/botkube/pkg/bot.(*MMBot).Start.func1(0xc00058f4d0) go/src/github.com/gohumble/botkube/pkg/bot/mattermost.go:125 +0x2c7 created by github.com/infracloudio/botkube/pkg/bot.(*MMBot).Start src/github.com/gohumble/botkube/pkg/bot/mattermost.go:113 +0x712 Exiting.` |
||
---|---|---|
.github | ||
branding/logos | ||
build | ||
cmd/botkube | ||
design | ||
hack | ||
helm/botkube | ||
pkg | ||
test | ||
.gitignore | ||
.mergify.yml | ||
.release | ||
botkube_arch.jpg | ||
botkube-title.jpg | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
comm_config.yaml | ||
CONTRIBUTING.md | ||
deploy-all-in-one-tls.yaml | ||
deploy-all-in-one.yaml | ||
go.mod | ||
go.sum | ||
LICENSE | ||
Makefile | ||
README.md | ||
resource_config.yaml |
BotKube
For complete documentation visit www.botkube.io
BotKube integration with Slack or Mattermost helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources. You can also ask BotKube to execute kubectl commands on k8s cluster which helps debugging an application or cluster.
Getting started
Please follow this for complete BotKube installation guide.
Architecture
- Informer Controller: Registers informers to kube-apiserver to watch events on the configured k8s resources. It forwards the incoming k8s event to the Event Manager
- Event Manager: Extracts required fields from k8s event object and creates a new BotKube event struct. It passes BotKube event struct to the Filter Engine
- Filter Engine: Takes the k8s object and BotKube event struct and runs Filters on them. Each filter runs some validations on the k8s object and modifies the messages in the BotKube event struct if required.
- Event Notifier: Finally, notifier sends BotKube event over the configured communication channel.
- Bot Interface: Bot interface takes care of authenticating and managing connections with communication mediums like Slack, Mattermost. It reads/sends messages from/to commucation mediums.
- Executor: Executes BotKube or kubectl command and sends back the result to the Bot interface.
Visit www.botkube.io for Configuration, Usage and Examples.