Skip to main content
Version: 1.12

Executor

info

This document is applicable only for self-hosted installations. For Botkube Cloud installations, the Botkube Agent configuration is managed via the Botkube Cloud dashboard.

The executor configuration allows you to define multiple executor configurations that can be later referred in communication bindings. For example, take a look at such executor definition:

executors:
"kubectl-global": # This is an executor configuration name, which is referred in communication bindings.
botkube/kubectl:
# ... trimmed ...

"echo": # This is an executor configuration name, which is referred in communication bindings.
botkube/echo:
# ... trimmed ...

This can be later used by the communication platforms:

communications:
"default-group":
socketSlack:
channels:
"default":
bindings:
executors: # The order is important for merging strategy.
- kubectl-global # The executor configuration name
- echo # The executor configuration name
# ... trimmed ...

To use the Botkube executor plugins, first you need to define the plugins repository under the plugins property:

plugins:
repositories:
repo-name:
url: https://example.com/plugins-index.yaml

Next, you can configure executor from a given repository:

executors:
"plugins":
repo-name/[email protected]: # Plugin name syntax: <repo>/<plugin>[@<version>]. If version is not provided, the latest version from repository is used.
enabled: true
config: {}

For all executor configuration properties, see the syntax section.

Restart Policy and Health Check Interval

This section of the configuration allows you to configure the restart policy for the Botkube executor plugins. The restart policy is used when the executor plugin fails to start. The default restart policy is DeactivatePlugin, which means that the plugin is deactivated after a given number of restarts. The restart policy can be configured with the following properties:

  • type - restart policy type. Allowed values: RestartAgent, DeactivatePlugin.
  • threshold - number of restarts before the policy takes into effect.

Restart policy types:

  • RestartAgent - when the threshold is reached, the Botkube agent is restarted.
  • DeactivatePlugin - when the threshold is reached, the plugin is deactivated. To activate the plugin again, you need to restart the Botkube agent.

The health check interval is used to check the health of the executor plugins. The default health check interval is 10 seconds. The health check interval can be configured with the following property:

  • healthCheckInterval - health check interval.
# Botkube Restart Policy on plugin failure.
restartPolicy:
# Restart policy type. Allowed values: "RestartAgent", "DeactivatePlugin".
type: "DeactivatePlugin"
# Number of restarts before policy takes into effect.
threshold: 10
healthCheckInterval: 10s

Syntax

# Map of executors. The `executors` property name is an alias for a given configuration.
# Key name is used as a binding reference.
#
# Format: executors.{alias}
executors:
"tools":
botkube/[email protected]: # Plugin name syntax: <repo>/<plugin>[@<version>]. If version is not provided, the latest version from repository is used.
enabled: true # If not enabled, plugin is not downloaded and started.
config: # Plugin's specific configuration.
changeResponseToUpperCase: true

botkube/kubectl: # If version is not provided, the latest version from repository is used.
enabled: true # If not enabled, plugin is not downloaded and started.

# Configuration for Botkube executors and sources plugins.
plugins:
# Directory, where downloaded plugins are cached.
cacheDir: "/tmp"
# List of plugins repositories.
repositories:
# This repository serves officially supported Botkube plugins.
botkube:
url: https://github.com/kubeshop/botkube/releases/download/v1.12.0/plugins-index.yaml
# Other 3rd party repositories.
repo-name:
url: https://example.com/plugins-index.yaml
# Configure Incoming webhook for source plugins.
incomingWebhook:
enabled: true
port: 2115
targetPort: 2115
# Botkube Restart Policy on plugin failure.
restartPolicy:
# Restart policy type. Allowed values: "RestartAgent", "DeactivatePlugin".
type: "DeactivatePlugin"
# Number of restarts before policy takes into effect.
threshold: 10
healthCheckInterval: 10s

The default configuration for the Botkube Helm chart can be found in the values.yaml file.