diff --git a/versioned_docs/version-1.10/architecture/assets/arch-dark.svg b/versioned_docs/version-1.10/architecture/assets/arch-dark.svg deleted file mode 100644 index e844b875..00000000 --- a/versioned_docs/version-1.10/architecture/assets/arch-dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
K8s events
K8s events
User
User
starts gRPC
streaming
starts gRPC...
Plugin Source
Bridge
Plugin Source...
Botkube core
Botkube core
interacts with
interacts with
kubectl
kubectl
helm
helm
Bot (bidirectional)
Bot (bidirectional)
Sink (unidirectional)
Sink (unidirectional)
Executors
Executors
executes gRPC
call
executes gRPC...
Plugin Executor
Bridge
Plugin Executor...
K8s events
K8s events
Prometheus
Prometheus
Sources
Sources
Communications
Communications
Downloaded plugins
Downloaded plugins
downloads and starts
plugin binaries
downloads and starts...
reads index file with 
available plugins
reads index file with...
Plugin
Manager
Plugin...
Filter Engine
Filter Engine
Plugin Index File
Plugin Index File
Plugin Index File
Plugin Index File
Plugins repository
Plugins repository
helm
helm
argo
argo
Prometheus
Prometheus
kubectl
kubectl
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.10/architecture/assets/arch-light.svg b/versioned_docs/version-1.10/architecture/assets/arch-light.svg deleted file mode 100644 index 098e469a..00000000 --- a/versioned_docs/version-1.10/architecture/assets/arch-light.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
K8s events
K8s events
User
User
starts gRPC
streaming
starts gRPC...
Plugin Source
Bridge
Plugin Source...
Botkube core
Botkube core
interacts with
interacts with
kubectl
kubectl
helm
helm
Bot (bidirectional)
Bot (bidirectional)
Sink (unidirectional)
Sink (unidirectional)
Executors
Executors
executes gRPC
call
executes gRPC...
Plugin Executor
Bridge
Plugin Executor...
K8s events
K8s events
Prometheus
Prometheus
Sources
Sources
Communications
Communications
Downloaded plugins
Downloaded plugins
downloads and starts
plugin binaries
downloads and starts...
reads index file with 
available plugins
reads index file with...
Plugin
Manager
Plugin...
Filter Engine
Filter Engine
Plugin Index File
Plugin Index File
Plugin Index File
Plugin Index File
Plugins repository
Plugins repository
helm
helm
argo
argo
Prometheus
Prometheus
kubectl
kubectl
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.10/architecture/assets/teams-cloud.png b/versioned_docs/version-1.10/architecture/assets/teams-cloud.png deleted file mode 100644 index 0c4aef5c..00000000 Binary files a/versioned_docs/version-1.10/architecture/assets/teams-cloud.png and /dev/null differ diff --git a/versioned_docs/version-1.10/architecture/index.md b/versioned_docs/version-1.10/architecture/index.md deleted file mode 100644 index eb9923b1..00000000 --- a/versioned_docs/version-1.10/architecture/index.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: architecture -title: "Architecture" -sidebar_position: 7 ---- - -This document describes high-level Botkube architecture, all components in the system and interactions between them. - -Botkube is split into two main parts: - -- Botkube agent: Botkube binary that serves as a bridge between communication platforms (e.g. Slack, Discord) and Botkube plugins (sources and executors). -- [Botkube plugins](../plugin/index.md): The executable binaries that communicate with Botkube agent over an RPC interface. Botkube supports two types of plugins, respectively called Source plugins and Executor plugins. - -## Components - -The following diagram visualizes all main components in the system. - -![Architecture](assets/arch-light.svg#gh-light-mode-only)![Architecture](assets/arch-dark.svg#gh-dark-mode-only) - -### Plugin repository - -A plugin repository is a place where plugin binaries and index file are stored. This repository must be publicly available and supports downloading assets via HTTP(s). Any static file server can be used, for instance: GitHub Pages, `s3`, `gcs`, etc. - -### Plugin manager - -Plugin manager takes care of downloading enabled and bound plugins, running a given plugin binary and maintaining the gRPC connection. Under the hood, the [`go-plugin`](https://github.com/hashicorp/go-plugin/) library is used. Plugin manager is responsible both for the executor and source plugins. - -### Plugin executor bridge - -Plugin executor bridge is resolving the received Botkube command, calling the respective plugin, and sending back the response to a given communication platform. - -### Executor - -Executor is a binary that implements the [executor](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) Protocol Buffers contract. Executor runs a given command, such as `kubectl` one, and returns the response in a synchronous way. - -Streaming command response is not supported. As a result, commands which take a lot of time doesn't work well, as the response won't be sent until the command is finished. - -### Plugin source bridge - -Plugin source bridge is dispatching received source events to all configured communication channels. - -### Source - -Source is a binary that implements the [source](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) Protocol Buffers contract. Source starts asynchronous streaming of domain-specific events. For example, streaming Kubernetes events. - -### Bot - -Bot represents a bidirectional communication platform. Each bot is responsible for authenticating, managing connections, and providing an interface for receiving and sending messages for a given platform like Slack, Discord, etc. Connection is mostly done via WebSocket. - -### Sink - -Sink represents a unidirectional communication platform. Each sink is responsible for authenticating, managing connections, and providing an interface for sending messages for a given platform like Elasticsearch, outgoing webhook, etc. diff --git a/versioned_docs/version-1.10/architecture/teams.md b/versioned_docs/version-1.10/architecture/teams.md deleted file mode 100644 index b5b7c4d6..00000000 --- a/versioned_docs/version-1.10/architecture/teams.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -id: cloud-teams -title: "Cloud Teams connections overview" ---- - -# Cloud Teams connections overview - -This document describes the communication between the Botkube Cloud control-plane and the Botkube Agent configured with the Cloud Teams platform enabled. - -![teams-cloud.svg](assets/teams-cloud.png) - -### Agent outbound connections - -- HTTPS: `https://api.segment.io/*` -- HTTPS: `https://api.botkube.io/*` -- HTTPS: `https://github.com/kubeshop/botkube/releases/download/*` -- HTTP/2: `teams.botkube.io:50054` -- Docker images: https://ghcr.io more about required ports you can on [About GitHub's IP addresses](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-githubs-ip-addresses): - - `*.github.com` - - `*.pkg.github.com` - - `*.ghcr.io` - - `*.githubusercontent.com` - -### Agent inbound - -The Botkube Agent doesn't export any endpoints. - -# Components details - -## Agent - -The Botkube Agent Docker image is hosted on the GitHub Container registry, which uses the package namespace https://ghcr.io. The image format link: - -- [`ghcr.io/kubeshop/botkube:{botkube_version}`](https://github.com/kubeshop/botkube/pkgs/container/botkube), e.g., `ghcr.io/kubeshop/botkube:v1.8.0` - -### Plugin manager - -The index and archives for open source plugins are stored under a given Botkube GitHub release as [its assets](https://github.com/kubeshop/botkube/releases/tag/v1.8.0): - -- Plugin index: `https://github.com/kubeshop/botkube/releases/download/{botkube_version}/plugins-index.yaml`, e.g., https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -- Plugin archive: `https://github.com/kubeshop/botkube/releases/download/{botkube_version}/{plugin_name_and_arch}.tar.gz` e.g., https://github.com/kubeshop/botkube/releases/download/v1.8.0/executor_kubectl_linux_amd64.tar.gz - - Plugin links can also be found in the `plugins-index.yaml` file. - -For the Botkube Cloud exclusive plugins, we serve plugin index via the Botkube Cloud API (`api.botkube.io`). As we use Google Cloud Storage as the storage provider, all the plugins are fetched from the `https://storage.googleapis.com` origin. - -During startup, the Botkube Agent downloads plugins index and all enabled plugins. They are stored under the `/tmp` folder mounted as the [`emptyDir`](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/templates/deployment.yaml#L146-L147). There is no Persistent Volume (PV), meaning that when the Agent Pod is, for example, rescheduled to another node, it downloads all dependencies again. To ensure that the [plugin manager](index.md#plugin-manager) does not make external calls, all required plugins must be present. You can achieve this by mounting a Persistent Volume Claim (PVC) at this path. Later, you can mount your Persistent Volume (PV) with cached plugins. - -### Plugin dependencies - -Each plugin may define required external dependencies that are downloaded by the [Plugin manager](#plugin-manager) at Agent startup. For now, those dependencies are taken from the official sources and are not mirrored to the Botkube Cloud registry. Here are the links that describe external dependencies for each officially supported plugin: - -- [`kubectl`](../configuration/executor/kubectl.md) executor: https://github.com/kubeshop/botkube/blob/release-1.9/internal/executor/kubectl/executor.go#L33-L42 - -`helm` plugin: - -- `helm` dependency: - - https://get.helm.sh/helm-v3.6.3-darwin-amd64.tar.gz//darwin-amd64 - - https://get.helm.sh/helm-v3.6.3-darwin-arm64.tar.gz//darwin-arm64 - - https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz//linux-amd64 - - https://get.helm.sh/helm-v3.6.3-linux-arm64.tar.gz//linux-arm64 -- `exec` plugin: - - `eget` dependency: - - https://github.com/zyedidia/eget/releases/download/v1.3.3/eget-1.3.3-darwin_amd64.tar.gz//eget-1.3.3-darwin_amd64 - - https://github.com/zyedidia/eget/releases/download/v1.3.3/eget-1.3.3-darwin_arm64.tar.gz//eget-1.3.3-darwin_arm64 - - https://github.com/zyedidia/eget/releases/download/v1.3.3/eget-1.3.3-linux_amd64.tar.gz//eget-1.3.3-linux_amd64 - - https://github.com/zyedidia/eget/releases/download/v1.3.3/eget-1.3.3-linux_arm64.tar.gz//eget-1.3.3-linux_arm64 -- `flux` plugin: - - `flux` dependency: - - https://github.com/fluxcd/flux2/releases/download/v2.0.1/flux_2.0.1_darwin_amd64.tar.gz - - https://github.com/fluxcd/flux2/releases/download/v2.0.1/flux_2.0.1_darwin_arm64.tar.gz - - https://github.com/fluxcd/flux2/releases/download/v2.0.1/flux_2.0.1_linux_amd64.tar.gz - - https://github.com/fluxcd/flux2/releases/download/v2.0.1/flux_2.0.1_linux_arm64.tar.gz - - `gh` dependency: - - https://github.com/cli/cli/releases/download/v2.32.1/gh_2.32.1_macOS_amd64.zip//gh_2.32.1_macOS_amd64/bin - - https://github.com/cli/cli/releases/download/v2.32.1/gh_2.32.1_macOS_arm64.zip//gh_2.32.1_macOS_arm64/bin - - https://github.com/cli/cli/releases/download/v2.32.1/gh_2.32.1_linux_amd64.tar.gz//gh_2.32.1_linux_amd64/bin - - https://github.com/cli/cli/releases/download/v2.32.1/gh_2.32.1_linux_arm64.tar.gz//gh_2.32.1_linux_arm64/bin - -If a plugin is not listed here, then it doesn't have any external dependencies. - -### Analytics - -The Agent uses the official [Go SDK](https://github.com/segmentio/analytics-go) to send anonymous analytics to https://segment.io. This library is sending a POST request on the `https://api.segment.io` endpoint. - -### Control-plane connection - -The Agent communicates with the Cloud control-plane using GraphQL. All requests are executed as a `POST` request on the `https://api.botkube.io/graphql` endpoint. We use that connection to: - -- Fetch Agent's configuration -- Send audit logs -- Periodically send Agent heartbeat -- Watch configuration changes - - all changes e.g., changing plugin configuration done on the Cloud UI Dashboard triggers Agent restart with 1 min (polling is used) - -#### Security - -The `https://api.botkube.io/graphql` endpoint is protected by JWT tokens. For the Agent, we use machine API tokens that are issued separately for each [Botkube Instance](#botkube-instance). This token allows you to work only in the context of a given Instance. - -### Cloud Teams connection - -The Cloud Teams platform communicates only with the Botkube control-plane using gRPC (HTTP/2 connection). For gRPC, TLS is enabled. We use [bidirectional streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#bidirectional-streaming-rpc}) to send the user `@Botkube` commands to the Agent and send Agent responses back to the Cloud control-plane. - -#### Security - -The `teams.botkube.io:50054` connection is protected by machine API tokens that are issued separately for each [Botkube Instance](#botkube-instance). This token allows you to work only in the context of a given Instance. - -## Concurrency Limits - -Concurrency limits restrict the number of simultaneous connections to our Cloud Teams router. You are allowed a maximum of 2 concurrent connections to support rollback updates. - -## Rate Limiting - -Rate limiting controls the frequency of requests that a component can send or receive. Rate limiting protects the Cloud Teams Router from misconfigured installations that may overload the system. Rate limiting is based on the Agent’s Instance ID. **We drop any messages that exceed the limit and do not push them into Pub/Sub.** You are allowed a maximum of 20 requests per second. - -## Cloud Dashboard - -Such constrains applies in the context of the Cloud organization: - -1. The organization has exactly one owner -2. The organization owner cannot be removed. -3. The organization owner is also a billing person. -4. All organization members have the same full permission. They can add and remove members and update organization information. -5. A user can be a member of multiple organizations. -6. Instances are always scoped to a given organization. - -## Useful links - -- [Botkube Agent architecture](https://docs.botkube.io/architecture/) -- [Cloud Teams installation tutorial](https://docs.botkube.io/installation/teams/) - -## Terminology - -### Botkube Instance - -A Botkube Instance is created on the Botkube Cloud side and holds the Botkube Agent configuration. diff --git a/versioned_docs/version-1.10/cli/_category_.json b/versioned_docs/version-1.10/cli/_category_.json deleted file mode 100644 index 3f09750c..00000000 --- a/versioned_docs/version-1.10/cli/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "CLI", - "position": 5 -} diff --git a/versioned_docs/version-1.10/cli/commands/_category_.json b/versioned_docs/version-1.10/cli/commands/_category_.json deleted file mode 100644 index 053c6e32..00000000 --- a/versioned_docs/version-1.10/cli/commands/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "Commands" -} diff --git a/versioned_docs/version-1.10/cli/commands/botkube.md b/versioned_docs/version-1.10/cli/commands/botkube.md deleted file mode 100644 index 2738598c..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: botkube ---- - -## botkube - -Botkube CLI - -### Synopsis - -botkube - Botkube CLI - -A utility that simplifies working with Botkube. - -Quick Start: - - $ botkube install # Install Botkube - $ botkube uninstall # Uninstall Botkube - -Botkube Cloud: - - $ botkube login # Login into Botkube Cloud - $ botkube migrate # Automatically migrates Open Source installation into Botkube Cloud - -``` -botkube [flags] -``` - -### Options - -``` - -h, --help help for botkube - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube config](botkube_config.md) - This command consists of multiple subcommands for working with Botkube configuration -- [botkube install](botkube_install.md) - install or upgrade Botkube in k8s cluster -- [botkube login](botkube_login.md) - Login to a Botkube Cloud -- [botkube migrate](botkube_migrate.md) - Automatically migrates Botkube installation into Botkube Cloud -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics -- [botkube uninstall](botkube_uninstall.md) - uninstall Botkube from cluster -- [botkube version](botkube_version.md) - Print the CLI version diff --git a/versioned_docs/version-1.10/cli/commands/botkube_config.md b/versioned_docs/version-1.10/cli/commands/botkube_config.md deleted file mode 100644 index 2d0e7e77..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube_config.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: botkube config ---- - -## botkube config - -This command consists of multiple subcommands for working with Botkube configuration - -### Options - -``` - -h, --help help for config -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI -- [botkube config get](botkube_config_get.md) - Displays Botkube configuration diff --git a/versioned_docs/version-1.10/cli/commands/botkube_config_get.md b/versioned_docs/version-1.10/cli/commands/botkube_config_get.md deleted file mode 100644 index 56660f62..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube_config_get.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: botkube config get ---- - -## botkube config get - -Displays Botkube configuration - -``` -botkube config get [flags] -``` - -### Examples - -``` -# Show configuration for currently installed Botkube -botkube config get - -# Show configuration in JSON format -botkube config get -ojson - -# Save configuration in file -botkube config get > config.yaml - -``` - -### Options - -``` - --cfg-exporter-image-registry string Registry for the Config Exporter job image (default "ghcr.io") - --cfg-exporter-image-repo string Repository for the Config Exporter job image (default "kubeshop/botkube-config-exporter") - --cfg-exporter-image-tag string Tag of the Config Exporter job image (default "v9.99.9-dev") - --cfg-exporter-poll-period duration Interval used to check if Config Exporter job was finished (default 1s) - --cfg-exporter-timeout duration Maximum execution time for the Config Exporter job (default 1m0s) - --cloud-env-api-key string API key environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_API_KEY") - --cloud-env-endpoint string Endpoint environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_ENDPOINT") - --cloud-env-id string Identifier environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_IDENTIFIER") - -h, --help help for get - -l, --label string Label used for identifying the Botkube pod (default "app=botkube") - -n, --namespace string Namespace of Botkube pod (default "botkube") - --omit-empty-values Omits empty keys from printed configuration (default true) - -o, --output string Output format. One of: json | yaml (default "yaml") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube config](botkube_config.md) - This command consists of multiple subcommands for working with Botkube configuration diff --git a/versioned_docs/version-1.10/cli/commands/botkube_install.md b/versioned_docs/version-1.10/cli/commands/botkube_install.md deleted file mode 100644 index 6301e659..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube_install.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: botkube install ---- - -## botkube install - -install or upgrade Botkube in k8s cluster - -### Synopsis - -Use this command to install or upgrade the Botkube agent. - -``` -botkube install [OPTIONS] [flags] -``` - -### Examples - -``` -# Install latest stable Botkube version -botkube install - -# Install Botkube 0.1.0 version -botkube install --version 0.1.0 - -# Install Botkube from local git repository. Needs to be run from the main directory. -botkube install --repo @local -``` - -### Options - -``` - --atomic If set, process rolls back changes made in case of failed install/upgrade. The --wait flag will be set automatically if --atomic is used - -y, --auto-approve Skips interactive approval when upgrade is required. - --chart-name string Botkube Helm chart name. (default "botkube") - --dependency-update Update dependencies if they are missing before installing the chart - --description string add a custom description - --disable-openapi-validation If set, it will not validate rendered templates against the Kubernetes OpenAPI Schema - --dry-run Simulate an installation - --force Force resource updates through a replacement strategy - -h, --help help for install - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - --namespace string Botkube installation namespace. (default "botkube") - --no-hooks Disable pre/post install/upgrade hooks - --release-name string Botkube Helm chart release name. (default "botkube") - --render-subchart-notes If set, render subchart notes along with the parent - --repo string Botkube Helm chart repository location. It can be relative path to current working directory or URL. Use @stable tag to select repository which holds the stable Helm chart versions. (default "https://charts.botkube.io/") - --reset-values When upgrading, reset the values to the ones built into the chart - --reuse-values When upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored - --set stringArray Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --set-file stringArray Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) - --set-json stringArray Set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2) - --set-literal stringArray Set a literal STRING value on the command line - --set-string stringArray Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --skip-crds If set, no CRDs will be installed. - --timeout duration Maximum time during which the Botkube installation is being watched, where "0" means "infinite". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default 10m0s) - -f, --values strings Specify values in a YAML file or a URL (can specify multiple) - --version string Botkube version. Possible values @latest, 1.2.0, ... (default "@latest") - -w, --watch --timeout Watches the status of the Botkube installation until it finish or the defined --timeout occurs. (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.10/cli/commands/botkube_login.md b/versioned_docs/version-1.10/cli/commands/botkube_login.md deleted file mode 100644 index 6dbc9943..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube_login.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: botkube login ---- - -## botkube login - -Login to a Botkube Cloud - -``` -botkube login [OPTIONS] [flags] -``` - -### Examples - -``` -# start interactive setup -botkube login - -``` - -### Options - -``` - --cloud-dashboard-url string Botkube Cloud URL (default "https://app.botkube.io") - -h, --help help for login - --local-server-addr string Address of a local server which is used for the login flow (default "localhost:8085") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.10/cli/commands/botkube_migrate.md b/versioned_docs/version-1.10/cli/commands/botkube_migrate.md deleted file mode 100644 index 661f5aa3..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube_migrate.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: botkube migrate ---- - -## botkube migrate - -Automatically migrates Botkube installation into Botkube Cloud - -### Synopsis - -Automatically migrates Botkube installation to Botkube Cloud. -This command will create a new Botkube Cloud instance based on your existing Botkube configuration, and upgrade your Botkube installation to use the remote configuration. - -Supported Botkube bot platforms for migration: - -- Socket Slack -- Discord -- Mattermost - -Limitations: - -- Plugins are sourced from Botkube repository - -Use label selector to choose which Botkube pod you want to migrate. By default it's set to app=botkube. - -Examples: - - $ botkube migrate --label app=botkube --instance-name botkube-slack # Creates new Botkube Cloud instance with name botkube-slack and migrates pod with label app=botkube to it - -``` -botkube migrate [OPTIONS] [flags] -``` - -### Options - -``` - -y, --auto-approve Skips interactive approval for upgrading Botkube installation. - --cfg-exporter-image-registry string Registry for the Config Exporter job image (default "ghcr.io") - --cfg-exporter-image-repo string Repository for the Config Exporter job image (default "kubeshop/botkube-config-exporter") - --cfg-exporter-image-tag string Tag of the Config Exporter job image (default "v9.99.9-dev") - --cfg-exporter-poll-period duration Interval used to check if Config Exporter job was finished (default 1s) - --cfg-exporter-timeout duration Maximum execution time for the Config Exporter job (default 1m0s) - --cloud-api-url string Botkube Cloud API URL (default "https://api.botkube.io/graphql") - --cloud-dashboard-url string Botkube Cloud URL (default "https://app.botkube.io") - --cloud-env-api-key string API key environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_API_KEY") - --cloud-env-endpoint string Endpoint environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_ENDPOINT") - --cloud-env-id string Identifier environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_IDENTIFIER") - -h, --help help for migrate - --image-tag string Botkube image tag, e.g. "latest" or "v1.7.0" - --instance-name string Botkube Cloud Instance name that will be created - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - -l, --label string Label used for identifying the Botkube pod (default "app=botkube") - -n, --namespace string Namespace of Botkube pod (default "botkube") - -q, --skip-connect Skips connecting to Botkube Cloud after migration - --skip-open-browser Skips opening web browser after migration - --timeout duration Maximum time during which the Botkube installation is being watched, where "0" means "infinite". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default 10m0s) - --token string Botkube Cloud authentication token - -w, --watch --timeout Watches the status of the Botkube installation until it finish or the defined --timeout occurs. (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.10/cli/commands/botkube_telemetry.md b/versioned_docs/version-1.10/cli/commands/botkube_telemetry.md deleted file mode 100644 index 00e22bea..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube_telemetry.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: botkube telemetry ---- - -## botkube telemetry - -Configure collection of anonymous analytics - -### Options - -``` - -h, --help help for telemetry -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI -- [botkube telemetry disable](botkube_telemetry_disable.md) - Disable Botkube telemetry -- [botkube telemetry enable](botkube_telemetry_enable.md) - Enable Botkube telemetry diff --git a/versioned_docs/version-1.10/cli/commands/botkube_telemetry_disable.md b/versioned_docs/version-1.10/cli/commands/botkube_telemetry_disable.md deleted file mode 100644 index 65da8f3d..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube_telemetry_disable.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: botkube telemetry disable ---- - -## botkube telemetry disable - -Disable Botkube telemetry - -``` -botkube telemetry disable [flags] -``` - -### Examples - -``` -# To improve the user experience, Botkube collects anonymized data. -# It does not collect any identifying information, and all analytics -# are used only as aggregated collection of data to improve Botkube -# and adjust its roadmap. -# Read our privacy policy at https://docs.botkube.io/privacy - -# The Botkube CLI tool collects anonymous usage analytics. -# This data is only available to the Botkube authors and helps us improve the tool. - -# Disable Botkube telemetry -botkube telemetry disable - - - -``` - -### Options - -``` - -h, --help help for disable -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics diff --git a/versioned_docs/version-1.10/cli/commands/botkube_telemetry_enable.md b/versioned_docs/version-1.10/cli/commands/botkube_telemetry_enable.md deleted file mode 100644 index 0f2aa6db..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube_telemetry_enable.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: botkube telemetry enable ---- - -## botkube telemetry enable - -Enable Botkube telemetry - -``` -botkube telemetry enable [flags] -``` - -### Examples - -``` -# To improve the user experience, Botkube collects anonymized data. -# It does not collect any identifying information, and all analytics -# are used only as aggregated collection of data to improve Botkube -# and adjust its roadmap. -# Read our privacy policy at https://docs.botkube.io/privacy - -# Enable Botkube telemetry -botkube telemetry enable - - - -``` - -### Options - -``` - -h, --help help for enable -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics diff --git a/versioned_docs/version-1.10/cli/commands/botkube_uninstall.md b/versioned_docs/version-1.10/cli/commands/botkube_uninstall.md deleted file mode 100644 index cfcd752d..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube_uninstall.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: botkube uninstall ---- - -## botkube uninstall - -uninstall Botkube from cluster - -### Synopsis - -Use this command to uninstall the Botkube agent. - -``` -botkube uninstall [OPTIONS] [flags] -``` - -### Examples - -``` -# Uninstall default Botkube Helm release -botkube uninstall - -# Uninstall specific Botkube Helm release -botkube uninstall --release-name botkube-dev -``` - -### Options - -``` - -y, --auto-approve Skips interactive approval for deletion. - --cascade string Must be "background", "orphan", or "foreground". Selects the deletion cascading strategy for the dependents. Defaults to background. (default "background") - --description string add a custom description - --dry-run Simulate an uninstallation - -h, --help help for uninstall - --keep-history remove all associated resources and mark the release as deleted, but retain the release history - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - --namespace string Botkube namespace. (default "botkube") - --no-hooks prevent hooks from running during uninstallation - --release-name string Botkube Helm release name. (default "botkube") - --timeout duration time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s) - --wait if set, will wait until all the resources are deleted before returning. It will wait for as long as --timeout (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.10/cli/commands/botkube_version.md b/versioned_docs/version-1.10/cli/commands/botkube_version.md deleted file mode 100644 index 4603edb5..00000000 --- a/versioned_docs/version-1.10/cli/commands/botkube_version.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: botkube version ---- - -## botkube version - -Print the CLI version - -``` -botkube version [flags] -``` - -### Examples - -``` - -botkube version -botkube version -o=json -botkube version -o=yaml -botkube version -o=short - -``` - -### Options - -``` - -h, --help help for version - -o, --output string Output format. One of: json | pretty | short | yaml (default "pretty") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.10/cli/getting-started.mdx b/versioned_docs/version-1.10/cli/getting-started.mdx deleted file mode 100644 index 83004da0..00000000 --- a/versioned_docs/version-1.10/cli/getting-started.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -id: getting-started -title: "Getting Started" -sidebar_position: 1 ---- - -# Getting Started - -Botkube includes a command-line interface (CLI) that you can use to interact with Botkube and Botkube Cloud from your terminal, or from a script. - -## Installation - -Select tab depending on the system you use: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -Use Homebrew to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- -Alternatively, download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.10.0/botkube-darwin-arm64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -
- - - -Use Homebrew to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- -Alternatively, download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.10.0/botkube-darwin-amd64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -
- - - -Download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.10.0/botkube-linux-amd64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -:::note -You may need to use `sudo` to run the `mv` command as it moves the binary file to the `/usr/local/bin/` directory. -::: - -
- -Alternatively, if you use Homebrew, you can use it to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- - - -Use curl to download the Botkube CLI binary: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.10.0/botkube-windows-amd64.exe -``` - -Move the binary to a directory under your `%PATH%`. - - - - - -Use curl to download the Botkube CLI binary: - -```shell -export OS="" # allowed values: darwin, linux, windows -export ARCH="" # allowed values: amd64, arm64, armv7 -#export SUFFIX=".exe" # uncomment if OS is 'windows' -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.10.0/botkube-${OS}-${ARCH}${SUFFIX} -``` - -Move the binary to a directory under your `PATH`. - - - -
- -## First use - -For the commands that are nested under `cloud` command you first need to authenticate with Botkube cloud by running: - -```bash -botkube login -``` - -If credentials are valid, the output is: - -```shell -Login Succeeded -``` - -All available commands you can simply discover by running `botkube --help` or `botkube -h` to see the help output which corresponds to a given command. - -## Autocompletion - -To learn how to enable autocompletion for your shell, run: - -```bash -botkube completion --help -``` - -> **NOTE:** Be sure to **restart your shell** after installing autocompletion. - -When you start typing a `botkube` command, press the `` character to show a list of available completions. Type `-` to show available flag completions. diff --git a/versioned_docs/version-1.10/cli/migrate.md b/versioned_docs/version-1.10/cli/migrate.md deleted file mode 100644 index 6b434328..00000000 --- a/versioned_docs/version-1.10/cli/migrate.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: migrating-installation-to-botkube-cloud -title: "Migrating installation to Botkube Cloud" -sidebar_position: 2 ---- - -## Migrating installation to Botkube Cloud - -If you have started using Botkube with the Open Source installation, you have the option to migrate this instance to be managed using [Botkube Cloud](https://app.botkube.io/). - -To make the migration process easier, we provide a dedicated `botkube cloud migrate` command that seamlessly transfers your Botkube installation to Botkube Cloud. - -Supported Botkube platforms: - -- Socket Slack -- Discord -- Mattermost - -## Steps - -1. [Install Botkube CLI](./getting-started.mdx#installation) -2. [Login into Botkube Cloud](./getting-started.mdx#first-use) -3. Run Botkube migrate: - - ```bash - botkube cloud migrate - ``` - -## Limitations - -The following list contains current limitations that we will address in the near future: - -- `extraObjects` in Botkube [helm configurations](https://github.com/kubeshop/botkube/blob/593746a70d9eb23469c28e5c0274c9a40a7b651d/helm/botkube/values.yaml#L1040) are ignored. If you have any extra resources under `extraObjects` section, you need to migrate them on your own. -- Custom `rbac.groups` are ignored. -- All 3rd-party plugins are ignored. -- Minimal supported Botkube version is v1.0.0. - -## See more - -To learn more about `botkube cloud migrate` and all supported settings, visit the [Botkube migrate](./commands/botkube_migrate.md) document. diff --git a/versioned_docs/version-1.10/configuration/action.md b/versioned_docs/version-1.10/configuration/action.md deleted file mode 100644 index 147f96bf..00000000 --- a/versioned_docs/version-1.10/configuration/action.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -id: action -title: Action -sidebar_position: 5 ---- - -The action configuration allows you to automate your workflow by defining commands that are executed on an incoming event. Similar to communication platforms, actions use [source bindings](source/index.md) to define the event sources (command triggers) and [executor bindings](../configuration/executor) to run a given command. - -The actions can be disabled and enabled using dedicated commands. See the [Automated actions](../usage/automated-actions.md) usage document for more details. - -## Predefined actions - -There are two predefined actions available: - -- `describe-created-resource` - describes a newly created resource, -- `show-logs-on-error` - prints logs on Pod/StatefulSet/DaemonSet/Deployment error. - -Both of them are disabled by default. See details in the [Syntax](#syntax) section. - -## Action output - -The command output is sent to the communication platforms that define the same source bindings. If there is no communication platform defined with the same source bindings, the action is still executed, but the output is ignored. - -To learn more how to configure sources for communicators, read the [communication](./communication/index.md) documentation. - -## Command templates - -Each action defines the `command` property which defines a command to be executed. It supports [Go template](https://golang.org/pkg/text/template/) syntax. The command template is rendered before actual execution. - -The following variables are available: - -- `{{ .Event }}` - the event object that triggered the action. See all available event properties in the [`event.go`](https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go) file. - -There are multiple helper functions supported by the templating engine. To learn more, read the documentation on the [`slim-sprig`](https://go-task.github.io/slim-sprig/) library page. - -## Syntax - -```yaml -# Map of actions. Action contains configuration for automation based on observed events. -# The property name under `actions` object is an alias for a given configuration. You can define multiple actions configuration with different names. -# -# Format: actions.{alias} -actions: - "describe-created-resource": - # If true, enables the action. - enabled: false - # Action display name posted in the channels bound to the same source bindings. - displayName: "Describe created resource" - # Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). - # You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. - command: "kubectl describe {{ .Event.TypeMeta.Kind | lower }}{{ if .Event.Namespace }} -n {{ .Event.Namespace }}{{ end }} {{ .Event.Name }}" - - # Bindings for a given action. - bindings: - # Event sources that trigger a given action. - sources: - - k8s-create-events - # Executors configuration used to execute a configured command. - executors: - - k8s-default-tools - "show-logs-on-error": - # If true, enables the action. - enabled: false - - # Action display name posted in the channels bound to the same source bindings. - displayName: "Show logs on error" - # Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). - # You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available event properties on https://github.com/kubeshop/botkube/blob/main/pkg/event/event.go. - command: "kubectl logs {{ .Event.TypeMeta.Kind | lower }}/{{ .Event.Name }} -n {{ .Event.Namespace }}" - - # Bindings for a given action. - bindings: - # Event sources that trigger a given action. - sources: - - k8s-err-with-logs-events - # Executors configuration used to execute a configured command. - executors: - - k8s-default-tools -``` - -## RBAC - -The `ChannelName` RBAC policy is not supported for automated actions at this time. -Use the `Static` RBAC policy instead. For more information read the [RBAC](./rbac.md) documentation. diff --git a/versioned_docs/version-1.10/configuration/alias.md b/versioned_docs/version-1.10/configuration/alias.md deleted file mode 100644 index fb47775f..00000000 --- a/versioned_docs/version-1.10/configuration/alias.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -id: alias -title: Alias -sidebar_position: 4 ---- - -Botkube can define multiple aliases for arbitrary commands. The aliases are replaced with the underlying command before executing it. Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. - -Aliases work for all commands, including executor plugins and Botkube built-in ones. To learn more about how to configure Executors, see the [Executor](./executor/index.md) section. - -Aliases are defined globally for the whole Botkube installation. Once they are configured, read the [Aliases](../usage/executor/index.md#aliases) section in Usage document. - -## Botkube Cloud - -You can configure aliases in the Botkube Cloud dashboard. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click the **Aliases** link in the top right corner. -3. Click **Create new** button. -4. Provide display name, alias and command. - - For example, for `exec` plugin, you can provide display name as `Exec alias`, alias as `x`, and command as `exec`. - -5. Select instances for which you want to enable the alias. -6. Click **Apply** button. - -## Self-hosted Botkube syntax - -To configure the aliases for the self-hosted Botkube installation, use the following syntax: - -```yaml -# Custom aliases for given commands. -# The aliases are replaced with the underlying command before executing it. -# Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. -# -## Format: aliases.{alias} -aliases: - kc: - command: kubectl - displayName: "Kubectl alias" - k: - command: kubectl - displayName: "Kubectl alias" -## Multi-word alias example: -# kgp: -# command: kubectl get pods -# displayName: "Get pods" -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.10/configuration/assets/botkube-read-only.svg b/versioned_docs/version-1.10/configuration/assets/botkube-read-only.svg deleted file mode 100644 index d396ca54..00000000 --- a/versioned_docs/version-1.10/configuration/assets/botkube-read-only.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
dispatch
command
dispatch...
runs kubectl 
command
runs kubectl...
Slack
Slack
#general
#general
Kubernetes
Kubernetes
API Server
API Server
runs plugin
with dedicate
kubeconfig 
runs plugin...
resolves mapping
and generates
kubeconfig
resolves mapping...
#kubeconfig
group: general
#kubeconfiggroup...
uses
attached kubeconfig
uses...
kubectl plugin
kubectl plugin
# RBAC config mapping
botkube/kubectl:

context:
rbac:
group:
type: ChannelName
# RBAC config mapping...
Botkube Core
Botkube Core
Channels:
Channels:
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.10/configuration/assets/cloud-rbac-default.png b/versioned_docs/version-1.10/configuration/assets/cloud-rbac-default.png deleted file mode 100644 index d8882292..00000000 Binary files a/versioned_docs/version-1.10/configuration/assets/cloud-rbac-default.png and /dev/null differ diff --git a/versioned_docs/version-1.10/configuration/communication/index.md b/versioned_docs/version-1.10/configuration/communication/index.md deleted file mode 100644 index 4ac172a7..00000000 --- a/versioned_docs/version-1.10/configuration/communication/index.md +++ /dev/null @@ -1,243 +0,0 @@ ---- -id: communication -title: "Communication" -sidebar_position: 1 ---- - -The communication settings contain: - -- Configuration for communication platforms scoped in separate communication groups, -- Platform-specific options, such as multichannel configuration for platforms that support channels. - -The settings are applicable only for self-hosted Botkube installation. Cloud Slack and Microsoft Teams platforms are exclusive to Botkube Cloud. - -## Communication groups - -Communication group is a way to aggregate separate configurations for a set of communication platforms. You can specify multiple communication groups, and, in a result, support multiple Slack or Mattermost workspaces, Discord servers, or Elasticsearch server instances. - -Also, most platforms also support another level of multiple configurations within a workspace. For example, Slack supports multichannel configuration. To learn more about platform-specific options, see the [Syntax](#syntax) section. - -:::note -The purpose of the communication group is to allow using multiple workspaces, e.g. for Slack or Mattermost. To use multiple channels inside the same workspace, don't define separate communication groups, but use `channels` property under a given communication platform instead. -::: - -### Example - -Consider the following configuration: - -```yaml -communications: - "first-group": # Your own alias of a given communication group - socketSlack: - enabled: true - botToken: "{SLACK_BOT_TOKEN_1}" # Bot token for Botkube Slack app installed in Workspace 1 - appToken: "{SLACK_APP_TOKEN_1}" # App token for Botkube Slack app installed in Workspace 1 - channels: - "general": # Your own alias for the channel configuration - name: general - bindings: - executors: # Executors configuration for a given channel - - k8s-default-tools - sources: # Notification sources configuration for a given channel - - k8s-events - "random": # Your own alias for the channel configuration - name: random - bindings: - executors: [] # Executors configuration for a given channel - sources: # Notification sources configuration for a given channel - - k8s-events - "second-group": # Your own alias of a given communication group - socketSlack: - enabled: true - botToken: "{SLACK_BOT_TOKEN_2}" # Bot token for Botkube Slack app installed in Workspace 2 - appToken: "{SLACK_APP_TOKEN_2}" # App token for Botkube Slack app installed in Workspace 2 - channels: - "primary-channel": # Your own alias for the channel configuration - name: general - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: true - bindings: - executors: # Executors configuration for a given channel - - k8s-default-tools - sources: # Notification sources configuration for a given channel - - k8s-events -``` - -The example YAML configuration definition results in the following configuration. - -For Slack **Workspace 1**, as defined by the first communication group (`first-group`): - -- Notifications from `k8s-events` source are sent to the `general` and `random` channels. -- Commands from the `k8s-default-tools` configuration can be executed in the `general` channel. On `random` channel executors are not configured. - -For Slack **Workspace 2**, as defined by the second communication group (`second-group`): - -- Notifications are configured to be sent from the `k8s-events` source to the `general` channel. They are disabled by default, and can be enabled with `@Botkube` command or during Botkube upgrade. -- Commands from the `k8s-default-tools` configuration can be executed in the `general` channel. - -## Source and Executor Bindings - -Most of the communication platforms support executor and source bindings, which allows fine-tuning the notifications and allowed Botkube commands inside a given channel. - -With executor bindings you can configure which executors are allowed in a given channel. To read more about executor configuration, see the [Executor](../executor) document. - -With source bindings, you can specify which events are sent to a given channel (or, in case of Elasticsearch, index). To read more about source configuration, see the [Source](../source) document. - -## Syntax - -Each communication platform has specific options, however they share a similar syntax for consistency. -For example, bot integrations such as Slack, Mattermost or Discord have multichannel support, that is you can configure multiple channels with separate bindings. Same with Elasticsearch - you can forward notifications to multiple Elasticsearch indices, according to the sources configuration. - -```yaml -# Map of communication groups. Communication group contains settings for multiple communication platforms. -# The property name under `communications` object is an alias for a given configuration group. You can define multiple communication groups with different names. -# @default -- See the `values.yaml` file for full object. -# -## Format: communications.{alias} -communications: - "default-group": - ## Settings for Slack with Socket Mode. - socketSlack: - # If true, enables Slack bot. - enabled: false - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - ## Format: channels.{alias} - channels: - "default": - # Slack channel name without '#' prefix where you have added Botkube and want to receive notifications in. - name: "SLACK_CHANNEL" - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-err-events - - k8s-recommendation-events - # Slack bot token for your own Slack app. - # [Ref doc](https://api.slack.com/authentication/token-types). - botToken: "" - # Slack app-level token for your own Slack app. - # [Ref doc](https://api.slack.com/authentication/token-types). - appToken: "" - ## Settings for Mattermost. - mattermost: - # If true, enables Mattermost bot. - enabled: false - # User in Mattermost which belongs the specified Personal Access token. - botName: "Botkube" - # The URL (including http/https schema) where Mattermost is running. e.g https://example.com:9243 - url: "MATTERMOST_SERVER_URL" - # Personal Access token generated by Botkube user. - token: "MATTERMOST_TOKEN" - # The Mattermost Team name where Botkube is added. - team: "MATTERMOST_TEAM" - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - ## Format: channels.{alias} - channels: - "default": - # The Mattermost channel name for receiving Botkube alerts. - # The Botkube user needs to be added to it. - name: "MATTERMOST_CHANNEL" - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: false - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-err-events - - k8s-recommendation-events - - ## Settings for Discord. - discord: - # If true, enables Discord bot. - enabled: false - # Botkube Bot Token. - token: "DISCORD_TOKEN" - # Botkube Application Client ID. - botID: "DISCORD_BOT_ID" - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - ## Format: channels.{alias} - channels: - "default": - # Discord channel ID for receiving Botkube alerts. - # The Botkube user needs to be added to it. - id: "DISCORD_CHANNEL_ID" - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: false - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-err-events - - k8s-recommendation-events - - ## Settings for Elasticsearch. - elasticsearch: - # If true, enables Elasticsearch. - enabled: false - awsSigning: - # If true, enables awsSigning using IAM for Elasticsearch hosted on AWS. Make sure AWS environment variables are set. - # [Ref doc](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html). - enabled: false - # AWS region where Elasticsearch is deployed. - awsRegion: "us-east-1" - # AWS IAM Role arn to assume for credentials, use this only if you don't want to use the EC2 instance role or not running on AWS instance. - roleArn: "" - # The server URL, e.g https://example.com:9243 - server: "ELASTICSEARCH_ADDRESS" - # Basic Auth username. - username: "ELASTICSEARCH_USERNAME" - # Basic Auth password. - password: "ELASTICSEARCH_PASSWORD" - # If true, skips the verification of TLS certificate of the Elastic nodes. - # It's useful for clusters with self-signed certificates. - skipTLSVerify: false - # Specify the log level for Elasticsearch client. Leave empty to disable logging. - ## Possible values: "info", "error", "trace". - ## - "info": Logs information level messages. - ## - "error": Logs information and error level messages. - ## - "trace": Logs information, error, and trace level messages. - ## To disable logging, simply leave the logLevel empty or remove the line. - logLevel: "" - - # Map of configured indices. The `indices` property name is an alias for a given configuration. - # - ## Format: indices.{alias} - indices: - "default": - # Configures Elasticsearch index settings. - name: botkube - type: botkube-event - shards: 1 - replicas: 0 - bindings: - # Notification sources configuration for a given index. - sources: - - k8s-err-events - - k8s-recommendation-events - - ## Settings for Webhook. - webhook: - # If true, enables Webhook. - enabled: false - # The Webhook URL, e.g.: https://example.com:80 - url: "WEBHOOK_URL" - bindings: - # Notification sources configuration for the webhook. - sources: - - k8s-err-events - - k8s-recommendation-events -``` - -The default configuration for Helm chart can be found in [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml). diff --git a/versioned_docs/version-1.10/configuration/communication/vault-csi.md b/versioned_docs/version-1.10/configuration/communication/vault-csi.md deleted file mode 100644 index e9279d57..00000000 --- a/versioned_docs/version-1.10/configuration/communication/vault-csi.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -id: vault-csi -title: "Tokens from Vault via CSI driver" -sidebar_position: 1 ---- - -This tutorial shows how to install Botkube which takes the configuration from Vault instance. - -## Prerequisites - -- Kubernetes Clusters that supports CSI. - - For example, to run [K3s](https://k3s.io/) using [Lima](https://github.com/lima-vm/lima), run: - - ```bash - limactl start template://k3s - ``` - -- [Socket Slack integration installed](../../installation/slack/socket-slack.md). -- [`helm`](https://helm.sh/docs/intro/install/) v3 installed. -- [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) installed. - -## Steps - -This instruction guides you through the installation of Botkube and Vault on a Kubernetes cluster and configuring them together. - -1. Install Vault with CSI enabled: - - ```bash - helm repo add hashicorp https://helm.releases.hashicorp.com - helm repo update - helm install vault hashicorp/vault --namespace default \ - --set "server.dev.enabled=true" \ - --set "injector.enabled=false" \ - --set "csi.enabled=true" - ``` - -2. Add Slack token in Vault: - - ```bash - # Exec to pod - kubectl exec -n default -it vault-0 -- /bin/sh - ``` - - ```bash - # Write the token to Vault - vault kv put -mount=secret slack-app-token token=xapp-... - vault kv put -mount=secret slack-bot-token token=xoxb-... - ``` - -3. Enable Vault's Kubernetes authentication: - - ```bash - vault auth enable kubernetes - vault write auth/kubernetes/config \ - kubernetes_host="https://$KUBERNETES_PORT_443_TCP_ADDR:443" - ``` - - ```bash - vault policy write internal-app - < /tmp/values.yaml << ENDOFFILE - extraObjects: - - apiVersion: secrets-store.csi.x-k8s.io/v1 - kind: SecretProviderClass - metadata: - name: vault-database - spec: - provider: vault - parameters: - roleName: "database" - vaultAddress: "http://vault.default:8200" - objects: | - - objectName: "slack-app-token" - secretPath: "secret/data/slack-app-token" - secretKey: "token" - - objectName: "slack-bot-token" - secretPath: "secret/data/slack-bot-token" - secretKey: "token" - secretObjects: - - secretName: communication-slack - type: Opaque - data: - - objectName: "slack-app-token" - key: "slack-app-token" - - objectName: "slack-bot-token" - key: "slack-bot-token" - - communications: - 'default-group': - # Settings for SocketSlack - socketSlack: - enabled: true - channels: {} # configure your channels - # botToken - specified via env variable - # appToken - specified via env variable - - extraEnv: - - name: BOTKUBE_COMMUNICATIONS_DEFAULT-GROUP_SOCKET__SLACK_APP__TOKEN - valueFrom: - secretKeyRef: - name: communication-slack - key: slack-app-token - - name: BOTKUBE_COMMUNICATIONS_DEFAULT-GROUP_SOCKET__SLACK_BOT__TOKEN - valueFrom: - secretKeyRef: - name: communication-slack - key: slack-bot-token - - extraVolumeMounts: - - name: secrets-store-inline - mountPath: "/mnt/secrets-store" - readOnly: true - - extraVolumes: - - name: secrets-store-inline - csi: - driver: secrets-store.csi.k8s.io - readOnly: true - volumeAttributes: - secretProviderClass: "vault-database" - ENDOFFILE - ``` - -6. Install Botkube: - - :::note - You need to clone the https://github.com/kubeshop/botkube first. - ::: - - ```bash - helm install botkube --namespace default \ - -f /tmp/values.yaml \ - ./helm/botkube - ``` diff --git a/versioned_docs/version-1.10/configuration/executor/assets/flux-rbac.png b/versioned_docs/version-1.10/configuration/executor/assets/flux-rbac.png deleted file mode 100644 index 2f5cb08c..00000000 Binary files a/versioned_docs/version-1.10/configuration/executor/assets/flux-rbac.png and /dev/null differ diff --git a/versioned_docs/version-1.10/configuration/executor/doctor.md b/versioned_docs/version-1.10/configuration/executor/doctor.md deleted file mode 100644 index ca119f9d..00000000 --- a/versioned_docs/version-1.10/configuration/executor/doctor.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -id: doctor -title: Doctor -sidebar_position: 5 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The Botkube Doctor executor plugin allows you to run the `doctor` command directly in the chat window of each communication platform. Doctor is a ChatGPT integration project that knows how to diagnose Kubernetes problems and suggest solutions. - -The Doctor plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Doctor plugin. -6. Configure OpenAI API Key. - - Obtain it from the OpenAI website as described [here](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key) and set it as follows: - - ```yaml - apiKey: "" # Open AI API Key - ``` - -7. Click **Save** button. - -## Configuration Syntax - -The plugin supports the following configuration: - -```yaml -## Open API key for accessing the ChatGPT engine. You can get it at https://platform.openai.com/account/api-keys. -apiKey: "" -## OpenAI API Base URL. If empty, the default "https://api.openai.com/v1" value is used. -apiBaseUrl: "" -## Default engine to use. If empty, "text-davinci-003" engine is used. -defaultEngine: "" -## Optional organization ID for requests. -organizationID: "" -## User agent to use for requests. If empty, the default value is used ("go-gpt3"). -userAgent: "" -``` diff --git a/versioned_docs/version-1.10/configuration/executor/exec.md b/versioned_docs/version-1.10/configuration/executor/exec.md deleted file mode 100644 index 59c0f820..00000000 --- a/versioned_docs/version-1.10/configuration/executor/exec.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -id: exec -title: Exec -sidebar_position: 4 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The `exec` executor plugin allows you to install and run CLI applications directly from chat (e.g., Slack, Discord, or Mattermost) without any hassle. - -The `exec` plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -By default, the read-only `KUBECONFIG` is assigned. For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it from plugin's `context` configuration. To learn more refer to the [RBAC section](../rbac.md). - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the `exec` plugin. -6. Click **Save** button. - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# An array of templates that define how to convert the command output into an interactive message. -templates: - # Link to templates source - # It uses the go-getter library, which supports multiple URL formats (such as HTTP, Git repositories, or S3) and is able to unpack archives. - # For more details, see the documentation at https://github.com/hashicorp/go-getter. - - ref: github.com/kubeshop/botkube//cmd/executor/exec/templates?ref=release-1.8 -``` diff --git a/versioned_docs/version-1.10/configuration/executor/flux.md b/versioned_docs/version-1.10/configuration/executor/flux.md deleted file mode 100644 index 71bb2bcc..00000000 --- a/versioned_docs/version-1.10/configuration/executor/flux.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -id: flux -title: Flux -sidebar_position: 6 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The Botkube Flux executor plugin allows you to run the [`flux`](https://fluxcd.io/) CLI commands directly within the chat window of your chosen communication platform. - -The Flux plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Prerequisite elevated RBAC permissions - -One of the plugin capabilities is the `flux diff` command. To use it, you need to update the Flux plugin RBAC configuration. This is necessary because the command performs a server-side dry run that requires patch permissions, as specified in the [Kubernetes documentation](https://kubernetes.io/docs/reference/using-api/api-concepts/#dry-run-authorization). - -First, create RBAC resources on your cluster: - -```shell -cat > /tmp/flux-rbac.yaml << ENDOFFILE ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: flux -rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list", "patch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: flux -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: flux -subjects: -- kind: Group - name: flux - apiGroup: rbac.authorization.k8s.io -ENDOFFILE - -kubectl apply -f /tmp/flux-rbac.yaml -``` - -Next, use the `flux` group in the plugin RBAC configuration: - -![Flux RBAC](./assets/flux-rbac.png) - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Flux plugin. -6. Click **Configure** button and then **Configuration as Code** tab. -7. Configure optional GitHub access token. - -The Flux plugin comes with integrated GitHub support. To enable it, you'll need a valid [GitHub token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token). Set the token with the following configuration: - -```yaml -github: - auth: - accessToken: "" # your GitHub access token -``` - -6. Click **Save** button. - -By default, the Flux plugin has read-only access. To perform actions like creating or deleting Flux-related sources, you'll need to customize the [RBAC](../rbac.md#configuration). - -## Configuration Syntax - -The plugin supports the following configuration: - -```yaml -github: - auth: - # GitHub access token. - # Instructions for token creation: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token. - # Lack of token may limit functionality, e.g., adding comments to pull requests or approving them. - accessToken: "" -log: - level: "info" -``` diff --git a/versioned_docs/version-1.10/configuration/executor/helm.md b/versioned_docs/version-1.10/configuration/executor/helm.md deleted file mode 100644 index 4830990d..00000000 --- a/versioned_docs/version-1.10/configuration/executor/helm.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: helm -title: Helm -sidebar_position: 3 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The Botkube Helm executor plugin allows you to run the `helm` command directly in the chat window of each communication platform. - -The Helm plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -By default, just the read-only `helm` commands are supported. For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it in the RBAC configuration. To learn more, refer to the [RBAC section](../rbac.md). - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Helm plugin. -6. Click **Save** button. - -## Configuration Syntax - -The plugin supports the following configuration: - -```yaml -# Configures the default Namespace for executing Botkube `helm` commands. If not set, uses 'default'. -defaultNamespace: "default" -# Allowed values are configmap, secret, memory. -helmDriver: "secret" -# Location for storing Helm configuration. -helmConfigDir: "/tmp/helm/" -config directory. -# Location for storing Helm cache. -helmCacheDir: "/tmp/helm/.cache" -``` - -## Merging strategy - -For all collected `helm` executors bindings, configuration properties are overridden based on the order of the binding list for a given channel. The priority is given to the last binding specified on the list. Empty properties are omitted. diff --git a/versioned_docs/version-1.10/configuration/executor/index.md b/versioned_docs/version-1.10/configuration/executor/index.md deleted file mode 100644 index 89126e1a..00000000 --- a/versioned_docs/version-1.10/configuration/executor/index.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -id: executor -title: Executor -sidebar_position: 3 ---- - -The executor configuration allows you to define multiple executor configurations that can be later referred in [communication](../communication) bindings. For example, take a look at such executor definition: - -```yaml -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: - -```yaml -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: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Next, you can configure executor from a given repository: - -```yaml -executors: - "plugins": - repo-name/executor-name@v1.0.0: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} -``` - -For all executor configuration properties, see the [**syntax**](#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. - -```yaml -# 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 - -```yaml -# 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/echo@v1.10.0: # Plugin name syntax: /[@]. 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.10.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](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.10/configuration/executor/kubectl.md b/versioned_docs/version-1.10/configuration/executor/kubectl.md deleted file mode 100644 index 621dde26..00000000 --- a/versioned_docs/version-1.10/configuration/executor/kubectl.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -id: kubectl -title: Kubectl -sidebar_position: 2 ---- - -The Botkube Kubectl executor plugin allows you to run the `kubectl` command directly in the chat window of each communication platform. - -By default, just the read-only `kubectl` commands are supported. For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it in the RBAC configuration. To learn more, refer to the [RBAC section](../rbac.md). - -## Enabling plugin - -### Self-hosted Botkube installation - -The Kubectl plugin is hosted by the official Botkube plugin repository. First, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.10.0/plugins-index.yaml -``` - -To enable Kubectl executor, add ``--set 'executors.k8s-default-tools.botkube/kubectl.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# Configures the default Namespace for executing Botkube `kubectl` commands. If not set, uses the 'default'. -defaultNamespace: "default" -# Configures the interactive kubectl command builder. -interactiveBuilder: - allowed: - # Configures which K8s namespace are displayed in namespace dropdown. - # If not specified, plugin needs to have access to fetch all Namespaces, otherwise Namespace dropdown won't be visible at all. - namespaces: ["default"] - # Configures which `kubectl` methods are displayed in commands dropdown. - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - # Configures which K8s resource are displayed in resources dropdown. - resources: ["deployments", "pods", "namespaces"] -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -## Merging strategy - -For all collected `kubectl` executors bindings, configuration properties are overridden based on the order of the binding list for a given channel. The priority is given to the last binding specified on the list. Empty properties are omitted. - -### Example - -Consider such configuration in the Botkube self-hosted installation: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - name: "random" - bindings: - executors: - - kubectl-one - - kubectl-two - - kubectl-three - -executors: - "kubectl-one": - kubectl: - enabled: true - config: - defaultNamespace: "default" - interactiveBuilder: - allowed: - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - resources: ["deployments", "pods", "namespaces"] - "kubectl-two": - kubectl: - enabled: true - config: - interactiveBuilder: - allowed: - namespaces: ["default"] - verbs: ["api-resources", "top"] - "kubectl-three": - kubectl: - enabled: false - config: - interactiveBuilder: - allowed: - namespaces: ["kube-system"] -``` - -We can see that: - -- Only the `default` namespace is displayed in the interactive command builder. This is a result of merging `kubectl-one` and `kubectl-two`. The `kubectl-three` binding is not taken into account as it's disabled. -- Only the `api-resources` and `top` verbs are displayed in the interactive command builder as they are overridden by the `kubectl-two`. -- All resources defined in `kubectl-one` are displayed in the interactive command builder as other enabled bindings don't override this property. diff --git a/versioned_docs/version-1.10/configuration/general.md b/versioned_docs/version-1.10/configuration/general.md deleted file mode 100644 index deb37cb8..00000000 --- a/versioned_docs/version-1.10/configuration/general.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: general -title: General -sidebar_position: 6 ---- - -The general settings holds a general configuration for the Botkube backend. For example, log level, disabling config watcher and similar. - -## Syntax - -```yaml -# General Botkube configuration. -settings: - # Cluster name to differentiate incoming messages. - clusterName: not-configured - # If true, notifies about new Botkube releases. - upgradeNotifier: true - # Botkube logging settings. - log: - # Sets one of the log levels. Allowed values: `info`, `warn`, `debug`, `error`, `fatal`, `panic`. - level: info - # Configures log format. Allowed values: `text`, `json`. - formatter: json - # If true, disable ANSI colors in logging. Ignored when `json` formatter is used. - disableColors: false - -# Parameters for the Config Watcher component which reloads Botkube on ConfigMap changes. -# It restarts Botkube when configuration data change is detected. It watches ConfigMaps and/or Secrets with the `botkube.io/config-watch: "true"` label from the namespace where Botkube is installed. -configWatcher: - # If true, restarts the Botkube Pod on config changes. - enabled: true - # In-cluster Config Watcher configuration. It is used when remote configuration is not provided. - inCluster: - # Resync period for the Config Watcher informers. - informerResyncPeriod: 10m -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.10/configuration/helm-chart-parameters.md b/versioned_docs/version-1.10/configuration/helm-chart-parameters.md deleted file mode 100644 index e8bef726..00000000 --- a/versioned_docs/version-1.10/configuration/helm-chart-parameters.md +++ /dev/null @@ -1,240 +0,0 @@ ---- -id: helm-chart-parameters -title: Helm chart parameters -sidebar_position: 8 ---- - -![Version: v1.10.0](https://img.shields.io/badge/Version-v1.10.0-informational?style=flat-square) ![AppVersion: v1.10.0](https://img.shields.io/badge/AppVersion-v1.10.0-informational?style=flat-square) - -Controller for the Botkube Slack app which helps you monitor your Kubernetes cluster, debug deployments and run specific checks on resources in the cluster. - -**Homepage:** [botkube.io](https://botkube.io) - -## Maintainers - -| Name | Email | -| ---------------- | --------------------- | -| Botkube Dev Team | `dev-team@botkube.io` | - -## Source Code - -- [github.com/kubeshop/botkube](https://github.com/kubeshop/botkube) - -## Parameters - -| Key | Type | Default | Description | -| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [image.registry](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L14) | string | `"ghcr.io"` | Botkube container image registry. | -| [image.repository](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L16) | string | `"kubeshop/botkube"` | Botkube container image repository. | -| [image.pullPolicy](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L18) | string | `"IfNotPresent"` | Botkube container image pull policy. | -| [image.tag](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L20) | string | `"v1.10.0"` | Botkube container image tag. Default tag is `appVersion` from Chart.yaml. | -| [podSecurityPolicy](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L24) | object | `{"enabled":false}` | Configures Pod Security Policy to allow Botkube to run in restricted clusters. [Ref doc](https://kubernetes.io/docs/concepts/policy/pod-security-policy/). | -| [securityContext](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L30) | object | Runs as a Non-Privileged user. | Configures security context to manage user Privileges in Pod. [Ref doc](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod). | -| [containerSecurityContext](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L36) | object | `{"allowPrivilegeEscalation":false,"privileged":false,"readOnlyRootFilesystem":true}` | Configures container security context. [Ref doc](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container). | -| [rbac](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L43) | object | `{"create":true,"groups":{"botkube-plugins-default":{"create":true,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list"]}]}},"rules":[],"serviceAccountMountPath":"/var/run/7e7fd2f5-b15d-4803-bc52-f54fba357e76/secrets/kubernetes.io/serviceaccount","staticGroupName":""}` | Role Based Access for Botkube Pod and plugins. [Ref doc](https://kubernetes.io/docs/admin/authorization/rbac/). | -| [rbac.serviceAccountMountPath](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L47) | string | `"/var/run/7e7fd2f5-b15d-4803-bc52-f54fba357e76/secrets/kubernetes.io/serviceaccount"` | It is used to specify a custom path for mounting a service account to the Botkube deployment. This is important because we run plugins within the same Pod, and we want to avoid potential bugs when plugins rely on the default in-cluster K8s client configuration. Instead, they should always use kubeconfig specified directly for a given plugin. | -| [rbac.create](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L50) | bool | `true` | Configure RBAC resources for Botkube and (deprecated) `staticGroupName` subject with `rules`. For creating RBAC resources related to plugin permissions, use the `groups` property. | -| [rbac.rules](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L52) | list | `[]` | Deprecated. Use `rbac.groups` instead. | -| [rbac.staticGroupName](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L54) | string | `""` | Deprecated. Use `rbac.groups` instead. | -| [rbac.groups](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L56) | object | `{"botkube-plugins-default":{"create":true,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list"]}]}}` | Use this to create RBAC resources for specified group subjects. | -| [kubeconfig.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L67) | bool | `false` | If true, enables overriding the Kubernetes auth. | -| [kubeconfig.base64Config](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L69) | string | `""` | A base64 encoded kubeconfig that will be stored in a Secret, mounted to the Pod, and specified in the KUBECONFIG environment variable. | -| [kubeconfig.existingSecret](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L74) | string | `""` | A Secret containing a kubeconfig to use. | -| [actions](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L81) | object | See the `values.yaml` file for full object. | Map of actions. Action contains configuration for automation based on observed events. The property name under `actions` object is an alias for a given configuration. You can define multiple actions configuration with different names. | -| [actions.describe-created-resource.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L84) | bool | `false` | If true, enables the action. | -| [actions.describe-created-resource.displayName](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L86) | string | `"Describe created resource"` | Action display name posted in the channels bound to the same source bindings. | -| [actions.describe-created-resource.command](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L91) | string | See the `values.yaml` file for the command in the Go template form. | Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available Kubernetes event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. | -| [actions.describe-created-resource.bindings](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L94) | object | `{"executors":["k8s-default-tools"],"sources":["k8s-create-events"]}` | Bindings for a given action. | -| [actions.describe-created-resource.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L96) | list | `["k8s-create-events"]` | Event sources that trigger a given action. | -| [actions.describe-created-resource.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L99) | list | `["k8s-default-tools"]` | Executors configuration used to execute a configured command. | -| [actions.show-logs-on-error.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L103) | bool | `false` | If true, enables the action. | -| [actions.show-logs-on-error.displayName](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L106) | string | `"Show logs on error"` | Action display name posted in the channels bound to the same source bindings. | -| [actions.show-logs-on-error.command](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L111) | string | See the `values.yaml` file for the command in the Go template form. | Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available Kubernetes event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. | -| [actions.show-logs-on-error.bindings](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L113) | object | `{"executors":["k8s-default-tools"],"sources":["k8s-err-with-logs-events"]}` | Bindings for a given action. | -| [actions.show-logs-on-error.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L115) | list | `["k8s-err-with-logs-events"]` | Event sources that trigger a given action. | -| [actions.show-logs-on-error.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L118) | list | `["k8s-default-tools"]` | Executors configuration used to execute a configured command. | -| [sources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L127) | object | See the `values.yaml` file for full object. | Map of sources. Source contains configuration for Kubernetes events and sending recommendations. The property name under `sources` object is an alias for a given configuration. You can define multiple sources configuration with different names. Key name is used as a binding reference. | -| [sources.k8s-recommendation-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L132) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L157) | object | `{"ingress":{"backendServiceValid":true,"tlsSecretValid":true},"pod":{"labelsSet":true,"noLatestImageTag":true}}` | Describes configuration for various recommendation insights. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L159) | object | `{"labelsSet":true,"noLatestImageTag":true}` | Recommendations for Pod Kubernetes resource. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod.noLatestImageTag](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L161) | bool | `true` | If true, notifies about Pod containers that use `latest` tag for images. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod.labelsSet](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L163) | bool | `true` | If true, notifies about Pod resources created without labels. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L165) | object | `{"backendServiceValid":true,"tlsSecretValid":true}` | Recommendations for Ingress Kubernetes resource. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress.backendServiceValid](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L167) | bool | `true` | If true, notifies about Ingress resources with invalid backend service reference. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress.tlsSecretValid](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L169) | bool | `true` | If true, notifies about Ingress resources with invalid TLS secret reference. | -| [sources.k8s-all-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L175) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L181) | object | See the `values.yaml` file for full object. | Filter settings for various sources. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters.objectAnnotationChecker](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L183) | bool | `true` | If true, enables support for `botkube.io/disable` resource annotation. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters.nodeEventsChecker](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L185) | bool | `true` | If true, filters out Node-related events that are not important. | -| [sources.k8s-all-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L189) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-create-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L193) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-all-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L193) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-err-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L193) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L193) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-all-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L203) | object | `{"message":{"exclude":[],"include":[]},"reason":{"exclude":[],"include":[]},"types":["create","delete","error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L205) | list | `["create","delete","error"]` | Lists all event types to be watched. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L211) | object | `{"exclude":[],"include":[]}` | Optional list of exact values or regex patterns to filter events by event reason. Skipped, if both include/exclude lists are empty. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason.include](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L213) | list | `[]` | Include contains a list of allowed values. It can also contain regex expressions. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason.exclude](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L216) | list | `[]` | Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. Exclude list is checked before the Include list. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L219) | object | `{"exclude":[],"include":[]}` | Optional list of exact values or regex patterns to filter event by event message. Skipped, if both include/exclude lists are empty. If a given event has multiple messages, it is considered a match if any of the messages match the constraints. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message.include](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L221) | list | `[]` | Include contains a list of allowed values. It can also contain regex expressions. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message.exclude](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L224) | list | `[]` | Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. Exclude list is checked before the Include list. | -| [sources.k8s-all-events.botkube/kubernetes.config.annotations](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L228) | object | `{}` | Filters Kubernetes resources to watch by annotations. Each resource needs to have all the specified annotations. Regex expressions are not supported. | -| [sources.k8s-all-events.botkube/kubernetes.config.labels](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L231) | object | `{}` | Filters Kubernetes resources to watch by labels. Each resource needs to have all the specified labels. Regex expressions are not supported. | -| [sources.k8s-all-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L238) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources to watch. Resources are identified by its type in `{group}/{version}/{kind (plural)}` format. Examples: `apps/v1/deployments`, `v1/pods`. Each resource can override the namespaces and event configuration by using dedicated `event` and `namespaces` field. Also, each resource can specify its own `annotations`, `labels` and `name` regex. | -| [sources.k8s-err-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L352) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-err-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L359) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-err-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L363) | object | `{"types":["error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-err-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L365) | list | `["error"]` | Lists all event types to be watched. | -| [sources.k8s-err-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L370) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L396) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L403) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L407) | object | `{"types":["error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L409) | list | `["error"]` | Lists all event types to be watched. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L414) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.k8s-create-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L427) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-create-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L434) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-create-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L438) | object | `{"types":["create"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-create-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L440) | list | `["create"]` | Lists all event types to be watched. | -| [sources.k8s-create-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L445) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [executors](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L463) | object | See the `values.yaml` file for full object. | Map of executors. Executor contains configuration for running `kubectl` commands. The property name under `executors` is an alias for a given configuration. You can define multiple executor configurations with different names. Key name is used as a binding reference. | -| [executors.k8s-default-tools.botkube/kubectl.config](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L472) | object | See the `values.yaml` file for full object including optional properties related to interactive builder. | Custom kubectl configuration. | -| [aliases](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L497) | object | See the `values.yaml` file for full object. | Custom aliases for given commands. The aliases are replaced with the underlying command before executing it. Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. | -| [existingCommunicationsSecretName](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L518) | string | `""` | Configures existing Secret with communication settings. It MUST be in the `botkube` Namespace. To reload Botkube once it changes, add label `botkube.io/config-watch: "true"`. | -| [communications](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L525) | object | See the `values.yaml` file for full object. | Map of communication groups. Communication group contains settings for multiple communication platforms. The property name under `communications` object is an alias for a given configuration group. You can define multiple communication groups with different names. | -| [communications.default-group.socketSlack.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L530) | bool | `false` | If true, enables Slack bot. | -| [communications.default-group.socketSlack.channels](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L534) | object | `{"default":{"bindings":{"executors":["k8s-default-tools"],"sources":["k8s-err-events","k8s-recommendation-events"]},"name":"SLACK_CHANNEL"}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.socketSlack.channels.default.name](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L537) | string | `"SLACK_CHANNEL"` | Slack channel name without '#' prefix where you have added Botkube and want to receive notifications in. | -| [communications.default-group.socketSlack.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L540) | list | `["k8s-default-tools"]` | Executors configuration for a given channel. | -| [communications.default-group.socketSlack.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L543) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for a given channel. | -| [communications.default-group.socketSlack.botToken](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L548) | string | `""` | Slack bot token for your own Slack app. [Ref doc](https://api.slack.com/authentication/token-types). | -| [communications.default-group.socketSlack.appToken](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L551) | string | `""` | Slack app-level token for your own Slack app. [Ref doc](https://api.slack.com/authentication/token-types). | -| [communications.default-group.mattermost.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L555) | bool | `false` | If true, enables Mattermost bot. | -| [communications.default-group.mattermost.botName](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L557) | string | `"Botkube"` | User in Mattermost which belongs the specified Personal Access token. | -| [communications.default-group.mattermost.url](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L559) | string | `"MATTERMOST_SERVER_URL"` | The URL (including http/https schema) where Mattermost is running. e.g https://example.com:9243 | -| [communications.default-group.mattermost.token](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L561) | string | `"MATTERMOST_TOKEN"` | Personal Access token generated by Botkube user. | -| [communications.default-group.mattermost.team](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L563) | string | `"MATTERMOST_TEAM"` | The Mattermost Team name where Botkube is added. | -| [communications.default-group.mattermost.channels](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L567) | object | `{"default":{"bindings":{"executors":["k8s-default-tools"],"sources":["k8s-err-events","k8s-recommendation-events"]},"name":"MATTERMOST_CHANNEL","notification":{"disabled":false}}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.mattermost.channels.default.name](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L571) | string | `"MATTERMOST_CHANNEL"` | The Mattermost channel name for receiving Botkube alerts. The Botkube user needs to be added to it. | -| [communications.default-group.mattermost.channels.default.notification.disabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L574) | bool | `false` | If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. | -| [communications.default-group.mattermost.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L577) | list | `["k8s-default-tools"]` | Executors configuration for a given channel. | -| [communications.default-group.mattermost.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L580) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for a given channel. | -| [communications.default-group.discord.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L587) | bool | `false` | If true, enables Discord bot. | -| [communications.default-group.discord.token](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L589) | string | `"DISCORD_TOKEN"` | Botkube Bot Token. | -| [communications.default-group.discord.botID](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L591) | string | `"DISCORD_BOT_ID"` | Botkube Application Client ID. | -| [communications.default-group.discord.channels](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L595) | object | `{"default":{"bindings":{"executors":["k8s-default-tools"],"sources":["k8s-err-events","k8s-recommendation-events"]},"id":"DISCORD_CHANNEL_ID","notification":{"disabled":false}}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.discord.channels.default.id](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L599) | string | `"DISCORD_CHANNEL_ID"` | Discord channel ID for receiving Botkube alerts. The Botkube user needs to be added to it. | -| [communications.default-group.discord.channels.default.notification.disabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L602) | bool | `false` | If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. | -| [communications.default-group.discord.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L605) | list | `["k8s-default-tools"]` | Executors configuration for a given channel. | -| [communications.default-group.discord.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L608) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for a given channel. | -| [communications.default-group.elasticsearch.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L615) | bool | `false` | If true, enables Elasticsearch. | -| [communications.default-group.elasticsearch.awsSigning.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L619) | bool | `false` | If true, enables awsSigning using IAM for Elasticsearch hosted on AWS. Make sure AWS environment variables are set. [Ref doc](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html). | -| [communications.default-group.elasticsearch.awsSigning.awsRegion](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L621) | string | `"us-east-1"` | AWS region where Elasticsearch is deployed. | -| [communications.default-group.elasticsearch.awsSigning.roleArn](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L623) | string | `""` | AWS IAM Role arn to assume for credentials, use this only if you don't want to use the EC2 instance role or not running on AWS instance. | -| [communications.default-group.elasticsearch.server](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L625) | string | `"ELASTICSEARCH_ADDRESS"` | The server URL, e.g https://example.com:9243 | -| [communications.default-group.elasticsearch.username](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L627) | string | `"ELASTICSEARCH_USERNAME"` | Basic Auth username. | -| [communications.default-group.elasticsearch.password](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L629) | string | `"ELASTICSEARCH_PASSWORD"` | Basic Auth password. | -| [communications.default-group.elasticsearch.skipTLSVerify](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L632) | bool | `false` | If true, skips the verification of TLS certificate of the Elastic nodes. It's useful for clusters with self-signed certificates. | -| [communications.default-group.elasticsearch.logLevel](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L639) | string | `""` | Specify the log level for Elasticsearch client. Leave empty to disable logging. | -| [communications.default-group.elasticsearch.indices](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L644) | object | `{"default":{"bindings":{"sources":["k8s-err-events","k8s-recommendation-events"]},"name":"botkube","replicas":0,"shards":1,"type":"botkube-event"}}` | Map of configured indices. The `indices` property name is an alias for a given configuration. | -| [communications.default-group.elasticsearch.indices.default.name](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L647) | string | `"botkube"` | Configures Elasticsearch index settings. | -| [communications.default-group.elasticsearch.indices.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L653) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for a given index. | -| [communications.default-group.webhook.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L660) | bool | `false` | If true, enables Webhook. | -| [communications.default-group.webhook.url](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L662) | string | `"WEBHOOK_URL"` | The Webhook URL, e.g.: https://example.com:80 | -| [communications.default-group.webhook.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L665) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for the webhook. | -| [settings.clusterName](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L672) | string | `"not-configured"` | Cluster name to differentiate incoming messages. | -| [settings.healthPort](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L675) | int | `2114` | Health check port. | -| [settings.upgradeNotifier](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L677) | bool | `true` | If true, notifies about new Botkube releases. | -| [settings.log.level](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L681) | string | `"info"` | Sets one of the log levels. Allowed values: `info`, `warn`, `debug`, `error`, `fatal`, `panic`. | -| [settings.log.disableColors](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L683) | bool | `false` | If true, disable ANSI colors in logging. Ignored when `json` formatter is used. | -| [settings.log.formatter](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L685) | string | `"json"` | Configures log format. Allowed values: `text`, `json`. | -| [settings.systemConfigMap](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L688) | object | `{"name":"botkube-system"}` | Botkube's system ConfigMap where internal data is stored. | -| [settings.persistentConfig](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L693) | object | `{"runtime":{"configMap":{"annotations":{},"name":"botkube-runtime-config"},"fileName":"_runtime_state.yaml"},"startup":{"configMap":{"annotations":{},"name":"botkube-startup-config"},"fileName":"_startup_state.yaml"}}` | Persistent config contains ConfigMap where persisted configuration is stored. The persistent configuration is evaluated from both chart upgrade and Botkube commands used in runtime. | -| [ssl.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L708) | bool | `false` | If true, specify cert path in `config.ssl.cert` property or K8s Secret in `config.ssl.existingSecretName`. | -| [ssl.existingSecretName](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L714) | string | `""` | Using existing SSL Secret. It MUST be in `botkube` Namespace. | -| [ssl.cert](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L717) | string | `""` | SSL Certificate file e.g certs/my-cert.crt. | -| [service](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L720) | object | `{"name":"metrics","port":2112,"targetPort":2112}` | Configures Service settings for ServiceMonitor CR. | -| [serviceMonitor](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L727) | object | `{"enabled":false,"interval":"10s","labels":{},"path":"/metrics","port":"metrics"}` | Configures ServiceMonitor settings. [Ref doc](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitor). | -| [deployment.annotations](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L737) | object | `{}` | Extra annotations to pass to the Botkube Deployment. | -| [deployment.livenessProbe](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L739) | object | `{"failureThreshold":35,"initialDelaySeconds":1,"periodSeconds":2,"successThreshold":1,"timeoutSeconds":1}` | Liveness probe. | -| [deployment.livenessProbe.initialDelaySeconds](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L741) | int | `1` | The liveness probe initial delay seconds. | -| [deployment.livenessProbe.periodSeconds](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L743) | int | `2` | The liveness probe period seconds. | -| [deployment.livenessProbe.timeoutSeconds](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L745) | int | `1` | The liveness probe timeout seconds. | -| [deployment.livenessProbe.failureThreshold](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L747) | int | `35` | The liveness probe failure threshold. | -| [deployment.livenessProbe.successThreshold](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L749) | int | `1` | The liveness probe success threshold. | -| [deployment.readinessProbe](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L752) | object | `{"failureThreshold":35,"initialDelaySeconds":1,"periodSeconds":2,"successThreshold":1,"timeoutSeconds":1}` | Readiness probe. | -| [deployment.readinessProbe.initialDelaySeconds](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L754) | int | `1` | The readiness probe initial delay seconds. | -| [deployment.readinessProbe.periodSeconds](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L756) | int | `2` | The readiness probe period seconds. | -| [deployment.readinessProbe.timeoutSeconds](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L758) | int | `1` | The readiness probe timeout seconds. | -| [deployment.readinessProbe.failureThreshold](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L760) | int | `35` | The readiness probe failure threshold. | -| [deployment.readinessProbe.successThreshold](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L762) | int | `1` | The readiness probe success threshold. | -| [extraAnnotations](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L769) | object | `{}` | Extra annotations to pass to the Botkube Pod. | -| [extraLabels](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L771) | object | `{}` | Extra labels to pass to the Botkube Pod. | -| [priorityClassName](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L773) | string | `""` | Priority class name for the Botkube Pod. | -| [nameOverride](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L776) | string | `""` | Fully override "botkube.name" template. | -| [fullnameOverride](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L778) | string | `""` | Fully override "botkube.fullname" template. | -| [resources](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L784) | object | `{}` | The Botkube Pod resource request and limits. We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. [Ref docs](https://kubernetes.io/docs/user-guide/compute-resources/) | -| [extraEnv](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L796) | list | `[{"name":"LOG_LEVEL_SOURCE_BOTKUBE_KUBERNETES","value":"debug"}]` | Extra environment variables to pass to the Botkube container. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables). | -| [extraVolumes](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L810) | list | `[]` | Extra volumes to pass to the Botkube container. Mount it later with extraVolumeMounts. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/volume/#Volume). | -| [extraVolumeMounts](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L825) | list | `[]` | Extra volume mounts to pass to the Botkube container. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1). | -| [nodeSelector](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L843) | object | `{}` | Node labels for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/user-guide/node-selection/). | -| [tolerations](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L847) | list | `[]` | Tolerations for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/). | -| [affinity](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L851) | object | `{}` | Affinity for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). | -| [serviceAccount.create](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L855) | bool | `true` | If true, a ServiceAccount is automatically created. | -| [serviceAccount.name](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L858) | string | `""` | The name of the service account to use. If not set, a name is generated using the fullname template. | -| [serviceAccount.annotations](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L860) | object | `{}` | Extra annotations for the ServiceAccount. | -| [extraObjects](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L863) | list | `[]` | Extra Kubernetes resources to create. Helm templating is allowed as it is evaluated before creating the resources. | -| [analytics.disable](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L891) | bool | `false` | If true, sending anonymous analytics is disabled. To learn what date we collect, see [Privacy Policy](https://docs.botkube.io/privacy#privacy-policy). | -| [configWatcher](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L895) | object | `{"enabled":true,"inCluster":{"informerResyncPeriod":"10m"}}` | Parameters for the Config Watcher component which reloads Botkube on ConfigMap changes. It restarts Botkube when configuration data change is detected. It watches ConfigMaps and/or Secrets with the `botkube.io/config-watch: "true"` label from the namespace where Botkube is installed. | -| [configWatcher.enabled](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L897) | bool | `true` | If true, restarts the Botkube Pod on config changes. | -| [configWatcher.inCluster](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L899) | object | `{"informerResyncPeriod":"10m"}` | In-cluster Config Watcher configuration. It is used when remote configuration is not provided. | -| [configWatcher.inCluster.informerResyncPeriod](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L901) | string | `"10m"` | Resync period for the Config Watcher informers. | -| [plugins](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L904) | object | `{"cacheDir":"/tmp","healthCheckInterval":"10s","incomingWebhook":{"enabled":true,"port":2115,"targetPort":2115},"repositories":{"botkube":{"url":"https://github.com/kubeshop/botkube/releases/download/v1.10.0/plugins-index.yaml"}},"restartPolicy":{"threshold":10,"type":"DeactivatePlugin"}}` | Configuration for Botkube executors and sources plugins. | -| [plugins.cacheDir](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L906) | string | `"/tmp"` | Directory, where downloaded plugins are cached. | -| [plugins.repositories](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L908) | object | `{"botkube":{"url":"https://github.com/kubeshop/botkube/releases/download/v1.10.0/plugins-index.yaml"}}` | List of plugins repositories. Each repository defines the URL and optional `headers` | -| [plugins.repositories.botkube](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L910) | object | `{"url":"https://github.com/kubeshop/botkube/releases/download/v1.10.0/plugins-index.yaml"}` | This repository serves officially supported Botkube plugins. | -| [plugins.incomingWebhook](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L915) | object | `{"enabled":true,"port":2115,"targetPort":2115}` | Configure Incoming webhook for source plugins. | -| [plugins.restartPolicy](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L920) | object | `{"threshold":10,"type":"DeactivatePlugin"}` | Botkube Restart Policy on plugin failure. | -| [plugins.restartPolicy.type](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L922) | string | `"DeactivatePlugin"` | Restart policy type. Allowed values: "RestartAgent", "DeactivatePlugin". | -| [plugins.restartPolicy.threshold](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L924) | int | `10` | Number of restarts before policy takes into effect. | -| [config](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L928) | object | `{"provider":{"apiKey":"","endpoint":"https://api.botkube.io/graphql","identifier":""}}` | Configuration for synchronizing Botkube configuration. | -| [config.provider](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L930) | object | `{"apiKey":"","endpoint":"https://api.botkube.io/graphql","identifier":""}` | Base provider definition. | -| [config.provider.identifier](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L933) | string | `""` | Unique identifier for remote Botkube settings. If set to an empty string, Botkube won't fetch remote configuration. | -| [config.provider.endpoint](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L935) | string | `"https://api.botkube.io/graphql"` | Endpoint to fetch Botkube settings from. | -| [config.provider.apiKey](https://github.com/kubeshop/botkube/blob/release-1.10/helm/botkube/values.yaml#L937) | string | `""` | Key passed as a `X-API-Key` header to the provider's endpoint. | - -### AWS IRSA on EKS support - -AWS has introduced IAM Role for Service Accounts in order to provide fine-grained access. This is useful if you are looking to run Botkube inside an EKS cluster. For more details visit https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html. - -Annotate the Botkube Service Account as shown in the example below and add the necessary Trust Relationship to the corresponding Botkube role to get this working. - -``` -serviceAccount: - annotations: - eks.amazonaws.com/role-arn: "{role_arn_to_assume}" -``` diff --git a/versioned_docs/version-1.10/configuration/index.mdx b/versioned_docs/version-1.10/configuration/index.mdx deleted file mode 100644 index 5b643c8b..00000000 --- a/versioned_docs/version-1.10/configuration/index.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -id: configuration -title: Configuration -sidebar_position: 3 ---- - -Botkube backend allows you to specify [source](./source), [executor](./executor), [communication](./communication), and [general](./general) Botkube settings. Check the related documents for more detailed explanation. - -The configuration settings are read from two sources: - -- the configuration files specified by the `BOTKUBE_CONFIG_PATHS` environment variable or `--config/-c` flag. For example: - - ```bash - export BOTKUBE_CONFIG_PATHS="global.yaml,team-b-specific.yaml" - # or - ./botkube --config "global.yaml,team-b-specific.yaml" - ``` - - You can split individual settings into multiple configuration files. The priority will be given to the last (right-most) file specified. Files with `_` name prefix are always read as the last ones. See the [merging strategy](#merging-strategy) section for more details. - - :::note - For Helm installation, Botkube uses `_runtime_state.yaml` and `_startup_state.yaml` files to store its internal state. Remember to keep these files in the `BOTKUBE_CONFIG_PATHS` environment variable. - ::: - -- the exported [environment variables](#environment-variables) that overrides the configuration specified in the files. - -## Helm install options - -Advanced Helm install options are documented [here](helm-chart-parameters). - -## Updating the configuration - -To update Botkube configuration, you can either: - -- upgrade Botkube installation with Helm, -- or use dedicated `@Botkube` commands, to e.g. toggle notifications or edit Source Bindings. See the [Usage](../usage/index.md) document for more details. - -If you wish to change the configuration with Helm, create a `/tmp/values.yaml` file that contains the new values and run: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -```shell -botkube install -f /tmp/values.yaml -``` - - - - - -```shell -helm upgrade -n botkube botkube -f /tmp/values.yaml helm/botkube --wait -``` - - - - -As both Helm release upgrade and some of the `@Botkube` commands modify the same configuration, it is merged during command execution. -Whenever you specify a new value in the `/tmp/values.yaml` file, it will override the existing value in the configuration. - -### Preventing overrides by default Helm chart values - -Keep in mind that even if you don't specify custom values in the `/tmp/values.yaml` file, Helm can override the existing values with the default ones. - -Consider the following config: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - botToken: "{botToken}" - appToken: "{appToken}" - channels: - "default": - name: general - notification: - disabled: false # default from the Helm chart - bindings: - sources: - - k8s-all-events # default from the Helm chart -# (...) -``` - -Assume that users ran the following commands: - -``` -@Botkube edit SourceBindings k8s-err-events, k8s-recommendation-events -@Botkube disable notifications -``` - -Which effectively result in the following config that Botkube sees: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - botToken: "{botToken}" - appToken: "{appToken}" - channels: - "default": - name: general - notification: - disabled: true # set by user command - bindings: - sources: - - k8s-err-events # set by user command - - k8s-recommendation-events # set by user command -# (...) -``` - -To persist the configuration that users provided, and not overwrite notification and source bindings values, run Helm upgrade with: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - name: general - notification: null # explicitly not use defaults from Helm chart - bindings: - sources: null # explicitly not use defaults from Helm chart -# (...) other values -``` - -The following properties need such `null` value during upgrade, if you want to keep the previous configuration: - -- `communications.default-group.{communication-platform}.channels.default.notifications`, where `{communication-platform}` is any communication platform supported except Microsoft Teams, -- `communications.default-group.{communication-platform}.channels.default.bindings.sources`, where `{communication-platform}` is any communication platform supported except Microsoft Teams, -- `communications.default-group.teams.bindings.sources`. - -To learn more, read the [Deleting a default key](https://helm.sh/docs/chart_template_guide/values_files/#deleting-a-default-key) paragraph in Helm documentation. - -## Environment variables - -The individual communication settings can be specified via environment variables. They take priority and override the configuration specified in the file. - -To construct the environment variable name, take any property from the configuration file and make it uppercase. Use the underscore for properties that are nested. Use the double underscore for all camelCase properties. Finally, add the `BOTKUBE_` prefix. - -For example, such configuration property from YAML: - -```yaml -settings: - kubectl: - defaultNamespace: "NAMESPACE" -``` - -is mapped to the `BOTKUBE_SETTINGS_KUBECTL_DEFAULT__NAMESPACE` environment variable. - -This is a useful feature that allows you to store the overall configuration in a file, where sensitive data, such as tokens, can be put in environment variables. See the [**Tokens from Vault via CSI driver**](./communication/vault-csi/) tutorial for an example use-case. - -## Merging strategy - -Botkube allows you to split individual settings into multiple configuration files. The following rules apply: - -- The priority will be given to the last (right-most) file specified. -- Files with `_` name prefix are always read as the last ones following the initial order. -- Objects are merged together and primitive fields are overridden. For example: - - ```yaml - # a.yaml - first file - settings: - clusterName: dev-cluster - kubectl: - enabled: false - ``` - - ```yaml - # _a.yaml - second file with `_` prefix - settings: - clusterName: demo-cluster - ``` - - ```yaml - # b.yaml - third file - settings: - kubectl: - enabled: true - ``` - - ```yaml - # result - settings: - clusterName: demo-cluster - kubectl: - enabled: true - ``` - -- The arrays items are not merged, they are overridden. For example: - - ```yaml - # a.yaml - settings: - kubectl: - enabled: true - commands: - verbs: - ["api-resources", "api-versions", "cluster-info", "describe", "diff", "explain", "get", "logs", "top", "auth"] - ``` - - ```yaml - # b.yaml - settings: - kubectl: - commands: - verbs: ["get", "logs", "top", "auth"] - ``` - - ```yaml - # result - settings: - kubectl: - enabled: true - commands: - verbs: ["get", "logs", "top", "auth"] - ``` diff --git a/versioned_docs/version-1.10/configuration/rbac.md b/versioned_docs/version-1.10/configuration/rbac.md deleted file mode 100644 index eae9381c..00000000 --- a/versioned_docs/version-1.10/configuration/rbac.md +++ /dev/null @@ -1,432 +0,0 @@ ---- -id: rbac -title: RBAC -sidebar_position: 4 ---- - -Botkube allows plugins to access Kubernetes API by defining [RBAC](https://en.wikipedia.org/wiki/Role-based_access_control) rules as part of plugin `context.rbac` configuration. Kubeconfig generation needs to be requested by defining `context.rbac` property. - -Based on this configuration Botkube generates a temporary [kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) with user and/or group impersonation. -This kubeconfig is available to plugins in the `Execute` and `Stream` contexts. - -## Architecture - -Botkube uses its own cluster credentials to generate a temporary kubeconfig, and the kubeconfig uses [user/group impersonation](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation). - -For source plugins, the kubeconfig is generated once - during plugin startup. -For executor plugins, the kubeconfig is generated every time a command is sent to the plugin, which allows greater flexibility, such as including the name of the channel the command was sent from. - -![diagram](assets/botkube-read-only.svg "diagram") - -## Configuration - -For each executor and source plugin, you can define a `context.rbac` configuration. This config is used to generate a dedicated kubeconfig. - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static # Static or ChannelName - static: # applicable only for "Static" user mapping type - value: botkube-internal-static-user - prefix: "" # optional prefix for user name; useful especially for channel name mapping - group: - type: Static # Static or ChannelName - static: # applicable only for "Static" group mapping type - values: - - "my-group1" - - "my-group2" - prefix: "" # optional prefix for all group names; useful especially for channel name mapping -``` - -### Mapping types - -For both user and group, the following mapping types are supported: - -- `Static` - - For user, it uses a single static value. For group, it uses a list of static values. The value is prepended with an optional prefix. - -- `ChannelName` - - Channel name is used as subject for user or group impersonation. The channel name is prepended with an optional prefix. - This mapping is only available for executor plugins. - -### Default configuration - -When a given plugin have `context.rbac` property undefined, Botkube doesn't generate a kubeconfig for this plugin. To request kubeconfig generation, define `context.rbac` property with empty value: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: {} # enable kubeconfig generation -``` - -However, such configuration will generate a kubeconfig with empty impersonation config, which effectively means an anonymous access to the Kubernetes API. - -During Botkube installation, Botkube generates Kubernetes ClusterRole and ClusterRoleBinding resources with read-only access for the default group `botkube-plugins-default`. This group is used by default across the `values.yaml` for all default plugins. - -```yaml -rbac: - # ... - groups: - "botkube-plugins-default": - create: true - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] -``` - -See the [`values.yaml`](https://github.com/kubeshop/botkube/blob/v1.10.0/helm/botkube/values.yaml) for more details. - -#### Defaults for user mapping when group mapping is used - -Kubernetes requires user for group impersonation. That's why when a group mapping is user without `context.rbac.user` mapping defined, Botkube uses `botkube-internal-static-user` user name for impersonation. -For example, when the following configuration is used: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - # no user mapping defined - group: - type: Static - static: - value: botkube-plugins-default -``` - -It is equivalent to: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static - static: - value: botkube-internal-static-user - group: - type: Static - static: - value: botkube-plugins-default -``` - -#### Defaults for Botkube Cloud - -When configuring plugin on Botkube Cloud, the "Default" permissions mean that the `botkube-plugins-default` group will be used, which have read-only access to Kubernetes API and is configured during Botkube installation. See the [Default configuration](#default-configuration) section. - -![Cloud RBAC defaults](./assets/cloud-rbac-default.png) - -## Examples - -This paragraph contains examples of RBAC configuration for different use cases. - -:::tip -You can use `rbac.groups` or `extraObjects` overrides during Botkube installation to create custom RBAC resources. See the [`values.yaml`](https://github.com/kubeshop/botkube/blob/v1.10.0/helm/botkube/values.yaml) for more details. -::: - -### Kubectl executor with read-only Pod access based on static group mapping - -In this example an executor plugin is defined with static RBAC that maps to group `read-pods`. - -1. Consider the following Botkube config: - - ```yaml - # ... - executors: - "kubectl-read-only": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - group: - type: Static - static: - values: [read-pods] - ``` - -Let's assume this plugin is bound to at least one channel. - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: kubectl-read-pods - rules: - - apiGroups: [""] - resources: ["pods"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: kubectl-read-pods - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kubectl-read-pods - subjects: - - kind: Group - name: read-pods # <-- this is the group name used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, when this executor plugin is invoked, Botkube generates a kubeconfig impersonating group `read-pods` and passes it to the plugin. The plugin then can authenticate with the API server with identity of group `read-pods`. In that way, the plugin can use read-only operations on Pods. - -### Kubernetes source plugin with read-only access based on static user mapping - -In this example a single source plugin is defined with static RBAC that maps to user `kubernetes-read-only`. - -1. Consider the following Botkube config: - - ```yaml - sources: - "kubernetes": - botkube/kubernetes@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static - static: - value: kubernetes-read-only - ``` - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: reader - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: reader - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: reader - subjects: - - kind: User - name: kubernetes-read-only # <-- this is the username used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, the source plugin can access all Kubernetes resources with read-only permissions. - -### Kubectl executor plugin with different permissions based on channel name mapping - -In this example **kubectl** executor plugin is configured with channel name mapping and bound to two channels, `ch-1` and `ch-2`. In Kubernetes RBAC resources, group `ch-1` is given write access, while group `ch-2` is given only read access. - -1. Consider the following Botkube config: - - ```yaml - executors: - "kubectl": - botkube/kubectl@v1: - # ... - enabled: true - context: - rbac: - group: - type: ChannelName - communications: - "default-group": - socketSlack: - enabled: true - # ... - channels: - "ch-1": - name: ch-1 - bindings: - executors: - - kubectl - "ch-2": - name: ch-2 - bindings: - executors: - - kubectl - # ... - ``` - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: editor - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list", "update", "create", "delete"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: editor - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: editor - subjects: - - kind: Group - name: ch-1 # <-- channel name used in Botkube config - apiGroup: rbac.authorization.k8s.io - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: read-only - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: read-only - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: read-only - subjects: - - kind: Group - name: ch-2 # <-- channel name used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, users in channel `ch-1` can execute all kubectl commands, while users in channel `ch-2` can only execute read-only commands. - -## Limitations - -This paragraph contains limitations of the current implementation. - -### Shared file system - -Botkube runs plugin processes in the same container within the same Pod. Therefore, all plugins share the same file system. - -If you're a plugin developer and decide to write kubeconfig to the file system, be aware -that it can be accessible by all plugins in the container. - -### RBAC configuration merging - -The same executor plugins with different RBAC configuration cannot be bound to the same channel. This is validated during Botkube startup and will result in an error. - -For example, the following configuration is invalid: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - # ... - channels: - "ch-1": - name: ch-1 - bindings: - executors: - - kubectl - - kubectl-read-only -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: # Different RBAC configuration - group: - type: ChannelName - "kubectl-read-only": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: # Different RBAC configuration - user: - type: Static - static: - value: kubectl-read-only -``` - -### Supported RBAC mappings - -While Executor plugins support multiple mapping types, there are the following limitations: - -- Source plugins support only the `Static` mapping. -- Automated [actions](../usage/automated-actions.md) support only the `Static` mapping. - -## Troubleshooting - -In most cases troubleshooting Botkube RBAC issues means [troubleshooting Kubernetes RBAC](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access), where `kubectl auth` command can help. - -If you see the following error: - -``` -Error: create: failed to create: secrets is forbidden: User "botkube-internal-static-user" cannot create resource "secrets" in API group "" in the namespace "default" -``` - -that means the RBAC rules configured for a given plugin are insufficient in a given context. - -Firstly, ensure what user/group is used for impersonation. To do that, check your configuration against the mapping description from the [Configuration](#configuration) section. - -### Checking available actions for a given user/group - -After obtaining proper user and group, use the following command to list all available actions for a given user and/or group: - -```shell -kubectl auth can-i --as {user} --as-group {group} --list -``` - -For example, to list all available actions for user `botkube-internal-static-user` and group `private-channel` use: - -```shell -kubectl auth can-i --as botkube-internal-static-user --as-group private-channel --list -``` - -### Checking if a given user/group can perform a given action - -To verify if a given user and/or group can perform a given action, use: - -```shell -kubectl auth can-i get pod -n botkube --as {user} --as-group {group} -``` - -For example, to verify if user `botkube-internal-static-user` and group `private-channel` can get Secret in namespace `botkube` use: - -```shell -kubectl auth can-i get secret -n botkube --as botkube-internal-static-user --as-group private-channel -``` - -## Plugin development - -If you are a plugin developer and want to learn how to use generated kubeconfig in the plugin codebase, refer to [Using kubeconfig](../plugin/using-kubeconfig.md) document. diff --git a/versioned_docs/version-1.10/configuration/source/argocd.md b/versioned_docs/version-1.10/configuration/source/argocd.md deleted file mode 100644 index e817e033..00000000 --- a/versioned_docs/version-1.10/configuration/source/argocd.md +++ /dev/null @@ -1,520 +0,0 @@ ---- -id: argocd -title: ArgoCD -sidebar_position: 5 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -ArgoCD source plugin sends events from ArgoCD to configured communication platforms. During startup, the plugin configures ArgoCD webhooks, triggers, templates and subscriptions based on the [ArgoCD Notification Catalog](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/catalog/). -It uses native [ArgoCD notifications](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/triggers/) configuration to send the events to Botkube communication platforms. - -The ArgoCD source plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Prerequisite elevated RBAC permissions - -ArgoCD plugin requires specific RBAC permissions. -First, create RBAC resources on your cluster: - -```shell -cat > /tmp/argocd-rbac.yaml << ENDOFFILE ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: argocd -rules: - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "update"] - - apiGroups: ["argoproj.io"] - resources: ["applications"] - verbs: ["get", "patch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: argocd -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: argocd -subjects: -- kind: Group - name: argocd - apiGroup: rbac.authorization.k8s.io -ENDOFFILE - -kubectl apply -f /tmp/argocd-rbac.yaml -``` - -Next, use the `argocd` static group name in the plugin RBAC configuration: - -![ArgoCD RBAC](assets/argocd-rbac.png) - -## Enabling plugin - -:::note -In order to enable the plugin, ArgoCD has to be already installed on the cluster and all watched Applications need to be created. - -Also, remember to create RBAC resources for the plugin. See the [Elevated RBAC permissions required](#prerequisite-elevated-rbac-permissions) section. -::: - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the ArgoCD plugin. -6. Click **Save** button. -7. Provide at least one ArgoCD application name and namespace in the configuration. - -```yaml -defaultSubscriptions: - applications: - - name: guestbook - namespace: argocd -``` - -You can watch multiple ArgoCD Applications at the same time, for example: - -```yaml -defaultSubscriptions: - applications: - - name: guestbook - namespace: argocd - - name: second-app - namespace: second-app-namespace -``` - -1. Click **Save**. - -## Cleanup - -When you disable or remove the plugin, it won't revert all changes made during the plugin startup. To clean up all ArgoCD follow the manual steps: - -- Clean up ArgoCD Notifications ConfigMap. It is usually named `argocd-notifications-cm` in the `argocd` Namespace. - - Remove all properties that contains `b-` or `botkube-` prefixes in the name. - - - Webhook property name follows the syntax `service.webhook.{webhook-name}`. For example, the `service.webhook.b-784e` property was created by Botkube. - - Template property name follows the syntax `template.{template-name}`. For example, the `template.template.botkube-argocd-ch05k-app-health-degraded` property was created by Botkube. - - Trigger property name follows the syntax `trigger.{trigger-name}`. For example, the `trigger.b-372839f86ed61c4c88` property was created by Botkube. - -- Remove all `argocd.argoproj.io/notifications` annotations from ArgoCD Applications which contain `b-` prefix in the trigger and webhook names. - - The annotation key pattern is `notifications.argoproj.io/subscribe.{trigger-name}.{webhook-name}`. For example, the annotation `notifications.argoproj.io/subscribe.b-5cc4c004df01230f72.b-efc0: ""` was created by Botkube and it should be deleted if the plugin is disabled. - -## Configuration Syntax - -### Basic configuration - -This section lists all basic configuration options for the ArgoCD source plugin. The ArgoCD notification config is created automatically during plugin startup and uses triggers and templates based on the [ArgoCD Notification Catalog](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/catalog/). - -```yaml -defaultSubscriptions: - # Provide application name and namespace to subscribe to all events for a given application. - applications: - - name: "guestbook" - namespace: "argocd" -argoCD: - # ArgoCD UI base URL. It is used for generating links in the incoming events. - uiBaseUrl: http://localhost:8080 - # ArgoCD Notifications ConfigMap reference. - notificationsConfigMap: - name: argocd-notifications-cm - namespace: argocd -``` - -### Advanced configuration - -The basic configuration should be sufficient for most users. However, you can customize all triggers, templates, webhook registration and more. For advanced properties, see the full default configuration below: - -```yaml -log: - level: "info" - -# Interactivity configures command dropdown and additional buttons -# for platforms which support interactivity (`isInteractive: true`) such as Socket Slack or Cloud Slack. -interactivity: - enableViewInUIButton: true - enableOpenRepositoryButton: true - commandVerbs: - - "get" - - "describe" - -# ArgoCD-related configuration. -argoCD: - # ArgoCD UI base URL. It is used for generating links in the incoming events. - uiBaseUrl: http://localhost:8080 - # ArgoCD Notifications ConfigMap reference. - notificationsConfigMap: - name: argocd-notifications-cm - namespace: argocd - -# Webhook configuration. -webhook: - # If true, it registers Botkube webhook in ArgoCD notification config. - register: true - # If the name exceeds 6 characters, it might be truncated and modified to match the external constraints. - name: "b-{{ .SourceName }}" - url: "{{ .IncomingWebhook.FullURLForSource }}" - -# Triggers and templates are based on https://github.com/argoproj/argo-cd/blob/master/notifications_catalog/install.yaml. -# Trigger might be created from existing template (`fromExisting`) or from scratch (`create`). -notifications: - - trigger: - # fromExisting: - # name: on-created - # templateName: "botkube-{{ .SourceName }}-app-created" - create: - # If the name exceeds 20 characters, it might be modified to match the external constraints. - name: "b-{{ .SourceName }}-create" - conditions: # syntax: https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/triggers/ - - description: Application is created. - oncePer: app.metadata.name - when: "true" - send: - - "botkube-{{ .SourceName }}-app-created" # template Name, you can use templating here - subscriptions: &triggerSubscriptions # Even if false, the default subscriptions are still created. - create: true - # Additional subscriptions apart from `defaultSubscriptions` - additional: - [] - # - name: "guestbook" - # namespace: "argocd" - - trigger: - create: - name: "b-{{ .SourceName }}-delete" - conditions: - - description: Application is deleted. - oncePer: app.metadata.name - when: app.metadata.deletionTimestamp != nil - send: - - "botkube-{{ .SourceName }}-app-deleted" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName}}-deploy" - conditions: - - description: Application is synced and healthy. Triggered once per commit. - oncePer: app.status.operationState.syncResult.revision - when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status - == 'Healthy' - send: - - "botkube-{{ .SourceName }}-app-deployed" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName}}-degrade" - conditions: - - description: Application has degraded - when: app.status.health.status == 'Degraded' - send: - - "botkube-{{ .SourceName }}-app-health-degraded" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName }}-fail" - conditions: - - description: Application syncing has failed - when: app.status.operationState != nil and app.status.operationState.phase in ['Error', - 'Failed'] - send: - - "botkube-{{ .SourceName }}-app-sync-failed" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName }}-run" - conditions: - - description: Application is being synced - when: app.status.operationState != nil and app.status.operationState.phase in ['Running'] - send: - - "botkube-{{ .SourceName }}-app-sync-running" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName }}-unknown" - conditions: - - description: Application status is 'Unknown' - when: app.status.sync.status == 'Unknown' - send: - - "botkube-{{ .SourceName }}-app-sync-status-unknown" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName }}-success" - conditions: - - description: Application syncing has succeeded - when: app.status.operationState != nil and app.status.operationState.phase in ['Succeeded'] - send: - - "botkube-{{ .SourceName }}-app-sync-succeeded" - subscriptions: *triggerSubscriptions - -templates: - - name: "botkube-{{ .SourceName }}-app-created" - body: | - { - "message": { - "sections": [ - { "header": ":new: Application `{{.app.metadata.name}}` has been created" } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - name: "botkube-{{ .SourceName }}-app-deleted" - body: | - { - "message": { - "sections": [ - { "header": ":no_entry_sign: Application `{{.app.metadata.name}}` has been deleted" } - ] - } - } - - name: "botkube-{{ .SourceName }}-app-deployed" - body: | - { - "message": { - "sections": [ - { - "header": ":rocket: New version of the application `{{.app.metadata.name}}` is up and running", - "textFields": [ - { - "key": "Sync Status", - "value": "{{.app.status.sync.status}}" - }, - { - "key": "Health Status", - "value": "{{.app.status.health.status}}" - }, - { - "key": "Revision", - "value": "{{.app.status.sync.revision}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - name: "botkube-{{ .SourceName }}-app-health-degraded" - body: | - { - "message": { - "sections": [ - { - "header": ":exclamation: Application `{{.app.metadata.name}}` has degraded", - "textFields": [ - { - "key": "Health Status", - "value": "{{.app.status.health.status}}" - }, - { - "key": "Revision", - "value": "{{.app.status.sync.revision}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - name: "botkube-{{ .SourceName }}-app-sync-failed" - body: | - { - "message": { - "timestamp": "{{.app.status.operationState.finishedAt}}", - "sections": [ - { - "header": ":exclamation: The sync operation of application `{{.app.metadata.name}}` failed", - "textFields": [ - { - "key": "Error message", - "value": "{{.app.status.operationState.message}}" - }, - { - "key": "Sync Status", - "value": "{{.app.status.sync.status}}" - }, - { - "key": "Revision", - "value": "{{.app.status.sync.revision}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}?operation=true", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - - name: "botkube-{{ .SourceName }}-app-sync-running" - body: | - { - "message": { - "timestamp": "{{.app.status.operationState.startedAt}}", - "sections": [ - { - "header": ":bulb: The sync operation of application `{{.app.metadata.name}}` started", - "textFields": [ - { - "key": "Sync Status", - "value": "{{.app.status.sync.status}}" - }, - {{ if and (.app.status.operationState) (.app.status.operationState.operation) }} - { - "key": "Initiated by", - "value": "{{.app.status.operationState.operation.initiatedBy.username}}" - }, - {{ if .app.status.operationState.operation.initiatedBy.automated }} - { - "key": "Automated", - "value": "{{.app.status.operationState.operation.initiatedBy.automated}}" - }, - {{ end }} - {{ end }} - { - "key": "Revision", - "value": "{{.app.status.sync.revision}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}?operation=true", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - name: "botkube-{{ .SourceName }}-app-sync-status-unknown" - body: | - { - "message": { - "sections": [ - { - "header": ":warning: Application `{{.app.metadata.name}}` sync status is unknown", - "textFields": [ - { - "key": "Sync Status", - "value": "{{.app.status.sync.status}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - name: "botkube-{{ .SourceName }}-app-sync-succeeded" - body: | - { - "message": { - "timestamp": "{{.app.status.operationState.finishedAt}}", - "sections": [ - { - "header": ":white_check_mark: Application `{{.app.metadata.name}}` has ben successfully synced", - "textFields": [ - { - "key": "Sync Status", - "value": "{{.app.status.sync.status}}" - }, - { - "key": "Health Status", - "value": "{{.app.status.health.status}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}?operation=true", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } -``` diff --git a/versioned_docs/version-1.10/configuration/source/assets/argocd-rbac.png b/versioned_docs/version-1.10/configuration/source/assets/argocd-rbac.png deleted file mode 100644 index 8634e19e..00000000 Binary files a/versioned_docs/version-1.10/configuration/source/assets/argocd-rbac.png and /dev/null differ diff --git a/versioned_docs/version-1.10/configuration/source/github-events.md b/versioned_docs/version-1.10/configuration/source/github-events.md deleted file mode 100644 index 5e829923..00000000 --- a/versioned_docs/version-1.10/configuration/source/github-events.md +++ /dev/null @@ -1,249 +0,0 @@ ---- -id: github-events -title: GitHub Events -sidebar_position: 4 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The GitHub Events source sends events for configured GitHub repositories. These events can be sent to communication channels or actions. To learn how to bind sources to communication channels or actions, refer to the [Communication](../communication/index.md) and [Action](../action.md) documents. - -The GitHub Events plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the GitHub Events plugin. -6. Click **Save** button. - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# Logger configuration settings. -log: - level: info - format: json - -# GitHub client configuration settings. -github: - # Auth allows you to set either PAT or APP credentials. - # If none provided then watch functionality could not work properly, e.g. you can reach the API calls quota or if you are setting GitHub Enterprise base URL then an unauthorized error can occur. - auth: - # The GitHub access token. - # Instruction for creating a token can be found here: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token. - accessToken: your-github-token - # AppConfig represents the GitHub App configuration. - # This replaces the AccessToken. - app: - # GitHub App ID for authentication. - id: "" - - # GitHub App Installation ID. - installationId: "" - - # GitHub App private key in PEM format. - privateKey: "" - # The GitHub base URL for API requests. Defaults to the public GitHub API, but can be set to a domain endpoint to use with GitHub Enterprise. - # Default: https://api.github.com/ - baseUrl: "" - - # The GitHub upload URL for uploading files. It is taken into account only when the BaseURL is also set. If only the BaseURL is provided then this parameter defaults to the BaseURL value. - # Default: https://uploads.github.com/ - uploadUrl: "" - -# refreshDuration defines how often we should call GitHub REST API to check repository events. -# It's the same for all configured repositories. For example, if you configure 5s refresh time, and you have 3 repositories registered, -# we will execute maximum 2160 calls which easily fits into PAT rate limits. -# You can create multiple plugins configuration with dedicated tokens to have the rate limits increased. -# -# NOTE: -# - we use conditional requests (https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#conditional-requests), so if there are no events the call doesn't count against your rate limits.\ -# - if you configure file pattern matcher for merged pull request events we execute one more additional call to check which files were changed in the context of a given pull request -# -# Rate limiting: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting -refreshDuration: 10s - -repositories: - - name: owner/repo1 - on: - pullRequests: - - types: [open, merged] # Allowed pull request types (open, closed, merged). - paths: - # Included file patterns for pull request changes. - include: ["kustomize/.*"] - # Excluded file patterns for pull request changes. - # exclude: [ '.*\.js' ] - labels: - # Included labels for pull requests. - include: ["bug"] - # Excluded labels for pull requests. - # exclude: [ 'enhancement' ] - notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " - - - name: owner/repo2 - on: - # EventsAPI watches for /events API containing events triggered by activity on GitHub. - # This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. - # source: https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events - events: - # WatchEvent for now emitted only when someone stars a repository. - # https://docs.github.com/en/webhooks-and-events/events/github-event-types#watchevent - - type: "WatchEvent" - - # IssuesEvent with json path filter - - type: "IssuesEvent" - # The JSONPath expression to filter events - jsonPath: ".action" - # The value to match in the JSONPath result - value: "opened" - notificationTemplate: - previewTpl: |- - Issue Opened - - #{{ .Issue.Number }} {{ .Issue.Title }} - State: {{ .Issue.State }} - extraButtons: - - displayName: Open - url: "{{ .Issue.HTMLURL }}" - style: primary -``` - -## Authorization - -You can use either a [personal access token](#github-personal-access-token) or a [GitHub App](#github-app) for authentication. -By using GitHub Apps, you can increase your maximum rate limits because multiple GitHub Apps are independent and do not share the rate limits. However, using multiple Personal Access Tokens (PATs) for the same account will result in sharing the same rate limit. - -### GitHub personal access token - -Follow the instructions [here](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token) to create a token. The required scope differs for public and private repositories. - -### GitHub App - -To use a GitHub App: - -1. [Create a GitHub App](https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app). No callback or webhook URL is needed. -2. Add read-only permission to the "Members" item of organization permissions. -3. [Install the app in your organization](https://docs.github.com/en/developers/apps/managing-github-apps/installing-github-apps). -4. Done! Use the following details for authentication: - - | Name | Description | - | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | GitHub App Private Key | PEM-format key generated when the app is installed. If you lost it, you can regenerate it ([docs](https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key)). | - | GitHub App ID | Found in the app's "About" page (Organization settings -> Developer settings -> Edit button on your app). | - | GitHub App Installation ID | Found in the URL your organization's app install page (Organization settings -> Github Apps -> Configure button on your app). It's the last number in the URL, ex: `https://github.com/organizations/{my-org}/settings/installations/1234567890`. | - -## Subscriptions - -The GitHub Events source plugin uses polling instead of Webhook endpoint for retrieving GitHub events. It calls two types of GitHub REST API endpoints with a configured refresh time window: - -- [`/repos/{owner}/{repo}/events`](https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events) for `on.events` configuration -- [`/repos/{owner}/{repo}/pulls`](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests) for `on.pullRequests` configuration - -By default, we use [conditional requests](https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#conditional-requests) to prevent excessive API calls. As a result, from `on.pullRequests` triggers may have up to a 60-second delay due to caching. - -### Pull requests - -For a configured `refreshDuration` we call the [`/repos/{owner}/{repo}/pulls`](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests) endpoint for all registered repositories. It's configured to fetch 100 pull requests that were recently modified. We ignore all events that were already processed. - -#### Matching criteria - -If no matching criteria are specified, all pull requests will be reported. For example: - -```yaml -repositories: - - name: owner/repo1 - on: - pullRequests: [] -``` - -To narrow down emitted events, you can specify at least one of the available criteria: - -- `types`: This is a list of pull request types for which the event should be triggered. The allowed types are: `open`, `closed`, `merged`. - -- `paths.include`: This is a list of file patterns for which the event should be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `["kustomize/.*"]`. - -- `paths.exclude`: This is a list of file patterns for which the event should not be triggered. It also supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `['.*\.js']`. This exclusion criteria takes precedence over `paths.include`. - -- `labels.include`: This is a list of label patterns for which the event should be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `["backend-.*"]`. - -- `labels.exclude`: This is a list of label patterns for which the event should not be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `['bug']`. This exclusion criteria takes precedence over `labels.include`. - -#### Templating - -You can customize the notification template with additional buttons: - -```yaml -notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " -``` - -For the `commandTpl` you can use all fields that are available on [`pullRequest`](https://github.com/google/go-github/blob/899235e0a9d750d6fecf9048a676046d50f9d4a3/github/pulls.go#L29-L85) type. - -### Events - -For a configured `refreshDuration` we call the [`/repos/{owner}/{repo}/events`](https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events) endpoint for all registered repositories. - -:::note -This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. -::: - -The Events API covers various event types. Refer to the [GitHub event types](https://docs.github.com/en/webhooks-and-events/events/github-event-types) page for more information. - -#### Matching criteria - -To retrieve relevant events, you must define at least one entry within the `events` property. For instance: - -```yaml -events: - - type: "WatchEvent" -``` - -If you provide an empty list `events: []`, no events will be emitted. For more precise filtering of events, you can optionally use JSONPath along with the event type to filter based on specific criteria within the event payload. - -#### Templating - -The available fields for templating differ based on the event type. Refer to the [google/go-github](https://github.com/google/go-github/tree/899235e0a9d750d6fecf9048a676046d50f9d4a3/github) repository for dedicated event types. - -For instance, you can add an "Open" button to an `IssuesEvent` template: - -```yaml -events: - # IssuesEvent with json path filter - - type: "IssuesEvent" - # The JSONPath expression to filter events - jsonPath: ".action" - # The regex value to match in the JSONPath result - value: "opened" - notificationTemplate: - previewTpl: |- - Issue Opened - - #{{ .Issue.Number }} {{ .Issue.Title }} - State: {{ .Issue.State }} - extraButtons: - - displayName: Open - url: "{{ .Issue.HTMLURL }}" - style: primary -``` - -Here, the `jsonPath` field specifies the JSONPath expression to filter events, and the value field defines the regex value to match within the JSONPath result. This combination helps narrow down reported events based on specific conditions within the event payload. diff --git a/versioned_docs/version-1.10/configuration/source/index.md b/versioned_docs/version-1.10/configuration/source/index.md deleted file mode 100644 index 54d9a157..00000000 --- a/versioned_docs/version-1.10/configuration/source/index.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -id: source -title: Source -sidebar_position: 1 ---- - -The source configuration allows you to define multiple source configurations that can be later referred in [communication](../communication) bindings. For example, take a look at such source definition: - -```yaml -sources: - "k8s-recommendation-alerts": # This is a source configuration name, which is referred in communication bindings. - botkube/kubernetes: - # ... trimmed ... - - "k8s-all-events": # This is a source configuration name, which is referred in communication bindings. - botkube/kubernetes: - # ... trimmed ... -``` - -This can be later used by the communication platforms: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - bindings: - sources: # The order is important for merging strategy. - - k8s-recommendation-events # The source configuration name - - k8s-all-events # The source configuration name - # ... trimmed ... -``` - -To use the Botkube source plugins, first you need to define the plugins repository under the `plugins` property: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Next, you can configure source from a given repository: - -```yaml -sources: - "plugins": - repo-name/source-name@v1.0.0: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} -``` - -For all source configuration properties, see the [**syntax**](#syntax) section. - -#### Restart Policy and Health Check Interval - -This section of the configuration allows you to configure the restart policy for the Botkube source plugins. The restart policy is used when the source 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 source plugins. The default health check interval is 10 seconds. The health check interval can be configured with the following property: - -- `healthCheckInterval` - health check interval. - -```yaml -# 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 - -```yaml -# Map of sources. The `sources` property name is an alias for a given configuration. -# Key name is used as a binding reference. -# -# Format: sources.{alias} -sources: - "k8s-recommendation-events": - # Built-in kubernetes source configuration. - botkube/kubernetes: - enabled: true - config: - # Kubernetes configuration - recommendations: - pod: - noLatestImageTag: true - # ... trimmed ... - -# 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.10.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](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.10/configuration/source/keptn.md b/versioned_docs/version-1.10/configuration/source/keptn.md deleted file mode 100644 index 4f20f4de..00000000 --- a/versioned_docs/version-1.10/configuration/source/keptn.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: keptn -title: Keptn -sidebar_position: 4 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The Botkube Keptn source plugin allows you to consume events from Keptn deployment and notify in configured platforms. - -The Keptn plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Keptn plugin. -6. Click **Save** button. - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# Keptn API Gateway URL. -url: "http://api-gateway-nginx.keptn.svc.cluster.local/api" -# Keptn API Token to access events through API Gateway. -token: "" -# Optional Keptn project. -project: "" -# Optional Keptn Service name under the project. -service: "" -# Logging configuration -log: - # Log level - level: info -``` diff --git a/versioned_docs/version-1.10/configuration/source/kubernetes.md b/versioned_docs/version-1.10/configuration/source/kubernetes.md deleted file mode 100644 index 8e8eb676..00000000 --- a/versioned_docs/version-1.10/configuration/source/kubernetes.md +++ /dev/null @@ -1,792 +0,0 @@ ---- -id: kubernetes -title: Kubernetes -sidebar_position: 2 ---- - -A `kubernetes` source plugin produces events for configured Kubernetes resources. These events can be sent to communication channels or actions. To learn how to bind sources to communication channels or actions, read the Communication and Action documents. - -## Enabling plugin - -### Self-hosted Botkube installation - -The Kubernetes plugin is hosted by the official Botkube plugin repository. First, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.10.0/plugins-index.yaml -``` - -To enable Kubernetes source, add `--set 'sources.{configuration-name}.botkube/kubernetes.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). - -### Botkube Cloud - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Kubernetes plugin. -6. Click **Save** button. - -## Event and resource constraints - -Define constraints for Kubernetes events to narrow down the events you want to receive. - -You can define both global constraints, that are applied to all resources within a given source, and also resource-specific constraints, which override global constraints. See the [Syntax](#configuration-syntax) paragraph for more details. - -There are multiple types of constraints. Each constraint type is described in the following sections. - -### Namespaces - -Include and/or exclude namespaces to watch. You can use exact values or regex expressions to specify namespaces. - -Exclude takes precedence over include. If a given namespace is excluded, it will be ignored, even if it included. - -**Examples** - -To watch all namespaces except those with `testing-` prefix, use the following constraint: - -```yaml -namespaces: - include: - - ".*" # include all... - exclude: - - "testing-.*" # ...except any namespace that has `testing-` prefix -``` - -To watch only `dev` and `prod` namespaces, use the following constraint: - -```yaml -namespaces: - include: - - "dev" - - "prod" - exclude: [] -``` - -### Labels - -Specify exact match for resource labels. The watched resources must have all the specified labels. - -**Example** - -```yaml -labels: # Match only the resources that have all the specified labels - app: "my-app" - environment: "production" -``` - -### Annotations - -Specify exact match for resource annotations. The watched resources must have all the specified annotations. - -**Example** - -```yaml -annotations: # Match only the resources that have all the specified annotations. - app: "my-app" - my-annotation: "true" -``` - -### Resource name - -Filter events based on the resource name. If not defined, all resource names are matched. -Exclude takes precedence over include. If a given resource name is excluded, it will be ignored, even if it included. - -You can use both exact values and regex expressions to specify resource names. This constraint can be set per resource only. See the [Syntax](#configuration-syntax) paragraph for more details. - -**Examples** - -To match resource names that have `testing-` prefix, use the following constraint: - -```yaml -name: - include: - - "testing-.*" # include only resource names that have `testing-` prefix - exclude: [] -``` - -To match all resources except those that have `testing-` prefix, use the following constraint: - -```yaml -name: - include: - - ".*" # include all resource names... - exclude: - - "testing-.*" # ...except those that have `testing-` prefix -``` - -### Event types - -List the event types to watch. - -Possible values: - -- `create`, -- `update`, -- `delete`, -- `error`, -- `all`, which is equal to all of the above. - -**Example** - -```yaml -event: - types: # watch for create, delete and error events - - create - - delete - - error -``` - -### Event reason - -Define exact values or regex expression to match the event reason. If not defined, all events are watched. -Exclude takes precedence over include. If a given event reason is excluded, it will be ignored, even if it included. - -**Examples** - -To match events with reason equal to `BackOff`, use the following constraint: - -```yaml -event: - reason: - include: - - "^BackOff$" # match events with reason equal to `BackOff` - exclude: [] -``` - -To match all events except those with reason equal to `BackOff`, use the following constraint: - -```yaml -event: - reason: - include: - - ".*" # match all event reasons... - exclude: - - "^BackOff$" # ...except those equal to `BackOff` -``` - -### Event message - -Define regex expression to match the event message. If not defined, all event messages are matched. - -Exclude takes precedence over include. If a given event message is excluded, it will be ignored, even if it included. - -**Example** - -To match events with message starting with `Back-off`, use the following constraint: - -```yaml -event: - message: - include: - - "^Back-off.*" # match all events with message starting with `Back-off` - exclude: [] -``` - -To match all events except those with message starting with `Back-off`, use the following constraint: - -```yaml -event: - message: - include: - - ".*" # match all event messages... - exclude: - - "^Back-off.*" # ...except those starting with `Back-off` -``` - -### Recommendations - -You can configure recommendations related to Kubernetes resources. Recommendations respect [namespaces](#namespaces) constraint regex patterns. - -Currently, Kubernetes source plugin can send recommendation about 2 resources: `Pods` and `Ingresses`. - -**Example** - -In order to send recommendation for the Pods that have containers with `latest` tag or the Pods without labels, use the following configuration. - -```yaml -recommendations: - # Recommendations for Pod Kubernetes resource. - pod: - # If true, notifies about Pod containers that use `latest` tag for images. - noLatestImageTag: true - # If true, notifies about Pod resources created without labels. - labelsSet: true -``` - -If you want to receive recommendations for Ingress that contains invalid backend service definition or TLS secret, use the following configuration. - -```yaml -recommendations: - # Recommendations for Ingress Kubernetes resource. - ingress: - # If true, notifies about Ingress resources with invalid backend service reference. - backendServiceValid: true - # If true, notifies about Ingress resources with invalid TLS secret reference. - tlsSecretValid: true -``` - -### Filters - -The filter configuration allows you to configure filters which are used for all processed Kubernetes events. - -```yaml -# Filter settings for various sources. -# Currently, all filters are globally enabled or disabled. -# You can enable or disable filters with `@Botkube filters` commands. -filters: - kubernetes: - # If true, enables support for `botkube.io/disable` resource annotations. - objectAnnotationChecker: true - # If true, filters out Node-related events that are not important. - nodeEventsChecker: true -``` - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# Describes configuration for various recommendation insights. -recommendations: - # Recommendations for Pod Kubernetes resource. - pod: - # If true, notifies about Pod containers that use `latest` tag for images. - noLatestImageTag: true - # If true, notifies about Pod resources created without labels. - labelsSet: true - # Recommendations for Ingress Kubernetes resource. - ingress: - # If true, notifies about Ingress resources with invalid backend service reference. - backendServiceValid: true - # If true, notifies about Ingress resources with invalid TLS secret reference. - tlsSecretValid: true - -# Filter settings for various sources. -filters: - # If true, enables support for `botkube.io/disable` resource annotation. - objectAnnotationChecker: true - # If true, filters out Node-related events that are not important. - nodeEventsChecker: true -# Describes namespaces for every Kubernetes resources you want to watch or exclude. -# These namespaces are applied to every resource specified in the resources list. -# However, every specified resource can override this by using its own namespaces object. -namespaces: &k8s-events-namespaces - # Include contains a list of allowed Namespaces. - # It can also contain regex expressions: - # `- ".*"` - to specify all Namespaces. - include: - - ".*" - # Exclude contains a list of Namespaces to be ignored even if allowed by Include. - # It can also contain regex expressions: - # `- "test-.*"` - to specif all Namespaces with `test-` prefix. - # Exclude list is checked before the Include list. - # exclude: [] - -# Describes event constraints for Kubernetes resources. -# These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. -event: - # Lists all event types to be watched. - types: - - create - - delete - - error - # Optional list of exact values or regex patterns to filter events by event reason. - # Skipped, if both include/exclude lists are empty. - reason: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - # Optional list of exact values or regex patterns to filter event by event message. Skipped, if both include/exclude lists are empty. - # If a given event has multiple messages, it is considered a match if any of the messages match the constraints. - message: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - -# Filters Kubernetes resources to watch by annotations. Each resource needs to have all the specified annotations. -# Regex expressions are not supported. -annotations: {} -# Filters Kubernetes resources to watch by labels. Each resource needs to have all the specified labels. -# Regex expressions are not supported. -labels: {} - -# Describes the Kubernetes resources to watch. -# Resources are identified by its type in `{group}/{version}/{kind (plural)}` format. Examples: `apps/v1/deployments`, `v1/pods`. -# Each resource can override the namespaces and event configuration by using dedicated `event` and `namespaces` field. -# Also, each resource can specify its own `annotations`, `labels` and `name` regex. -resources: - - type: v1/pods - # namespaces: # Overrides 'source'.kubernetes.namespaces - # include: - # - ".*" - # exclude: [] - # annotations: {} # Overrides 'source'.kubernetes.annotations - # labels: {} # Overrides 'source'.kubernetes.labels - # # Optional resource name constraints. - # name: - # # Include contains a list of allowed values. It can also contain regex expressions. - # include: [] - # # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # # Exclude list is checked before the Include list. - # exclude: [] - # event: - # # Overrides 'source'.kubernetes.event.reason - # reason: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.message - # message: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.types - # types: - # - create - - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - event: - message: - exclude: - - ".*nf_conntrack_buckets.*" # Ignore node related noisy messages from GKE clusters - - type: v1/namespaces - - type: v1/persistentvolumes - - type: v1/persistentvolumeclaims - - type: v1/configmaps - - type: rbac.authorization.k8s.io/v1/roles - - type: rbac.authorization.k8s.io/v1/rolebindings - - type: rbac.authorization.k8s.io/v1/clusterrolebindings - - type: rbac.authorization.k8s.io/v1/clusterroles - - type: apps/v1/daemonsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.numberReady - - type: batch/v1/jobs - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.conditions[*].type - - type: apps/v1/deployments - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.availableReplicas - - type: apps/v1/statefulsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.readyReplicas -commands: - # Configures which verbs are available in actionable items. - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - # Configure which resources are available in actionable items. - resources: - - "deployments" - - "pods" - - "namespaces" - - "daemonsets" - - "statefulsets" - - "storageclasses" - - "nodes" - - "configmaps" - - "services" - - "ingresses" -# Define extra buttons to be displayed beside the actionable notification message. -extraButtons: - - enabled: false - trigger: - type: ["error"] - button: - displayName: "Get Help" - commandTpl: "doctor --resource={{ .Kind | lower }}/{{ .Name }} --namespace={{ .Namespace }} --error={{ .Reason }} --bk-cmd-header='AI assistance'" -# Logger configuration -log: - level: info - disableColors: false -``` - -## Examples - -This section lists all examples for Kubernetes source plugin. They are based on the Botkube self-hosted installation but can be used with Botkube Cloud by extracting the `botkube/kubernetes.config` section. - -```yaml -# Map of sources. Source contains configuration for Kubernetes events and sending recommendations. -# The property name under `sources` object is an alias for a given configuration. You can define multiple sources configuration with different names. -# Key name is used as a binding reference. -# See the `values.yaml` file for full object. -# -## Format: sources.{alias} -sources: - "k8s-recommendation-events": - displayName: "Kubernetes Recommendations" - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes configuration for various recommendation insights. - recommendations: - # Recommendations for Pod Kubernetes resource. - pod: - # If true, notifies about Pod containers that use `latest` tag for images. - noLatestImageTag: true - # If true, notifies about Pod resources created without labels. - labelsSet: true - # Recommendations for Ingress Kubernetes resource. - ingress: - # If true, notifies about Ingress resources with invalid backend service reference. - backendServiceValid: true - # If true, notifies about Ingress resources with invalid TLS secret reference. - tlsSecretValid: true - - "k8s-all-events": - displayName: "Kubernetes Info" - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Logging configuration - log: - # Log level - level: info - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: &k8s-events-namespaces - # Include contains a list of allowed Namespaces. - # It can also contain regex expressions: - # `- ".*"` - to specify all Namespaces. - include: - - ".*" - # Exclude contains a list of Namespaces to be ignored even if allowed by Include. - # It can also contain regex expressions: - # `- "test-.*"` - to specif all Namespaces with `test-` prefix. - # Exclude list is checked before the Include list. - # exclude: [] - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - create - - delete - - error - # Optional list of exact values or regex patterns to filter events by event reason. - # Skipped, if both include/exclude lists are empty. - reason: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - # Optional list of exact values or regex patterns to filter event by event message. Skipped, if both include/exclude lists are empty. - # If a given event has multiple messages, it is considered a match if any of the messages match the constraints. - message: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - - # Filters Kubernetes resources to watch by annotations. Each resource needs to have all the specified annotations. - # Regex expressions are not supported. - annotations: {} - # Filters Kubernetes resources to watch by labels. Each resource needs to have all the specified labels. - # Regex expressions are not supported. - labels: {} - - # Describes the Kubernetes resources to watch. - # Resources are identified by its type in `{group}/{version}/{kind (plural)}` format. Examples: `apps/v1/deployments`, `v1/pods`. - # Each resource can override the namespaces and event configuration by using dedicated `event` and `namespaces` field. - # Also, each resource can specify its own `annotations`, `labels` and `name` regex. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - # namespaces: # Overrides 'source'.kubernetes.namespaces - # include: - # - ".*" - # exclude: [] - # annotations: {} # Overrides 'source'.kubernetes.annotations - # labels: {} # Overrides 'source'.kubernetes.labels - # # Optional resource name constraints. - # name: - # # Include contains a list of allowed values. It can also contain regex expressions. - # include: [] - # # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # # Exclude list is checked before the Include list. - # exclude: [] - # event: - # # Overrides 'source'.kubernetes.event.reason - # reason: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.message - # message: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.types - # types: - # - create - - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/persistentvolumes - - type: v1/persistentvolumeclaims - - type: v1/configmaps - - type: rbac.authorization.k8s.io/v1/roles - - type: rbac.authorization.k8s.io/v1/rolebindings - - type: rbac.authorization.k8s.io/v1/clusterrolebindings - - type: rbac.authorization.k8s.io/v1/clusterroles - - type: apps/v1/daemonsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.numberReady - - type: batch/v1/jobs - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.conditions[*].type - - type: apps/v1/deployments - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.availableReplicas - - type: apps/v1/statefulsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.readyReplicas - ## Custom resource example - # - type: velero.io/v1/backups - # namespaces: - # include: - # - ".*" - # exclude: - # - - # event: - # types: - # - create - # - update - # - delete - # - error - # updateSetting: - # includeDiff: true - # fields: - # - status.phase - # List of available commands that can be used in actionable items under kubernetes events. - commands: - # Configures which verbs are available in actionable items. - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - # Configure which resources are available in actionable items. - resources: - [ - "deployments", - "pods", - "namespaces", - "daemonsets", - "statefulsets", - "storageclasses", - "nodes", - "configmaps", - "services", - "ingresses", - ] - # Filter settings for various sources. - # Currently, all filters are globally enabled or disabled. - # You can enable or disable filters with `@Botkube enable/disable filters` commands. - filters: - kubernetes: - # If true, enables support for `botkube.io/disable` resource annotations. - objectAnnotationChecker: true - # If true, filters out Node-related events that are not important. - nodeEventsChecker: true - - "k8s-err-events": - displayName: "Kubernetes Errors" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - error - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/persistentvolumes - - type: v1/persistentvolumeclaims - - type: v1/configmaps - - type: rbac.authorization.k8s.io/v1/roles - - type: rbac.authorization.k8s.io/v1/rolebindings - - type: rbac.authorization.k8s.io/v1/clusterrolebindings - - type: rbac.authorization.k8s.io/v1/clusterroles - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs - - "k8s-err-with-logs-events": - displayName: "Kubernetes Errors for resources with logs" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - error - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs - # `apps/v1/replicasets` excluded on purpose - to not show logs twice for a given higher-level resource (e.g. Deployment) - - "k8s-create-events": - displayName: "Kubernetes Resource Created Events" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - create - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/configmaps - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs -``` - -The default configuration for Helm chart can be found in [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml). - -## Implementation details - -Kubernetes source plugin uses [Kubernetes Informers](https://pkg.go.dev/k8s.io/client-go/informers) to get Kubernetes events in real-time. As the informer's synchronized data is cached in-memory and, in some cases, might take a significant amount of memory, Kubernetes plugin comes with memory usage optimization. - -During startup, the plugin loads all Kubernetes source configurations and groups them by different Kubeconfigs. For each group, the plugin creates shared informers (`SharedInformerFactory`) and starts them in parallel in goroutines. - -As there are less background processes than actual Kubernetes source configurations, the plugin takes the very first source configuration (sorted alphabetically) as the "system" one. -Then, the `log` and `informerResyncPeriod` configuration properties are used for all background processes except actual event handling. - -For more details, see the [Kubernetes plugin source code](https://github.com/kubeshop/botkube/blob/main/cmd/source/kubernetes/main.go). diff --git a/versioned_docs/version-1.10/configuration/source/prometheus.md b/versioned_docs/version-1.10/configuration/source/prometheus.md deleted file mode 100644 index 135c1cd3..00000000 --- a/versioned_docs/version-1.10/configuration/source/prometheus.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -id: prometheus -title: Prometheus -sidebar_position: 3 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The Botkube Prometheus source plugin allows you to fetch alerts from AlertManager of Prometheus deployment and notify in configured platforms. - -The Prometheus plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Prometheus plugin. -6. Click **Save** button. - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# Prometheus endpoint without api version and resource. -url: "http://localhost:9090" -# If set as true, Prometheus source plugin will not send alerts that is created before plugin start time. -ignoreOldAlerts: true -# Only the alerts that have state provided in this config will be sent as notification. https://pkg.go.dev/github.com/prometheus/prometheus/rules#AlertState -alertStates: ["firing", "pending", "inactive"] -# Logging configuration -log: - # Log level - level: info -``` - -## Merging strategy - -For all collected `prometheus` sources bindings, configuration properties are overridden based on the order of the binding list for a given channel. The priority is given to the last binding specified on the list. Empty properties are omitted. diff --git a/versioned_docs/version-1.10/examples-and-tutorials/_category_.json b/versioned_docs/version-1.10/examples-and-tutorials/_category_.json deleted file mode 100644 index fba891b9..00000000 --- a/versioned_docs/version-1.10/examples-and-tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials and examples", - "position": 2 -} diff --git a/versioned_docs/version-1.10/examples-and-tutorials/getstarted/assets/create-new-instance.png b/versioned_docs/version-1.10/examples-and-tutorials/getstarted/assets/create-new-instance.png deleted file mode 100644 index 28217273..00000000 Binary files a/versioned_docs/version-1.10/examples-and-tutorials/getstarted/assets/create-new-instance.png and /dev/null differ diff --git a/versioned_docs/version-1.10/examples-and-tutorials/getstarted/assets/install-agent.png b/versioned_docs/version-1.10/examples-and-tutorials/getstarted/assets/install-agent.png deleted file mode 100644 index 3886713b..00000000 Binary files a/versioned_docs/version-1.10/examples-and-tutorials/getstarted/assets/install-agent.png and /dev/null differ diff --git a/versioned_docs/version-1.10/examples-and-tutorials/getstarted/index.md b/versioned_docs/version-1.10/examples-and-tutorials/getstarted/index.md deleted file mode 100644 index 26a7dbed..00000000 --- a/versioned_docs/version-1.10/examples-and-tutorials/getstarted/index.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: get started -title: Get Started -sidebar_position: 1 ---- - -# Get Started with Botkube in Minutes - -Welcome to Botkube! This guide will walk you through the process of setting up Botkube to send notifications and execute commands in your Kubernetes clusters directly from Slack and Microsoft Teams. - -[![Watch our video tutorial for a step-by-step walkthrough](http://img.youtube.com/vi/AGKJsNro4jE/0.jpg)](https://www.youtube.com/watch?v=AGKJsNro4jE&t=59s "Watch our video tutorial for a step-by-step walkthrough") - -## Overview - -Botkube is a Kubernetes Monitoring and Tool designed to optimize your K8s workflow by providing real-time alerts from and commands within your Kubernetes environment. With Botkube, you can receive alerts, execute commands, and stay informed about your cluster's health and status, all from your preferred communication platform. - -## Step 1: Sign up for Botkube - -Visit [botkube.io](http://botkube.io) and create an account. This account will enable you to access the Botkube Cloud Dashboard and manage your Botkube instances. - -## Step 2: Connect Your Kubernetes Cluster - -1. **Create a New Instance:** Log in to the Botkube Cloud Dashboard and select "create a new instance". - - ![Create New Instance](assets/create-new-instance.png) - -2. **Install Botkube Agent:** Follow the instructions provided on the dashboard to install the Botkube Agent on your Kubernetes cluster. You can choose either Helm or a CLI command for installation. - - ![Install Botkube Agent](assets/install-agent.png) - -## Step 3: Connect to Your Preferred Communication Platform - -Follow the instructions provided on the Botkube Cloud Dashboard to connect Botkube to your preferred communication platform, such as [Slack ](https://docs.botkube.io/installation/slack/cloud-slack)or [Microsoft Teams](https://docs.botkube.io/installation/teams/). - -## Step 4: Setting Up a Botkube Cloud Instance - -Once your Botkube instance is connected to your communication platform, you will start receiving alerts and notifications from your Kubernetes cluster. - -### Finalizing Your Botkube Cloud Instance - -1. **Select Channels:** From the dashboard, choose the channels you wish to use with Botkube. -2. **Configure Plugins:** Connect your preferred plugins to enhance Botkube's functionality. -3. **Set Preferences:** Review and select your preferred Botkube defaults. -4. **Apply Changes:** Finalize your setup by selecting "Apply changes." - -## Step 5: Start Receiving Alerts - -Congratulations! You're now ready to start using Botkube to streamline your Kubernetes workflow and stay informed about your cluster's status. If you encounter any issues or need further assistance, feel free to reach out to our community on [Slack](https://join.botkube.io/) or [schedule a call with one of our team](https://calendly.com/d/274-ytm-6mk/chat-with-the-botkube-team-30-minutes). Happy Monitoring! diff --git a/versioned_docs/version-1.10/examples-and-tutorials/index.mdx b/versioned_docs/version-1.10/examples-and-tutorials/index.mdx deleted file mode 100644 index 589a111f..00000000 --- a/versioned_docs/version-1.10/examples-and-tutorials/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -id: overview -title: Overview -sidebar_position: 1 ---- - -import { CardTutorial } from "@site/src/components/Card/Tutorial"; - -# Welcome to Botkube Examples & Tutorials - -
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
diff --git a/versioned_docs/version-1.10/examples-and-tutorials/integrations/index.md b/versioned_docs/version-1.10/examples-and-tutorials/integrations/index.md deleted file mode 100644 index 0228021b..00000000 --- a/versioned_docs/version-1.10/examples-and-tutorials/integrations/index.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -id: integrations -title: Integrations -sidebar_position: 4 ---- - -# 🛠 Integrations - -## Communication Platforms - -- [Microsoft Teams](https://botkube.io/integration/teams): Seamlessly manage Kubernetes and collaborate within your team using Botkube's integration with Microsoft Teams -- [Slack](https://botkube.io/integration/slack): Enhance your Kubernetes management by receiving notifications and interacting with clusters directly from Slack channels through Botkube. -- [Discord](https://botkube.io/integration/discord): Stay on top of Kubernetes events and streamline your operations by integrating Botkube with Discord. -- [Mattermost](https://botkube.io/integration/mattermost): Keep your team informed about Kubernetes events and receive alerts directly within your Mattermost instance with Botkube integration. - -## Source Plugins - -- [Kubernetes Events](https://botkube.io/learn/how-botkube-makes-monitoring-kubernetes-easy): Effortlessly monitor Kubernetes events using Botkube's built-in source plugin. -- [ArgoCD](https://botkube.io/integration/argo-cd-botkube-kubernetes-integration): Streamline your GitOps workflows and receive notifications by using Botkube's ArgoCD plugin. -- [Prometheus](https://botkube.io/integration/prometheus): Optimize your Kubernetes Monitoring process by connecting your Prometheus metrics with Botkube. -- [Keptn](https://botkube.io/integration/keptn): Automate testing, deployment, and operations in your Kubernetes environments by using Botkube's Keptn plugin. - -## Executor Plugins - -- [Kubectl](https://docs.botkube.io/usage/executor/kubectl): Easily execute Kubernetes commands in your channels with Botkube's Kubectl integration. -- [Open AI](https://botkube.io/integration/chatgpt-botkube-kubernetes-integration): Harness the power of Open AI with Botkube's Doctor plugin for intelligent interactions and enhanced automation in your Kubernetes environment. -- [Helm](https://botkube.io/integration/helm): Manage Helm deployments and releases seamlessly with Botkube's Helm plugin. -- [Flux](https://botkube.io/integration/botkube-flux-kubernetes-integration): Use Botkube for GitOps operations with the Flux plugin. -- [Exec](https://botkube.io/integration/custom-executor-plugin): Connecting your own plugin for a tailored Kubernetes workflow with Botkube's exec plugin. diff --git a/versioned_docs/version-1.10/examples-and-tutorials/tutorials/index.md b/versioned_docs/version-1.10/examples-and-tutorials/tutorials/index.md deleted file mode 100644 index 725791b7..00000000 --- a/versioned_docs/version-1.10/examples-and-tutorials/tutorials/index.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: tutorials -title: Tutorials -sidebar_position: 2 ---- - -# 🧑‍💻Tutorials - -## Best Practices - -- [Multi-cluster Kubernetes Observability](https://botkube.io/blog/empowering-your-kubernetes-multi-cluster-observability-with-intelligent-monitoring): Explore how Botkube streamlines Kubernetes multi-cluster management for optimized performance and reliability. -- [Day 2 Operations with Flux](https://botkube.io/blog/creating-the-botkube-flux-plugin-for-day-2-operations) :Discover best practices for handling Day 2 operations in Kubernetes using Botkube's Flux plugin. - -## Features - -### Communication Platforms - -- [Microsoft Teams Integration](https://botkube.io/blog/maximize-your-devops-teams-efficiency-with-botkube-and-microsoft-teams): Learn how to integrate Botkube with Microsoft Teams for seamless communication and collaboration in Kubernetes environments. -- [Slack Integration](https://botkube.io/blog/get-botkube-running-in-under-3-minutes-the-new-slack-app): Step-by-step guide on setting up Botkube integration with Slack to receive notifications and interact with Kubernetes clusters directly. -- [Discord Integration](https://botkube.io/integration/discord): Implement Botkube integration with Discord for efficient Kubernetes operations and event management. -- [Mattermost Integration](https://botkube.io/integration/mattermost): Configure Botkube integration with Mattermost to stay updated on Kubernetes events and receive alerts within Mattermost channels. - -### Executor Plugins - -- [Kubectl Plugin Usage](https://botkube.io/learn/kubectl-cheat-sheet): Utilize Botkube's integration with Kubectl for executing Kubernetes commands conveniently. -- [Open AI Integration](https://botkube.io/blog/doctor-plug-in-tutorial): Integrate Open AI with Botkube for intelligent automation and enhanced interactions within Kubernetes environments. -- [Helm Plugin Setup](https://botkube.io/learn/helm-charts): Seamlessly manage Helm deployments and releases with Botkube's Helm integration. -- [Flux Plugin Configuration](https://botkube.io/blog/streamlining-gitops-with-the-botkube-flux-plugin): Set up and configure Botkube's Flux plugin for automated deployment and synchronization of Kubernetes resources. -- [Custom Executor Plugin Development](https://botkube.io/integration/custom-executor-plugin): Develop and integrate custom executor plugins with Botkube for tailored Kubernetes operations. - -### Source Plugins - -- [Kubernetes Events Monitoring](https://botkube.io/blog/five-essential-kubernetes-tasks): Monitor Kubernetes events effortlessly with Botkube's built-in source plugin. -- [ArgoCD Integration](https://botkube.io/blog/getting-started-with-botkube-and-argocd): Integrate Botkube with ArgoCD for streamlined continuous delivery workflows and notifications. -- [Prometheus Integration](https://botkube.io/integration/prometheus): Monitor Kubernetes clusters effectively by integrating Prometheus metrics with Botkube. -- [Keptn Integration](https://botkube.io/blog/implementing-your-own-botkube-plugin-a-real-life-use-case): Automate testing, deployment, and operations in Kubernetes environments by integrating Botkube with Keptn. diff --git a/versioned_docs/version-1.10/examples-and-tutorials/usecases/index.md b/versioned_docs/version-1.10/examples-and-tutorials/usecases/index.md deleted file mode 100644 index fa077853..00000000 --- a/versioned_docs/version-1.10/examples-and-tutorials/usecases/index.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: use cases -title: Use Cases -sidebar_position: 3 ---- - -# 🛠Use Cases - -## GitOps Integrations - -- [Flux Plugin for Day 2 Operations](https://botkube.io/blog/creating-the-botkube-flux-plugin-for-day-2-operations): Discover how Botkube's Flux plugin simplifies Day 2 operations and provides tailored solutions for various K8s management needs. -- [ArgoCD Plugin for Optimizing Collaboration & Notifications](https://botkube.io/blog/optimizing-collaboration-and-notifications-with-the-botkube-argocd-plugin): Learn about how Botkube's engineering team using the ArgoCD plugin to optimize their deployment experience. -- [Enhancing GitOps Workflows with Botkube](https://botkube.io/blog/enhancing-gitops-workflows-with-botkube): Explore Botkube's capabilities in optimizing GitOps workflows. - -## Automating the K8s Troubleshooting workflow - -- [Using Keptn as a Source](https://botkube.io/blog/implementing-your-own-botkube-plugin-a-real-life-use-case): Discover how to leverage Keptn as a source to adapt to various troubleshooting scenarios. -- [Streamlining Helm Deployments](https://botkube.io/case-studies/civo): Learn how one of Botkube's users utilizes the Botkube Helm plugin to streamline their Helm deployments and updates. -- [GitHub Issue Reporter for Failing K8s Apps](https://botkube.io/blog/build-a-github-issues-reporter-for-failing-kubernetes-apps-with-botkube-plugins): Automate the reporting of issues with your Kubernetes applications on GitHub directly from your Slack channel. -- [5 Essential DevOps tasks to Automate](https://botkube.io/blog/botkube-5-essential-devopstasks-to-automate): Discover how to automate essential DevOps tasks like resource scaling and log management with Botkube. - -## Smart Monitoring - -- [ChatGPT Plugin](https://botkube.io/blog/building-a-chatgpt-plugin-from-ideation-to-implementation): Explore Botkube's AIOps capabilities and dive into the realm of intelligent Kubernetes monitoring with the OpenAI plugin. diff --git a/versioned_docs/version-1.10/examples-and-tutorials/videos/index.md b/versioned_docs/version-1.10/examples-and-tutorials/videos/index.md deleted file mode 100644 index 6ec967d7..00000000 --- a/versioned_docs/version-1.10/examples-and-tutorials/videos/index.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: videos -title: Videos -sidebar_position: 5 ---- - -# 🎥️ Videos - -## Office Hours - -- [Developer Self-Service](https://www.youtube.com/watch?v=74qMbqWBxms&list=PL2Vye-us8_x8-IErakx_KggCC7EPWJuby&index=2) -- [Troubleshooting Kubernetes in Microsoft Teams](https://youtu.be/HaHaa9ju8Wg) -- [GitOps Practices with Flux](https://www.youtube.com/watch?v=WxkDWLqVghw&list=PL2Vye-us8_x8-IErakx_KggCC7EPWJuby) -- [Developer Productivity with Oketeo](https://www.youtube.com/watch?v=506Tc1Grj_o) -- [Botkube goes GitOps](https://www.youtube.com/watch?v=WxkDWLqVghw) -- [Kubernetes Multi-Cluster Management](https://www.youtube.com/watch?v=ZeaUfboNKfc) -- [5 Essential Kubernetes Tasks to Automate](https://www.youtube.com/watch?v=CzlSHMM_Ypc) -- [ArgoCD Workflows](https://youtu.be/1i59PN-65SY) -- [Zapier for Kubernetes](https://www.youtube.com/watch?v=VJzSRTQpHhs) - -## Community Calls - -- [Open Source Friday - ChatOps for Kubernetes](https://www.youtube.com/watch?v=tdyPuMA2mww) -- [CNCF Webinar - Unlocking the Power of Kubernetes Collaborative Troubleshooting](https://youtu.be/6VTEOOfIbIk) -- [Tailwarden - ChatOps for Kubernetes](https://youtu.be/UOURPb03mxU) -- [Kubefirst - Monitor & Act on Your Kubernetes Cluster](https://www.youtube.com/watch?v=RLmU472lync) -- [CNCF Islamabad - Unlocking K8s Troubleshooting Best Practices](https://www.youtube.com/watch?v=Ry_UijS1ZNk) -- [Cloud Lunch and Learn - K8s Troubleshooting Best Practices in Azure](https://www.youtube.com/watch?v=x0TBA6TpfqU) -- [Kunal Kushwaha - Collaborative Troubleshooting and Monitoring in K8s With Botkube](https://youtu.be/coDSM9LiOB4) - -## Botkube User Contributions - -- [Kubernetes Cluster ChatOps - Engineering with Morris](https://youtu.be/wI6nJL4dtHY) -- [Botkube (Real-Time Kubernetes Monitoring and Alerting) - Kubernetes Bangalore](https://youtu.be/Xylb7w0yZhQ) -- [Como utilizar Slack e BotKube pra se comunicar com o seu cluster Kubernetes - Fabricio Veronez](https://www.youtube.com/watch?v=FEUOnE4z2Ac) -- [Monitoring & Debugging Kubernetes Applications with BotKube - Collabnix](https://youtu.be/mZHxJjYNmKA) - -## Conference Talks - -- [GitOps Con EU - Empowering Developer Productivity with ArgoCD](https://www.youtube.com/watch?v=k4L5_zKorZ8&list=PL2Vye-us8_x_5eqYQTBq7ZywupscaW5yA) -- [Civo Navigate - Love is Blind, but Your K8s Troubleshooting Doesn’t Have to Be](https://youtu.be/nFpTXrkz3cQ) diff --git a/versioned_docs/version-1.10/installation/assets/cloud_install.png b/versioned_docs/version-1.10/installation/assets/cloud_install.png deleted file mode 100644 index 954d6cfe..00000000 Binary files a/versioned_docs/version-1.10/installation/assets/cloud_install.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/assets/cloud_instance_delete.png b/versioned_docs/version-1.10/installation/assets/cloud_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.10/installation/assets/cloud_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/assets/cloud_new_instance.png b/versioned_docs/version-1.10/installation/assets/cloud_new_instance.png deleted file mode 100644 index 80cdd33f..00000000 Binary files a/versioned_docs/version-1.10/installation/assets/cloud_new_instance.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_add_bot.png b/versioned_docs/version-1.10/installation/discord/assets/discord_add_bot.png deleted file mode 100644 index f03ecdc8..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_add_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_add_plugins.png b/versioned_docs/version-1.10/installation/discord/assets/discord_add_plugins.png deleted file mode 100644 index 8fbf3941..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_applications_portal.png b/versioned_docs/version-1.10/installation/discord/assets/discord_applications_portal.png deleted file mode 100644 index 278b7b5d..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_applications_portal.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_bot_auth.png b/versioned_docs/version-1.10/installation/discord/assets/discord_bot_auth.png deleted file mode 100644 index 45ef0970..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_bot_auth.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_bot_auth_2.png b/versioned_docs/version-1.10/installation/discord/assets/discord_bot_auth_2.png deleted file mode 100644 index 7de140dd..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_bot_auth_2.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_bot_created.png b/versioned_docs/version-1.10/installation/discord/assets/discord_bot_created.png deleted file mode 100644 index 2f7da954..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_bot_created.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_bot_id_form.png b/versioned_docs/version-1.10/installation/discord/assets/discord_bot_id_form.png deleted file mode 100644 index 5a932a4c..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_bot_id_form.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_bot_scope.png b/versioned_docs/version-1.10/installation/discord/assets/discord_bot_scope.png deleted file mode 100644 index 487f0dd1..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_bot_scope.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_channel_id_form.png b/versioned_docs/version-1.10/installation/discord/assets/discord_channel_id_form.png deleted file mode 100644 index abf2aa77..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_channel_id_form.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_copy_application_id.png b/versioned_docs/version-1.10/installation/discord/assets/discord_copy_application_id.png deleted file mode 100644 index 259021f1..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_copy_application_id.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_copy_channel_id.png b/versioned_docs/version-1.10/installation/discord/assets/discord_copy_channel_id.png deleted file mode 100644 index 2ecf8d18..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_copy_channel_id.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_create.png b/versioned_docs/version-1.10/installation/discord/assets/discord_create.png deleted file mode 100644 index cf28566d..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_create.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_create_new.png b/versioned_docs/version-1.10/installation/discord/assets/discord_create_new.png deleted file mode 100644 index bc88d336..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_create_new.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_developer_mode.png b/versioned_docs/version-1.10/installation/discord/assets/discord_developer_mode.png deleted file mode 100644 index d0f1c270..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_developer_mode.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_instance_delete.png b/versioned_docs/version-1.10/installation/discord/assets/discord_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_instance_display_name.png b/versioned_docs/version-1.10/installation/discord/assets/discord_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_platform_select.png b/versioned_docs/version-1.10/installation/discord/assets/discord_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_summary.png b/versioned_docs/version-1.10/installation/discord/assets/discord_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/assets/discord_token_form.png b/versioned_docs/version-1.10/installation/discord/assets/discord_token_form.png deleted file mode 100644 index 7a998f8c..00000000 Binary files a/versioned_docs/version-1.10/installation/discord/assets/discord_token_form.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/discord/cloud.md b/versioned_docs/version-1.10/installation/discord/cloud.md deleted file mode 100644 index 8435cd39..00000000 --- a/versioned_docs/version-1.10/installation/discord/cloud.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -id: discord-cloud -slug: cloud -title: Discord for Botkube Cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Discord - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/discord_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Discord` option. - ![Select Platform](assets/discord_platform_select.png "Select platform") - -4. Create Botkube app at your Discord Server - - Reach https://discordapp.com/developers/applications. - - ![discord_applications_portal](assets/discord_applications_portal.png) - -5. Create a "New Application" named Botkube and add a bot named **Botkube** into the Application. - - ![discord_create_new](assets/discord_create_new.png) - -6. Copy the Application **APPLICATION ID** - - ![discord_copy_client_id](assets/discord_copy_application_id.png) - - and paste it in the `BotID` field in the form. - - ![bot_id_form](assets/discord_bot_id_form.png) - -7. Add a description - `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - Set the Botkube icon (Botkube icon can be downloaded from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-color-192x192.png)). - - Click on Save Changes to update the Bot. - -8. Now, reach the **Bot** page and Click **Add Bot** to add a Discord Bot to your application. - - ![discord_add_bot](assets/discord_add_bot.png) - -9. After Bot creation, now you can see a bot is added to your application. Click on the **Reset Token** button. - - ![discord_bot_created](assets/discord_bot_created.png) - -10. Copy the Token and paste it in `Token` field the form. - - ![discord_token_form](assets/discord_token_form.png) - -11. Go to the **OAuth2** page. Generate the URL with suitable permissions using the **OAuth2 URL Generator** available under the OAuth2 section to add bot to your Discord server. - -![discord_bot_scope](assets/discord_bot_scope.png) - -the generated URL contains **YOUR_CLIENT_ID**, Scope and permission details. - -``` -https://discord.com/api/oauth2/authorize?client_id={YOUR_CLIENT_ID}&permissions={SET_OF_PERMISSIONS}&scope=bot -``` - -12. Copy and Paste the generated URL in a new tab, select the discord server to which you want to add the bot, click Continue and Authorize Bot addition. - -![discord_bot_auth](assets/discord_bot_auth.png) - -![discord_bot_auth_2](assets/discord_bot_auth_2.png) - -13. Switch to the Discord app. Navigate to **User settings** and select **Advanced** tab. - - Enable the **Developer Mode**. - - ![discord_developer_mode](assets/discord_developer_mode.png) - -14. Create a new channel or select an existing one and copy the **CHANNEL ID**. - - To get the channel ID, right-click on a channel you want to receive notification in and click on **Copy ID**. - - ![discord_copy_channel_id.png](assets/discord_copy_channel_id.png) - - Copy the channel ID and create it in `Channel ID` field in the form. - - ![discord_channel_id_form](assets/discord_channel_id_form.png) - -15. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/discord_add_plugins.png "Plugins") - -16. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/discord_create.png "Create") - -17. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/discord_summary.png "Summary") - -## Clean up - -### Remove Botkube from Discord Server - -- Go to Discord Developers Portal [Applications](https://discord.com/developers/applications) page, -- Click on "Botkube" and click on "Delete App" button. - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/discord_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.10/installation/discord/index.md b/versioned_docs/version-1.10/installation/discord/index.md deleted file mode 100644 index 0f3cfb03..00000000 --- a/versioned_docs/version-1.10/installation/discord/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: discord -title: Discord -sidebar_position: 4 ---- - -You can use Discord app to connect Botkube to your Discord Server. Learn how to create and configure Discord app for Botkube installation for: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.10/installation/discord/self-hosted.md b/versioned_docs/version-1.10/installation/discord/self-hosted.md deleted file mode 100644 index 9c70a256..00000000 --- a/versioned_docs/version-1.10/installation/discord/self-hosted.md +++ /dev/null @@ -1,137 +0,0 @@ ---- -id: discord-self-hosted -slug: self-hosted -title: Discord for self-hosted Botkube -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Discord server account - -## Install Botkube to the Discord Server - -Follow the steps below to install Botkube Discord app to your Discord server. - -### Create Botkube app at your Discord Server - -1. Reach https://discordapp.com/developers/applications. - - ![discord_applications_portal](assets/discord_applications_portal.png) - -2. Create a "New Application" named Botkube and add a bot named **Botkube** into the Application. - - ![discord_create_new](assets/discord_create_new.png) - -3. Copy the Application **APPLICATION ID** and export it as the `DISCORD_BOT_ID` environment variable. - - ``` - export DISCORD_BOT_ID={APPLICATION_ID} - ``` - - ![discord_copy_client_id](assets/discord_copy_application_id.png) - -4. Add a description - `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - Set the Botkube icon (Botkube icon can be downloaded from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-color-192x192.png)). - - Click on Save Changes to update the Bot. - -5. Now, reach the **Bot** page and Click **Add Bot** to add a Discord Bot to your application. - - ![discord_add_bot](assets/discord_add_bot.png) - -6. After Bot creation, now you can see a bot is added to your application. Click on the **Reset Token** button. - - ![discord_bot_created](assets/discord_bot_created.png) - -7. Copy the Token and export it as the `DISCORD_TOKEN` environment variable. - - ``` - export DISCORD_TOKEN={TOKEN} - ``` - -8. Go to the **OAuth2** page. Generate the URL with suitable permissions using the **OAuth2 URL Generator** available under the OAuth2 section to add bot to your Discord server. - - ![discord_bot_scope](assets/discord_bot_scope.png) - - the generated URL contains **YOUR_CLIENT_ID**, Scope and permission details. - - ``` - https://discord.com/api/oauth2/authorize?client_id={YOUR_CLIENT_ID}&permissions={SET_OF_PERMISSIONS}&scope=bot - ``` - -9. Copy and Paste the generated URL in a new tab, select the discord server to which you want to add the bot, click Continue and Authorize Bot addition. - - ![discord_bot_auth](assets/discord_bot_auth.png) - - ![discord_bot_auth_2](assets/discord_bot_auth_2.png) - -10. Switch to the Discord app. Navigate to **User settings** and select **Advanced** tab. - - Enable the **Developer Mode**. - - ![discord_developer_mode](assets/discord_developer_mode.png) - -11. Create a new channel or select an existing one and copy the **CHANNEL ID**. - - To get the channel ID, right-click on a channel you want to receive notification in and click on **Copy ID**. - - ![discord_copy_channel_id.png](assets/discord_copy_channel_id.png) - - Copy the channel ID and export it as the `DISCORD_CHANNEL_ID` environment variable. - - ``` - export DISCORD_CHANNEL_ID={ID} - ``` - -12. Now, go ahead and install the Botkube backend on your Kubernetes cluster. - -:::note -Follow the first 4 mins of this [Video Tutorial](https://youtu.be/8o25pRbXdFw) to understand the process visually. -::: - -### Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} - -botkube install --version v1.10.0 \ ---set communications.default-group.discord.enabled=true \ ---set communications.default-group.discord.channels.default.id=${DISCORD_CHANNEL_ID} \ ---set communications.default-group.discord.botID=${DISCORD_BOT_ID} \ ---set communications.default-group.discord.token=${DISCORD_TOKEN} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} -``` - -where: - -- **DISCORD_CHANNEL_ID** is the channel name where @Botkube needs to send notifications, -- **DISCORD_BOT_ID** is the Botkube Application Client ID, -- **DISCORD_TOKEN** is the Token you received after adding Botkube bot to your Discord Application, -- **CLUSTER_NAME** is the cluster name set in the incoming messages, -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -### Remove Botkube from Discord Server - -- Go to Discord Developers Portal [Applications](https://discord.com/developers/applications) page, -- Click on "Botkube" and click on "Delete App" button. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_add_plugins.png b/versioned_docs/version-1.10/installation/elasticsearch/assets/els_add_plugins.png deleted file mode 100644 index 8306a743..00000000 Binary files a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_create.png b/versioned_docs/version-1.10/installation/elasticsearch/assets/els_create.png deleted file mode 100644 index 9ffaf353..00000000 Binary files a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_create.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_form.png b/versioned_docs/version-1.10/installation/elasticsearch/assets/els_form.png deleted file mode 100644 index db744494..00000000 Binary files a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_form.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_instance_delete.png b/versioned_docs/version-1.10/installation/elasticsearch/assets/els_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_instance_display_name.png b/versioned_docs/version-1.10/installation/elasticsearch/assets/els_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_platform_select.png b/versioned_docs/version-1.10/installation/elasticsearch/assets/els_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_summary.png b/versioned_docs/version-1.10/installation/elasticsearch/assets/els_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.10/installation/elasticsearch/assets/els_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/elasticsearch/cloud.md b/versioned_docs/version-1.10/installation/elasticsearch/cloud.md deleted file mode 100644 index 4a37750c..00000000 --- a/versioned_docs/version-1.10/installation/elasticsearch/cloud.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: elasticsearch-cloud -title: Elasticsearch for Botkube Cloud -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Elasticsearch - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/els_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Elasticsearch` option. - - ![Select Platform](assets/els_platform_select.png "Select platform") - -4. Fill in all required data in the form - - ![Form](assets/els_form.png "Form") - -5. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/els_add_plugins.png "Plugins") - -6. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/els_create.png "Create") - - :::note - If you don't include other platforms which use `Executor` plugins we recommend `default aliases` and `default actions` options unchecked - ::: - -7. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/els_summary.png "Summary") - -## Clean up - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/els_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.10/installation/elasticsearch/index.md b/versioned_docs/version-1.10/installation/elasticsearch/index.md deleted file mode 100644 index cfd7af21..00000000 --- a/versioned_docs/version-1.10/installation/elasticsearch/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: elasticsearch -title: "Elasticsearch" -sidebar_position: 6 ---- - -You can use Botkube to populate your Elasticsearch with events. Learn how to configure Botkube to work with Elasticsearch: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.10/installation/elasticsearch/self-hosted.md b/versioned_docs/version-1.10/installation/elasticsearch/self-hosted.md deleted file mode 100644 index f146160f..00000000 --- a/versioned_docs/version-1.10/installation/elasticsearch/self-hosted.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -id: elasticsearch-self-hosted -title: "Elasticsearch for self-hosted Botkube" -slug: self-hosted -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Elasticsearch server - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ELASTICSEARCH_ADDRESS={elasticsearch_address} -export ELASTICSEARCH_USERNAME={elasticsearch_username} -export ELASTICSEARCH_PASSWORD={elasticsearch_password} -export ELASTICSEARCH_INDEX_NAME={elasticsearch_index_name} - -botkube install --version v1.10.0 \ ---set communications.default-group.elasticsearch.enabled=true \ ---set communications.default-group.elasticsearch.server=${ELASTICSEARCH_ADDRESS} \ ---set communications.default-group.elasticsearch.username=${ELASTICSEARCH_USERNAME} \ ---set communications.default-group.elasticsearch.password=${ELASTICSEARCH_PASSWORD} \ ---set communications.default-group.elasticsearch.indices.default.name=${ELASTICSEARCH_INDEX_NAME} \ ---set settings.clusterName=${CLUSTER_NAME} -``` - -where: - -- **ELASTICSEARCH_ADDRESS** is an address on which Elasticsearch server is reachable e.g https://example.com:9243, -- **ELASTICSEARCH_USERNAME** is the username for authentication to Els server, -- **ELASTICSEARCH_PASSWORD** is a password for the username to authenticate with Els server, -- **ELASTICSEARCH_INDEX_NAME** _(optional)_ is an index name on which Botkube events will be stored _(default: botkube)_. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.10/installation/index.mdx b/versioned_docs/version-1.10/installation/index.mdx deleted file mode 100644 index c61a72d1..00000000 --- a/versioned_docs/version-1.10/installation/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -id: installation -title: Installation -sidebar_position: 1 -slug: / ---- - -import { IntegrationList } from "@site/src/components/IntegrationList"; - -Botkube has two components that need to be installed. - -1. Botkube App Integration in your Slack/Mattermost/Microsoft Teams/Discord -2. Botkube agent in your Kubernetes cluster - -## Feature map - -Learn about Botkube features and their availability in different integrations. - -### Bots - -Compare our bidirectional integrations: - -| Feature | Cloud Slack | Slack | Microsoft Teams | Discord | Mattermost | -| ---------------------------------------------------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| Source plugins support (e.g. `kubernetes`) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Executor plugins support (e.g. `kubectl`) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Multi-cluster support | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Enhanced per-channel plugin configuration including RBAC policy. | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Interactive messages | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | -| Actionable notifications | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | -| Emoji reactions | :heavy_check_mark: | :x: | :x: | :x: | :x: | - -### Sinks - -Compare our unidirectional integrations: - -| Feature | Elasticsearch | Webhook | -| -------------------------------------------------------------- | ------------------ | ------------------ | -| Source plugins support (e.g. `kubernetes`, `prometheus`, etc.) | :heavy_check_mark: | :heavy_check_mark: | -| Multi-cluster support | :heavy_check_mark: | :heavy_check_mark: | - -## Integrations - - - -:::tip -You can use a single Botkube agent to serve all the interfaces - Slack, Mattermost, Microsoft Teams, Elasticsearch and Webhook.
-You just need to enable required mediums through the settings and add a necessary configuration.
-_see the [configuration](../configuration/index.mdx) section for more information_ -::: diff --git a/versioned_docs/version-1.10/installation/mattermost/assets/invite.png b/versioned_docs/version-1.10/installation/mattermost/assets/invite.png deleted file mode 100644 index af62c87a..00000000 Binary files a/versioned_docs/version-1.10/installation/mattermost/assets/invite.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/mattermost/assets/mattermost_instance_display_name.png b/versioned_docs/version-1.10/installation/mattermost/assets/mattermost_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.10/installation/mattermost/assets/mattermost_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/mattermost/assets/mm_add_plugins.png b/versioned_docs/version-1.10/installation/mattermost/assets/mm_add_plugins.png deleted file mode 100644 index 6a6ba82f..00000000 Binary files a/versioned_docs/version-1.10/installation/mattermost/assets/mm_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/mattermost/assets/mm_channels_form.png b/versioned_docs/version-1.10/installation/mattermost/assets/mm_channels_form.png deleted file mode 100644 index 9d1ac4a0..00000000 Binary files a/versioned_docs/version-1.10/installation/mattermost/assets/mm_channels_form.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/mattermost/assets/mm_create.png b/versioned_docs/version-1.10/installation/mattermost/assets/mm_create.png deleted file mode 100644 index b56ea252..00000000 Binary files a/versioned_docs/version-1.10/installation/mattermost/assets/mm_create.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/mattermost/assets/mm_form_bot_name.png b/versioned_docs/version-1.10/installation/mattermost/assets/mm_form_bot_name.png deleted file mode 100644 index c0f323bc..00000000 Binary files a/versioned_docs/version-1.10/installation/mattermost/assets/mm_form_bot_name.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/mattermost/assets/mm_instance_delete.png b/versioned_docs/version-1.10/installation/mattermost/assets/mm_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.10/installation/mattermost/assets/mm_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/mattermost/assets/mm_personal_token_form.png b/versioned_docs/version-1.10/installation/mattermost/assets/mm_personal_token_form.png deleted file mode 100644 index cf9cc05d..00000000 Binary files a/versioned_docs/version-1.10/installation/mattermost/assets/mm_personal_token_form.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/mattermost/assets/mm_platform_select.png b/versioned_docs/version-1.10/installation/mattermost/assets/mm_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.10/installation/mattermost/assets/mm_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/mattermost/assets/mm_summary.png b/versioned_docs/version-1.10/installation/mattermost/assets/mm_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.10/installation/mattermost/assets/mm_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/mattermost/cloud.md b/versioned_docs/version-1.10/installation/mattermost/cloud.md deleted file mode 100644 index 63d46bc8..00000000 --- a/versioned_docs/version-1.10/installation/mattermost/cloud.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -id: mattermost-cloud -title: Mattermost for Botkube Cloud -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Mattermost - -Follow the steps below to install Botkube in your Mattermost instance. - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/mattermost_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Mattermost` option. - ![Mattermost Platform Select](assets/mm_platform_select.png "Select mattermost platform") - -4. Follow the [Mattermost instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/) for creating a bot account. When creating the bot account, use the following details: - - - Username — `Botkube` - - :::note - You can also use a custom username for your bot. Just remember that you'll need to provide this username during a later step of the Botkube installation. - ::: - - - Description — `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - - Icon — You can download the Botkube icon from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-black-192x192.png). - -5. Paste the bot name in the form - - ![Bot Name in the form](assets/mm_form_bot_name.png "Bot Name in the form") - -6. Past the token in the form - - ![Personal Token in the form](assets/mm_personal_token_form.png "Personal Token in the form") - -7. Add Botkube to a channel - - Make sure that the newly created bot account is added to your Mattermost team by following [these instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/#bot-account-creation). - - ![Invite Bot Account](./assets/invite.png) - - Add Botkube user created to the channel you want to receive notifications in. - - ![Channels in the form](assets/mm_channels_form.png "Channels in the form") - -8. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/mm_add_plugins.png "Plugins") - -9. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/mm_create.png "Create") - -10. Follow the instructions in the summary page to deploy Botkube into your environment. - -![Summary](assets/mm_summary.png "Summary") - -## Clean up - -### Remove Botkube from Mattermost Team - -- Deactivate or remove Botkube user from Mattermost Team. Login as System Admin, in the Menu proceed to System console -> Users -> botkube -> Deactivate. -- Archive Channel created for Botkube communication if required. - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/mm_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.10/installation/mattermost/index.md b/versioned_docs/version-1.10/installation/mattermost/index.md deleted file mode 100644 index cb1d242a..00000000 --- a/versioned_docs/version-1.10/installation/mattermost/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: mattermost -title: Mattermost -sidebar_position: 3 ---- - -You can use Mattermost Bot to connect Botkube to your Mattermost Server. Learn how to create and configure Mattermost Bot for Botkube installation for: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.10/installation/mattermost/self-hosted.md b/versioned_docs/version-1.10/installation/mattermost/self-hosted.md deleted file mode 100644 index ef379a1e..00000000 --- a/versioned_docs/version-1.10/installation/mattermost/self-hosted.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -id: mattermost-self-hosted -title: Mattermost for self-hosted Botkube -slug: self-hosted -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster - -## Install Botkube to the Mattermost - -Follow the steps below to install Botkube in your Mattermost instance. - -### Create the Botkube bot account - -1. Follow the [Mattermost instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/) for creating a bot account. When creating the bot account, use the following details: - - - Username — `Botkube` - - :::note - You can also use a custom username for your bot. Just remember that you'll need to provide this username during a later step of the Botkube installation. - ::: - - - Description — `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - - Icon — You can download the Botkube icon from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-black-192x192.png). - -2. Export the bot name as an environment variable: - - ```bash - export MATTERMOST_BOT_NAME="{bot_name}" - ``` - -3. Also, export the bot's token as an environment variable: - - ```bash - export MATTERMOST_TOKEN="{token}" - ``` - -### Add Botkube to a channel - -Make sure that the newly created bot account is added to your Mattermost team by following [these instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/#bot-account-creation). - -![Invite Bot Account](./assets/invite.png) - -Next, invite the Botkube bot into the specific channel where you want to receive notifications. Export the channel name as an environment variable: - -```bash -export MATTERMOST_CHANNEL="{channel_name}" -``` - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export MATTERMOST_SERVER_URL={mattermost_server_url} -export MATTERMOST_TEAM={mattermost_team_name} -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} - -botkube install --version v1.10.0 \ ---set communications.default-group.mattermost.enabled=true \ ---set communications.default-group.mattermost.url=${MATTERMOST_SERVER_URL} \ ---set communications.default-group.mattermost.token=${MATTERMOST_TOKEN} \ ---set communications.default-group.mattermost.team=${MATTERMOST_TEAM} \ ---set communications.default-group.mattermost.channels.default.name=${MATTERMOST_CHANNEL} \ ---set communications.default-group.mattermost.botName=${MATTERMOST_BOT_NAME} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} -``` - -where: - -- **MATTERMOST_SERVER_URL** is the URL (including http/https schema) where Mattermost is running, -- **MATTERMOST_TOKEN** is the Token received by creating Personal Access Token for Botkube bot, -- **MATTERMOST_TEAM** is the Team name where Botkube is added, -- **MATTERMOST_CHANNEL** is the Channel name where Botkube is added and used for communication, -- **MATTERMOST_BOT_NAME** is the Mattermost bot username (usually it is `Botkube`), -- **CLUSTER_NAME** is the cluster name set in the incoming messages, -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -## Remove Botkube from Mattermost Team - -- Deactivate or remove Botkube bot from Mattermost Team. -- Archive Channel created for Botkube communication if required. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` - -## Troubleshooting - -### Botkube doesn't start - -**Symptoms** - -The Botkube Pod is restarting and the Botkube logs show the following error: - -```json -{ - "level": "fatal", - "msg": "while running application: while waiting for goroutines to finish gracefully: 1 error occurred:\n\t* while creating Mattermost bot: while getting team details: team \"Botkube\" not found", - "time": "2023-08-25T14:52:30+02:00" -} -``` - -**Solution** - -You need to ensure that the configuration used by Botkube is valid. - -1. Get and decode the communication Secret details: - ```bash - kubectl get secret botkube-communication-secret -n botkube --template='{{index .data "comm_config.yaml" | base64decode }}' - ``` -2. Verify the following: - - - Ensure that the value of `communications.default-group.mattermost.team` in the configuration matches the actual team name in your Mattermost UI. - - - Confirm that the bot specified in `communications.default-group.mattermost.botName` has been invited to the relevant team and all specified channels. - - - Check the validity of the token provided in `communications.default-group.mattermost.token`. If you're unsure, navigate to the Bot Accounts section in Mattermost and generate a new one. - -3. Additional Steps: - - If you continue to experience issues with Botkube restarts, you can perform further troubleshooting by following the instructions provided by Mattermost on [testing bot connections](https://developers.mattermost.com/integrate/reference/bot-accounts/#how-can-i-quickly-test-if-my-bot-account-is-working). diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_add_plugins.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_add_plugins.png deleted file mode 100644 index 6d0df836..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_add_to_slack.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_add_to_slack.png deleted file mode 100644 index 508b8d64..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_add_to_slack.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_all_clusters.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_all_clusters.png deleted file mode 100644 index f0629ad8..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_all_clusters.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_help.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_help.png deleted file mode 100644 index a141f676..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_help.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_list_instances.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_list_instances.png deleted file mode 100644 index ff0f1375..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_list_instances.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_set_default.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_set_default.png deleted file mode 100644 index cf489aed..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_command_set_default.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_create.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_create.png deleted file mode 100644 index deb72f65..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_create.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_credentials.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_credentials.png deleted file mode 100644 index a6c60dbc..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_credentials.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_grant.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_grant.png deleted file mode 100644 index 55858e31..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_grant.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_install.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_install.png deleted file mode 100644 index 954d6cfe..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_install.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_instance_delete.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_instance_list_manage.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_instance_list_manage.png deleted file mode 100644 index 3dd8d34e..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_instance_list_manage.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_new_instance.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_new_instance.png deleted file mode 100644 index 80cdd33f..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_new_instance.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_select_slack.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_select_slack.png deleted file mode 100644 index 544f59a2..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_select_slack.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_workspace_details.png b/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_workspace_details.png deleted file mode 100644 index a5feeb96..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/cloud_slack_workspace_details.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/slack_add_app.png b/versioned_docs/version-1.10/installation/slack/assets/slack_add_app.png deleted file mode 100644 index 378e0b9a..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/slack_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/slack_generate_app_token.png b/versioned_docs/version-1.10/installation/slack/assets/slack_generate_app_token.png deleted file mode 100644 index 0864aae1..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/slack_generate_app_token.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/slack_install_app.png b/versioned_docs/version-1.10/installation/slack/assets/slack_install_app.png deleted file mode 100644 index cee7293e..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/slack_install_app.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/slack_retrieve_app_token.png b/versioned_docs/version-1.10/installation/slack/assets/slack_retrieve_app_token.png deleted file mode 100644 index 5644a174..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/slack_retrieve_app_token.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/slack_retrieve_bot_token.png b/versioned_docs/version-1.10/installation/slack/assets/slack_retrieve_bot_token.png deleted file mode 100644 index e3954a91..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/slack_retrieve_bot_token.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/assets/slack_select_workspace.png b/versioned_docs/version-1.10/installation/slack/assets/slack_select_workspace.png deleted file mode 100644 index 897e5b31..00000000 Binary files a/versioned_docs/version-1.10/installation/slack/assets/slack_select_workspace.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/slack/cloud-slack.mdx b/versioned_docs/version-1.10/installation/slack/cloud-slack.mdx deleted file mode 100644 index 5cacdea9..00000000 --- a/versioned_docs/version-1.10/installation/slack/cloud-slack.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -id: cloud-slack -title: Botkube Cloud App for Slack -sidebar_position: 1 ---- - -The Botkube Cloud App for Slack uses Botkube Cloud services to manage channels and route executor commands. This allows multi-cluster support without a need to create a dedicated Slack application for each cluster. Events and alerts are sent directly from your cluster to your Slack workspace for reliable, fast notifications. - -## Prerequisites - -- A Botkube Cloud account. - - You can try out the Botkube Cloud App for Slack for free by creating an account in the [Botkube Cloud app](https://app.botkube.io). - -## Create a Botkube Cloud Instance with Cloud Slack - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and click on `New Instance` button. - - ![New Instance](assets/cloud_slack_new_instance.png "Create new instance") - -2. Install Botkube Agent on your Kubernetes cluster by following the instructions on the page. - - ![Install Agent](assets/cloud_slack_install.png "Install Agent") - -3. Click `Add platform` dropdown, and select `Slack` option. - - ![Slack Platform Select](assets/cloud_slack_select_slack.png "Select slack platform") - -4. Click `Add to Slack` button to add Cloud Slack integration to your Slack workspace. - - ![Add to Slack](assets/cloud_slack_add_to_slack.png "Add to Slack") - -5. Click `Allow` to grant permission for Botkube app to access your Slack workspace. - - ![Cloud Slack Grant](assets/cloud_slack_grant.png "Cloud Slack grant") - -6. Provide the Slack app details as described follows and click `Next` button. - - - **Connected Slack Workspace:** Slack workspace that you granted permission in the previous step. - - **Display Name:** Display name of the Cloud Slack configuration. - - **Channels:** Slack channes where you can execute Botkube commands and receive notification. - - ![Cloud Slack Workspace](assets/cloud_slack_workspace_details.png "Cloud Slack workspace") - -7. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Cloud Slack Plugins](assets/cloud_slack_add_plugins.png "Cloud Slack plugins") - -8. Include optional default command aliases and actions and click `Apply Changes` button to update Botkube Cloud instance. - - ![Cloud Slack Create](assets/cloud_slack_create.png "Cloud Slack create") - -## Using Botkube Cloud App for Slack - -You can start using Botkube Cloud App for Slack by typing `@Botkube cloud help` in the Slack channel you configured in one of the previous steps. - -![Cloud Slack Command Help](assets/cloud_slack_command_help.png "Cloud Slack command help") - -### Listing Cloud Instances - -You can list all the Botkube Cloud instances by typing `@Botkube cloud list instances` in the Slack channel, or click the button `List connected instances` in the help command response. -Besides the instance `name`, `ID`, and `status` in the list response, you can also click the `Get details` button to go to instance details on Botkube Cloud Dashboard. - -![Cloud Slack List Instances](assets/cloud_slack_command_list_instances.png "Cloud Slack list instances") - -### Setting Default Instances - -Once a Botkube command is executed, it will be handled on target Kubernetes cluster specified with `--cluster-name` flag. This is an optional flag, -where if you have not specified it, Botkube Cloud will select the first instance. However, you can also achieve setting default instance with command `@Botkube cloud set default-instance {instance-id}`. - -![Cloud Slack Set Default Instances](assets/cloud_slack_command_set_default.png "Cloud Slack set default instance") - -After this point, all of your commands will be executed on the default instance. Moreover, if you want to execute a command on all the target clusters, you can use `--all-clusters` flag. - -![Cloud Slack All Clusters](assets/cloud_slack_command_all_clusters.png "Cloud Slack all clusters") - -### Setting Public Alias for Private Channels - -In order to maintain your confidentiality while using Botkube's plugins, you need to create a public alias for your private Slack channels. This alias will only be visible to Botkube Cloud administrators. - -#### During the Botkube Invitation to Private Channels - -When you invite Botkube to a private channel, a prompt will appear to guide you through the process of creating a public alias. - -#### For Existing Private Channels - -To update an existing alias for a private channel, or if Botkube is already integrated, simply use this command: - -``` -@Botkube cloud set channel-alias -``` - -## Cleanup - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - - ![Cloud Slack Instance Manage](assets/cloud_slack_instance_list_manage.png "Cloud Slack instances manage") - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Cloud Slack Instance Delete](assets/cloud_slack_instance_delete.png "Cloud Slack instances delete") diff --git a/versioned_docs/version-1.10/installation/slack/index.md b/versioned_docs/version-1.10/installation/slack/index.md deleted file mode 100644 index 6d5881e7..00000000 --- a/versioned_docs/version-1.10/installation/slack/index.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: slack -title: Slack -sidebar_position: 1 ---- - -## Botkube Slack App Versions - -In order to connect with Slack, Botkube requires a Slack application. There are two versions of the Botkube Slack App available: - -### Botkube Cloud App for Slack - -The Botkube Cloud App for Slack offers several advanced features: - -- One-click installation into your Slack workspace -- Multi-cluster executor support with a single Slack App -- Manage Slack channels directly from the Botkube web app and ensure the Botkube bot is invited to the correct channels - -The Botkube Cloud App for Slack uses Botkube's cloud services to manage channels and route executor commands. Events and alerts are sent directly from your cluster to your Slack workspace for reliable, fast notifications. - -You can directly try Botkube Cloud App for Slack for free by creating an account in the [Botkube Web App](https://app.botkube.io). Follow the [Cloud Slack app tutorial](cloud-slack.mdx) to learn more. - -### Botkube Socket Slack App - -The Socket-mode app works with the open-source Botkube Agent. The Botkube Socket-mode Slack App has the following caveats: - -- Must be installed manually into your Slack workspace using the provided configuration -- Slack channels must be managed manually, and you need to ensure the Botkube bot is invited to any channel you want to use with Botkube -- When using executor plugins (e.g. kubectl) in a multi-cluster environment, each cluster needs to have a dedicated Botkube Slack bot in order to route commands to the correct cluster. - -Follow the [instruction](socket-slack.md) for more details. diff --git a/versioned_docs/version-1.10/installation/slack/socket-slack.md b/versioned_docs/version-1.10/installation/slack/socket-slack.md deleted file mode 100644 index 7d05aed5..00000000 --- a/versioned_docs/version-1.10/installation/slack/socket-slack.md +++ /dev/null @@ -1,232 +0,0 @@ ---- -id: socket-slack -title: Socket Slack App -sidebar_position: 2 ---- - -The Socket-mode app works with the open-source Botkube Agent and does not require an account or subscription. - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Slack Workspace admin access - -## Install Socket Slack App in Your Slack workspace - -Botkube uses interactive messaging to provide better experience. Interactive messaging needs a Slack App with Socket Mode enabled and currently this is not suitable for Slack App Directory listing. For this reason, you need to create a Slack App in your own Slack workspace and use it for Botkube deployment. - -:::warning -**Multi-cluster caveat:** The architecture of socket-based Slack apps has a limitation on the routing of executor commands. If you would like to use [Botkube executors](../../configuration/executor/index.md) (e.g. kubectl commands) and have multiple Kubernetes clusters, you need to create and install a Botkube Slack app for each cluster. This is required so that the Slack to Botkube connections go to the right place. We recommend you set the name of each app to reflect the cluster it will connect to in the next steps. - -To learn more about the Slack Socket API limitation, see the [comment](https://github.com/slackapi/bolt-js/issues/1263#issuecomment-1006372826) in the official Slack bot framework repository. - -The [Botkube Cloud App for Slack](./cloud-slack.mdx) does not have this limitation. -::: - -Follow the steps below to create and install Botkube Slack app to your Slack workspace. - -### Create Slack app - -1. Go to [Slack App console](https://api.slack.com/apps) to create an application. -1. Click **Create New App** and select **From an app manifest** in the popup to create application from manifest. - - ![Create App from Manifest](assets/slack_add_app.png "Slack add app") - -1. Select a workspace where you want to create application and click **Next**. - - ![Select Workspace](assets/slack_select_workspace.png "Slack select workspace") - -1. Select **YAML** tab, copy & paste one of the following manifests, and click **Next**, and then **Create**. - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -
- - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - channels:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - groups:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - channels:read - - groups:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - -
- -### Install Botkube to the Slack workspace - -Once the application is created, you will be redirected to application details page. Press the **Install your app** button, select the workspace and click **Allow to finish installation**. - -![Install Slack App](assets/slack_install_app.png "Slack install app") - -### Obtain Bot Token - -Follow the steps to obtain the Bot Token: - -1. Select **OAuth & Permissions** section on the left sidebar. On this page you can copy the bot token which starts with `xoxb...`. - - ![Retrieve Slack Bot Token](assets/slack_retrieve_bot_token.png "Slack Bot Token") - -1. Export Slack Bot Token as follows: - - ```shell - export SLACK_API_BOT_TOKEN="{botToken}" - ``` - -### Generate and obtain App-Level Token - -Slack App with Socket Mode requires an App-Level Token for the websocket connection. - -Follow the steps to generate an App-Level Token: - -1. Select **Basic Information** link from the left sidebar and scroll down to section **App-Level Token**. Click on the **Generate Token and Scopes** button. -1. Enter a **Name**, select `connections:write` scope, and click **Generate**. - - ![Generate App-Level Token](assets/slack_generate_app_token.png "Slack App Token") - - ![Retrieve App-Level Token](assets/slack_retrieve_app_token.png "Slack Retrieve App Token") - -1. Copy **App-Level Token** and export it as follows: - - ```shell - export SLACK_API_APP_TOKEN="${appToken}" - ``` - -### Add Botkube user to a Slack channel - -After installing Botkube app to your Slack workspace, you could see a new bot user with the name "Botkube" added in your workspace. Add that bot to a Slack channel you want to receive notification in. You can add it by inviting `@Botkube` in a channel. - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} -export SLACK_CHANNEL_NAME={channel_name} - -botkube install --version v1.10.0 \ ---set communications.default-group.socketSlack.enabled=true \ ---set communications.default-group.socketSlack.channels.default.name=${SLACK_CHANNEL_NAME} \ ---set communications.default-group.socketSlack.appToken=${SLACK_API_APP_TOKEN} \ ---set communications.default-group.socketSlack.botToken=${SLACK_API_BOT_TOKEN} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} -``` - -where: - -- **SLACK_CHANNEL_NAME** is the channel name where @Botkube is added -- **SLACK_API_BOT_TOKEN** is the Token you received after installing Botkube app to your Slack workspace -- **SLACK_API_APP_TOKEN** is the Token you received after installing Botkube app to your Slack workspace and generate in App-Level Token section -- **CLUSTER_NAME** is the cluster name set in the incoming messages -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -### Delete Botkube from Slack workspace - -- Go to the [Slack apps](https://api.slack.com/apps) page, -- Click on "Botkube", scroll to bottom, and click on "Delete App" button. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.10/installation/socketslack.mdx b/versioned_docs/version-1.10/installation/socketslack.mdx deleted file mode 100644 index 314744a2..00000000 --- a/versioned_docs/version-1.10/installation/socketslack.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -id: socketslack -title: "Slack" -sidebar_position: -1 -sidebar_class_name: hidden ---- - -Redirecting to the new location of Slack installation... If you are not redirected in a few seconds, please click [here](./slack/index.md). - -import { RelativeRedirect } from "@site/src/components/RelativeRedirect"; - - diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_add_app.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_add_app.png deleted file mode 100644 index de175417..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_add_plugins.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_add_plugins.png deleted file mode 100644 index 7217b81b..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_admin_center.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_admin_center.png deleted file mode 100644 index 46a149eb..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_admin_center.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_botkube_app_add.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_botkube_app_add.png deleted file mode 100644 index 4f8cbe63..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_botkube_app_add.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_command_all_clusters.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_command_all_clusters.png deleted file mode 100644 index bba0111b..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_command_all_clusters.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_command_help.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_command_help.png deleted file mode 100644 index ccb04a47..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_command_help.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_command_set_default.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_command_set_default.png deleted file mode 100644 index 1f89e9ec..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_command_set_default.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_config.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_config.png deleted file mode 100644 index 99aee80e..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_config.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_create.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_create.png deleted file mode 100644 index 246b25e2..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_create.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_download_app.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_download_app.png deleted file mode 100644 index ccb6608d..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_download_app.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_instance_list_manage.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_instance_list_manage.png deleted file mode 100644 index c7842590..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_instance_list_manage.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_list_instances.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_list_instances.png deleted file mode 100644 index 097ca812..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_list_instances.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_permissions_accept.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_permissions_accept.png deleted file mode 100644 index aa624edc..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_permissions_accept.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_permissions_select_account.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_permissions_select_account.png deleted file mode 100644 index 13a4bf33..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_permissions_select_account.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_permissions_success.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_permissions_success.png deleted file mode 100644 index e35fc720..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_permissions_success.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_select_platform.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_select_platform.png deleted file mode 100644 index 9659eccd..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_select_platform.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_select_team.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_select_team.png deleted file mode 100644 index dc020de3..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_select_team.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_team_connect.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_team_connect.png deleted file mode 100644 index 9473896a..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_team_connect.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_team_connect_success.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_team_connect_success.png deleted file mode 100644 index 53bb3ec3..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_team_connect_success.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_welcome_msg.png b/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_welcome_msg.png deleted file mode 100644 index 76dee224..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/cloud_teams_welcome_msg.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/teams_add_app.png b/versioned_docs/version-1.10/installation/teams/assets/teams_add_app.png deleted file mode 100644 index 43b22d05..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/teams_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/teams_add_app_info.png b/versioned_docs/version-1.10/installation/teams/assets/teams_add_app_info.png deleted file mode 100644 index 448ae69c..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/teams_add_app_info.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/teams_add_bot.png b/versioned_docs/version-1.10/installation/teams/assets/teams_add_bot.png deleted file mode 100644 index 3f386f4f..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/teams_add_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/teams_add_bot_endpoint.png b/versioned_docs/version-1.10/installation/teams/assets/teams_add_bot_endpoint.png deleted file mode 100644 index 3d4c9ede..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/teams_add_bot_endpoint.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/teams_add_bot_feature.png b/versioned_docs/version-1.10/installation/teams/assets/teams_add_bot_feature.png deleted file mode 100644 index a6594094..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/teams_add_bot_feature.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/teams_add_to_team.png b/versioned_docs/version-1.10/installation/teams/assets/teams_add_to_team.png deleted file mode 100644 index 94ff2cd2..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/teams_add_to_team.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/teams_ping.png b/versioned_docs/version-1.10/installation/teams/assets/teams_ping.png deleted file mode 100644 index d0cdfb2d..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/teams_ping.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/teams_publish_app.png b/versioned_docs/version-1.10/installation/teams/assets/teams_publish_app.png deleted file mode 100644 index f311389a..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/teams_publish_app.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/assets/teams_select_existing_bot.png b/versioned_docs/version-1.10/installation/teams/assets/teams_select_existing_bot.png deleted file mode 100644 index 383d5386..00000000 Binary files a/versioned_docs/version-1.10/installation/teams/assets/teams_select_existing_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/teams/index.md b/versioned_docs/version-1.10/installation/teams/index.md deleted file mode 100644 index 598f0fce..00000000 --- a/versioned_docs/version-1.10/installation/teams/index.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -id: teams -title: "Microsoft Teams" -sidebar_position: 5 ---- - -## Botkube app for Microsoft Teams - -The Botkube app for Microsoft Teams offers several advanced features: - -- Simplified installation into your Microsoft Teams workspace -- Multi-cluster executor support with a single Microsoft Teams app -- Manage Teams channels directly from the Botkube web app and ensure the Botkube bot is invited to the correct channels - -The Botkube app for Microsoft Teams uses Botkube's cloud services to manage channels and route source events and executor commands. Currently, it requires a manual side-loading of the app, but we are working on getting it listed in Microsoft AppSource. - -You can directly try Botkube app for Microsoft Teams for free by creating an account in the [Botkube Web App](https://app.botkube.io). Follow the steps below to install the app. - -## Prerequisites - -- A Botkube Cloud account. - - You can try out the Botkube app for Microsoft Teams for free by creating an account in the [Botkube Cloud app](https://app.botkube.io). - -## Create a Botkube Cloud Instance with Microsoft Teams - -### Connect Botkube Cloud to your Kubernetes cluster - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and click on `New Instance` button. - - ![New Instance](../assets/cloud_new_instance.png "Create new instance") - -1. Install Botkube Agent on your Kubernetes cluster by following the instructions on the page. - - ![Install Agent](../assets/cloud_install.png "Install Agent") - -1. Click `Add platform` dropdown, and select `Teams` option. - - ![Teams Platform Select](assets/cloud_teams_select_platform.png "Select Teams platform") - -Proceed with the next section. - -### Install Botkube app to your team - -1. Install Botkube app for Microsoft Teams from the official app catalog by clicking the `Install Botkube App for Teams` button. - - ![Install Botkube App for Microsoft Teams](assets/cloud_teams_download_app.png "Install Botkube App for Microsoft Teams") - - Alternatively, you can search for the "Botkube" app in the Microsoft Teams app catalog and click the **Add** button. - - ![Add Botkube App](assets/cloud_teams_add_app.png "Add Botkube App") - -1. Add the Botkube app to your team. - - 1. Click the **Add to a team** button. - - ![Add app to team](assets/cloud_teams_botkube_app_add.png "Add app to team") - - 1. Select the team and default channel, where you'll get the welcome message. - - ![Select a team](assets/cloud_teams_select_team.png "Select a team") - - 1. Click the **Set up a bot** button. - -Once the Botkube app is added to your team, you'll receive a welcome message. - -![Botkube Cloud Microsoft Teams Welcome Message](assets/cloud_teams_welcome_msg.png "Botkube Cloud Microsoft Teams welcome message") - -Proceed with the next section. - -### Grant permissions for Botkube app - -:::info -This step requires administrator permissions on your Microsoft Teams organization. Granting permissions is needed only once for the whole organization. -::: - -1. Click on the **Grant access** button. -1. Select your Microsoft account. - - ![Select account](assets/cloud_teams_permissions_select_account.png "Select account") - -1. Click the **Accept** button. - - ![Grant access](assets/cloud_teams_permissions_accept.png "Grant access") - -1. You will be redirected to the confirmation page. - - ![Confirmation page](assets/cloud_teams_permissions_success.png "Confirmation page") - -Close the page and proceed with the next section. - -### Connect your team to Botkube Cloud - -Go back to the Microsoft Teams app channel, where you received the welcome message. - -1. Click the **Connect to Botkube Cloud** button in the welcome message. -1. Log in to Botkube Cloud, if you haven't already. Ensure that you selected the correct organization, where you want to connect your team. -1. Click the **Connect** button. - - ![Connect to Botkube Cloud](assets/cloud_teams_team_connect.png "Connect to Botkube Cloud") - -1. You will see a confirmation page. - - ![Confirmation page](assets/cloud_teams_team_connect_success.png "Confirmation page") - -Close the page and proceed with the next section. - -### Finalize Botkube Cloud instance configuration - -Go back to the Botkube Cloud instance creation. - -1. In step 2, select your connected team and provide other details. - - - **Connected Microsoft Teams team:** Teams team that you connected in the previous section. - - **Display Name:** Display name of the Microsoft Teams team configuration. - - **Channels:** Teams channels where you can execute Botkube commands and receive notification. - - ![Botkube Cloud Instance Configuration](assets/cloud_teams_config.png "Botkube Cloud Instance Configuration") - -2. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Microsoft Teams Plugins](assets/cloud_teams_add_plugins.png "Microsoft Teams plugins") - -3. Include optional default command aliases and actions and click `Apply Changes` button to update Botkube Cloud instance. - - ![Microsoft Teams Create](assets/cloud_teams_create.png "Microsoft Teams create") - -## Using Botkube app for Microsoft Teams - -You can start using Botkube Cloud Microsoft Teams by typing `@Botkube cloud help` in one of the channels in the team you configured in one of the previous steps. - -![Botkube Cloud Microsoft Teams Command Help](assets/cloud_teams_command_help.png "Botkube Cloud Microsoft Teams command help") - -### Listing Cloud Instances - -You can list all your Botkube Cloud instances by typing `@Botkube cloud list` in the Microsoft Teams channel, or click the button `List connected instances` in the help command response. Besides the instance `name`, `ID`, and `status` in the list response, you can also click the `Get details` button to go to instance details on Botkube Cloud Dashboard. - -![Botkube Cloud Microsoft Teams List Instances](assets/cloud_teams_list_instances.png "Botkube Cloud Microsoft Teams list instances") - -### Setting Default Instance - -Once a Botkube command is executed, it will be handled on target Kubernetes cluster specified with `--cluster-name` flag. This is an optional flag, -where if you have not specified it, Botkube Cloud will select the first instance. However, you can also achieve setting default instance with command `@Botkube cloud set default-instance`. - -![Cloud Microsoft Teams Set Default Instances](assets/cloud_teams_command_set_default.png "Cloud Microsoft Teams set default instance") - -After this point, all of your commands will be executed on the default instance. Moreover, if you want to execute a command on all the target clusters, you can use `--all-clusters` flag. - -![Cloud Microsoft Teams All Clusters](assets/cloud_teams_command_all_clusters.png "Cloud Microsoft Teams all clusters") - -## Cleanup - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - - ![Cloud Teams Instance Manage](assets/cloud_teams_instance_list_manage.png "Cloud Microsoft Teams instances manage") - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Cloud Teams Instance Delete](../assets/cloud_instance_delete.png "Cloud Microsoft Teams instances delete") - -## Caveats - -### RBAC `ChannelName` mapping - -Same as other communication platforms, Botkube app for Microsoft Teams supports RBAC along with [all mappings](../../configuration/rbac.md#mapping-types). -However, because of the Microsoft Teams API limitation, for the default team channel the `ChannelName` is always `General`, regardless of the actual localized channel name. - -## Limitations - -Botkube app for Microsoft Teams currently doesn't support the following features yet: - -- Processing states from selected dropdowns, e.g., used for the `kubectl` command builder. In a result, the command builder is not available. -- Adding 👀 and ✅ reactions to messages indicating process status. - - This seems to be a limitation of the Microsoft Teams platform, however we'll investigate if there is a workaround. - -- Sending messages visible only to specific users. -- Replacing messages with new content, e.g., used for pagination. Currently, a new card is sent as a new message. -- User mentions in messages. Instead, Botkube app uses plaintext mentions with first and last name. diff --git a/versioned_docs/version-1.10/installation/webhook/assets/webhook_add_plugins.png b/versioned_docs/version-1.10/installation/webhook/assets/webhook_add_plugins.png deleted file mode 100644 index c4c4d54b..00000000 Binary files a/versioned_docs/version-1.10/installation/webhook/assets/webhook_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/webhook/assets/webhook_create.png b/versioned_docs/version-1.10/installation/webhook/assets/webhook_create.png deleted file mode 100644 index 1ec031e0..00000000 Binary files a/versioned_docs/version-1.10/installation/webhook/assets/webhook_create.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/webhook/assets/webhook_form.png b/versioned_docs/version-1.10/installation/webhook/assets/webhook_form.png deleted file mode 100644 index dd2d98cc..00000000 Binary files a/versioned_docs/version-1.10/installation/webhook/assets/webhook_form.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/webhook/assets/webhook_instance_delete.png b/versioned_docs/version-1.10/installation/webhook/assets/webhook_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.10/installation/webhook/assets/webhook_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/webhook/assets/webhook_instance_display_name.png b/versioned_docs/version-1.10/installation/webhook/assets/webhook_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.10/installation/webhook/assets/webhook_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/webhook/assets/webhook_platform_select.png b/versioned_docs/version-1.10/installation/webhook/assets/webhook_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.10/installation/webhook/assets/webhook_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/webhook/assets/webhook_summary.png b/versioned_docs/version-1.10/installation/webhook/assets/webhook_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.10/installation/webhook/assets/webhook_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.10/installation/webhook/cloud.md b/versioned_docs/version-1.10/installation/webhook/cloud.md deleted file mode 100644 index 59926126..00000000 --- a/versioned_docs/version-1.10/installation/webhook/cloud.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: webhook-cloud -title: "Outgoing webhook for Botkube Cloud" -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Webhook - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/webhook_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Webhook` option. - - ![Select Platform](assets/webhook_platform_select.png "Select platform") - -4. Fill in all required data in the form - - ![Form](assets/webhook_form.png "Form") - -5. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/webhook_add_plugins.png "Plugins") - -6. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/webhook_create.png "Create") - - :::note - If you don't include other platforms which use `Executor` plugins we recommend `default aliases` and `default actions` options unchecked - ::: - -7. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/webhook_summary.png "Summary") - -## Clean up - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/webhook_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.10/installation/webhook/index.md b/versioned_docs/version-1.10/installation/webhook/index.md deleted file mode 100644 index be2a3aa3..00000000 --- a/versioned_docs/version-1.10/installation/webhook/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: webhook -title: "Outgoing webhook" -sidebar_position: 7 ---- - -You can use Botkube to trigger your Webhook and send events. Learn how to configure Botkube to work with Webhook: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.10/installation/webhook/self-hosted.md b/versioned_docs/version-1.10/installation/webhook/self-hosted.md deleted file mode 100644 index 886b39ed..00000000 --- a/versioned_docs/version-1.10/installation/webhook/self-hosted.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: webhook-self-hosted -title: "Outgoing webhook for self-hosted Botkube" -slug: self-hosted -sidebar_position: 1 ---- - -## Install Botkube in Kubernetes cluster - -Botkube can be integrated with external apps via Webhooks. A webhook is essentially a POST request sent to a callback URL. So you can configure Botkube to send events on specified URL. - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export WEBHOOK_URL={url} - -botkube install --version v1.10.0 \ ---set communications.default-group.webhook.enabled=true \ ---set communications.default-group.webhook.url=${WEBHOOK_URL} \ ---set settings.clusterName=${CLUSTER_NAME} -``` - -where: - -- **WEBHOOK_URL** is an outgoing webhook URL to which Botkube will POST the events, -- **CLUSTER_NAME** is the cluster name set in the incoming messages. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.10/operation/_category_.json b/versioned_docs/version-1.10/operation/_category_.json deleted file mode 100644 index 7ae2cbda..00000000 --- a/versioned_docs/version-1.10/operation/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Operations", - "position": 9 -} diff --git a/versioned_docs/version-1.10/operation/common-problems.md b/versioned_docs/version-1.10/operation/common-problems.md deleted file mode 100644 index 08263399..00000000 --- a/versioned_docs/version-1.10/operation/common-problems.md +++ /dev/null @@ -1,119 +0,0 @@ -# Common problems - -This document describes how to identify and resolve common Botkube problems that might occur. - -## Incompatible plugin API version - -**Symptoms** - -- Botkube agent Pod is restarting -- In [Botkube agent logs](diagnostics.mdx#agent-logs), you see such entry: - - ```text - while running application: while waiting for goroutines to finish gracefully: 1 error occurred: - * while starting plugins manager: while creating executor plugins: Incompatible API version with plugin. Plugin version: 2, Client versions: [1] - ``` - -**Debugging steps** - -- [Check Botkube agent version](diagnostics.mdx#agent-version). - -- [Check plugin repository version](diagnostics.mdx#check-configured-plugin-repositories). - -**Solution** - -In order to fix the problem, you need to make sure that the agent version is the same as the plugin repository version. For example, for agent image `ghcr.io/kubeshop/botkube:v1.5.0` you need to configure official plugin repository in version `v1.5.0`: `https://github.com/kubeshop/botkube/releases/download/v1.5.0/plugins-index.yaml`. -To change the repository URL, run: - -```bash -helm upgrade botkube botkube/botkube -n botkube --reuse-values --set plugins.repositories.botkube.url="https://github.com/kubeshop/botkube/releases/download/v1.5.0/plugins-index.yaml" -``` - -## Helm chart loading error - -**Symptoms** - -- You encounter the following errors when running the `botkube install` command: - - ```text - Error: while loading Helm chart: Chart.yaml file is missing - ``` - - or - - ```text - Error: while loading Helm chart: file 'botkube' does not appear to be a gzipped archive; got 'application/octet-stream' - ``` - -**Solution** - -If you're experiencing these errors, it means that there is a conflict with a file or directory named `botkube` in the location where you executed the `botkube install` command. To resolve this issue, follow these steps: - -1. **rename or remove 'botkube':** You cannot have a file or directory named `botkube` in the same location where you are trying to install Botkube. You should either rename or remove the conflicting `botkube` file or directory. - -2. **Change Directory:** Alternatively, you can navigate to a different directory in your command line interface before executing the `botkube install` command. Ensure that the directory where you run the command does not contain any conflicting `botkube` files or directories. - -## Network connections - -Botkube can work in private clusters where inbound connections are limited. However, you need to allow outgoing connections to all configured plugin repositories and API endpoints, depending on the communication platform you intend to use. - -### Botkube official plugins - -The official Botkube plugin index and binaries are hosted on [GitHub releases](https://github.com/kubeshop/botkube/releases). For instance, for the version `v1.5.0` the following URLs are used: - -- Plugin index URL: https://github.com/kubeshop/botkube/releases/download/v1.10.0/plugins-index.yaml -- Kubectl plugin binary for `linux/amd64`: https://github.com/kubeshop/botkube/releases/download/v1.10.0/executor_kubectl_linux_amd64.tar.gz - -As a result, you need to allow outbound connections for Botkube to successfully download GitHub assets. - -Additionally, each plugin may define additional dependencies that the [plugin manager](../architecture/index.md#plugin-manager) downloads on startup. For example, the Helm plugin for `linux/amd64` requires `https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz`. -To learn more about all URLs that need to be accessible, you can download a plugin index and check all plugin definitions that you want to enable. - -### Socket Slack - -For the Slack communication platform, we use the [Socket mode](https://api.slack.com/apis/connections/socket) approach. -In order to make this integration work, you need to allow all Slack API URLs defined under https://my.slack.com/help/urls, especially: - -- api.slack.com -- upload.slack.com -- universal-upload-edge.slack.com -- global-upload-edge.slack.com -- wss://wss-backup.slack.com -- wss://wss-mobile.slack.com -- wss://wss-primary.slack.com - -Visit [Slack official guide](https://slack.com/help/articles/360001603387-Manage-Slack-connection-issues#network-settings) for troubleshooting your Slack connection. - -### Cloud Slack - -Cloud Slack integration communicates via gRPC with the Botkube control-plane. In order to make this integration work, you need to allow access to `api.botkube.io`. - -## Plugin's permissions - -If you experience problems while configuring RBAC (Role-Based Access Control) for plugins, you can refer to the [troubleshooting](../configuration/rbac.md#troubleshooting) guide for assistance. - -## I can't see my Slack private channels in Cloud Dashboard - -To comply with Slack's privacy policy, private channels won't be visible until you create a public alias for the respective channel. Refer to the provided instructions for guidance on completing this process: [Setting Public Alias for Private Channels](../installation/slack/cloud-slack#setting-public-alias-for-private-channels) - -## Air-Gap installation - -**Please note that we do not support air-gap installations.** However, here are some suggestions that you may find helpful: - -- Mirror Botkube images to your private registry: - - - [`ghcr.io/kubeshop/botkube:{botkube_version}`](https://github.com/kubeshop/botkube/pkgs/container/botkube), e.g., `ghcr.io/kubeshop/botkube:v1.5.0` - - [`ghcr.io/kubeshop/k8s-sidecar:in-cluster-config`](https://github.com/orgs/kubeshop/packages/container/package/k8s-sidecar) - -- During startup, Botkube downloads repository indexes and all enabled plugins. All of them are stored under the `/tmp` folder. To ensure that the [plugin manager](../architecture/index.md#plugin-manager) does not make external calls, all required plugins must be present. You can achieve this by mounting a Persistent Volume Claim (PVC) at this path. By default, we use [`emptyDir`](https://github.com/kubeshop/botkube/blob/9d0627794078d519987309271b64c94047cd65d9/helm/botkube/templates/deployment.yaml#L176-L177). Later, you can mount your Persistent Volume (PV) with cached plugins in your air-gapped environment. - -- Select a communication platform that can be installed in the air-gapped environment, such as [Mattermost](../installation/mattermost/index.md). - -## Others - -Having trouble finding a solution to your problem? No problem at all! We will help you to get your Botkube up and running. First, follow these steps: - -1. [Export the Botkube agent configuration](diagnostics.mdx#agent-configuration) -2. [Export the Botkube agent logs](diagnostics.mdx#agent-logs) - -After that, come join our Slack community workspace at https://join.botkube.io. Head over to the [`#helping-hands`](https://slack.com/app_redirect?team=TG7TTBLJ0&channel=helping-hands) channel and share the assets you exported along with a description of your issue. Our team is ready to assist you! diff --git a/versioned_docs/version-1.10/operation/diagnostics.mdx b/versioned_docs/version-1.10/operation/diagnostics.mdx deleted file mode 100644 index 33810004..00000000 --- a/versioned_docs/version-1.10/operation/diagnostics.mdx +++ /dev/null @@ -1,157 +0,0 @@ -# Basic diagnostics - -Here you can find the list of basic diagnostic actions that may help you look for bug causes. - -In order to run the suggested commands, make sure that you have installed: - -- [`helm`](https://helm.sh/docs/intro/install/) -- [`kubectl`](https://kubernetes.io/docs/tasks/tools/) - -## Agent - -This section describes [Botkube agent](../architecture/index.md) related diagnostic. - -### Agent version - -The easiest way to check the Agent version is to get the Docker image: - -```bash -kubectl get deploy botkube -n botkube -o=jsonpath="{'Used images\n'}{range .spec.template.spec.containers[*]}{.name}{':\t'}{.image}{'\n'}{end}" -``` - -You should get an output similar to this: - -```bash -Used images -botkube: ghcr.io/kubeshop/botkube:v1.5.0 -cfg-watcher: ghcr.io/kubeshop/k8s-sidecar:in-cluster-config -``` - -The `botkube` is the agent image. The container image tag (`v1.5.0`) is the version in which it was deployed on the cluster. - -### Agent health - -To check if the Agent Pods are in the `Running` state, run: - -```bash -kubectl get pod -n botkube -l app=botkube -``` - -All the containers from Pods should be in the `Running` status. Restarts' number higher than one may also indicate problems, e.g. not enough resource, lack of permissions, network timeouts, etc. - -### Agent logs - -If the Botkube Agent is [healthy](#agent-health), you should be able to track any bug by checking the logs. To check the logs, run: - -```bash -kubectl logs -n botkube -l app=botkube -c botkube -``` - -To get all logs specify `--tail=-1`, otherwise only 10 last lines are displayed. - -To check the logs since a given time, use the `--since-time` or `--since` flag, for example: - -```bash ---since-time=2020-03-30T10:02:08Z -``` - -```bash ---since=3h -``` - -### Agent configuration - -Select a tab to use a tool of your choice for getting Botkube configuration: - - - - -:::note -The `botkube config get` command is available from the `v1.4.0` version. -::: - -Install [Botkube CLI](../cli/getting-started.mdx#installation) and run: - -```bash -botkube config get > /tmp/bk-config.yaml -``` - - - - - -1. Download export-config-job-tpl definition into `/tmp/export-config-job-tpl`. -2. Make sure that the previous job is deleted: - ```bash - kubectl delete job botkube-migration -n botkube - ``` -3. Run a new export config Job based on the configuration from installed Botkube deployment: - ```bash - kubectl get deploy botkube -n botkube -o=go-template-file=/tmp/export-config-job-tpl | kubectl create -f - - ``` -4. Get configuration data: - ```bash - kubectl get cm botkube-config-exporter -ojsonpath='{ .data.config\.yaml }' - ``` - - - - - -### Agent restart - -When Pods are unhealthy, or if the operation processing is stuck, you can restart the Pod using this command: - -``` -kubectl delete po -n botkube -l app=botkube -``` - -### Agent debug logging - -In order to change the logging level to `debug`, run: - -```bash -helm upgrade botkube botkube/botkube -n botkube --set settings.log.level="debug" --reuse-values -``` - -If the Botkube agent Pod isn't restarted automatically, [restart it manually](#agent-restart). - -### Check configured plugin repositories - -Select a tab to use a tool of your choice for checking plugin repository configuration: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -Install [`yq`](https://github.com/mikefarah/yq) and run: - -```bash -helm get values botkube --all -oyaml | yq '.plugins' -``` - - - - - -Install [`jq`](https://stedolan.github.io/jq/download/) and run: - -```bash -helm get values botkube --all -ojson | jq '{ plugins }' -``` - - - - - -```bash -helm get values botkube --all -oyaml | grep -A 10 'plugins:' -``` - -The output may contain more occurrence of a plugin section, so you need to fine the one that has the `repositories` defined. - - - - diff --git a/versioned_docs/version-1.10/plugin/assets/btns-desc.png b/versioned_docs/version-1.10/plugin/assets/btns-desc.png deleted file mode 100644 index 214135f4..00000000 Binary files a/versioned_docs/version-1.10/plugin/assets/btns-desc.png and /dev/null differ diff --git a/versioned_docs/version-1.10/plugin/assets/btns-inline.png b/versioned_docs/version-1.10/plugin/assets/btns-inline.png deleted file mode 100644 index caf54e14..00000000 Binary files a/versioned_docs/version-1.10/plugin/assets/btns-inline.png and /dev/null differ diff --git a/versioned_docs/version-1.10/plugin/assets/demo-msg.gif b/versioned_docs/version-1.10/plugin/assets/demo-msg.gif deleted file mode 100644 index c6aeaf31..00000000 Binary files a/versioned_docs/version-1.10/plugin/assets/demo-msg.gif and /dev/null differ diff --git a/versioned_docs/version-1.10/plugin/assets/echo-demo.gif b/versioned_docs/version-1.10/plugin/assets/echo-demo.gif deleted file mode 100644 index d8accb06..00000000 Binary files a/versioned_docs/version-1.10/plugin/assets/echo-demo.gif and /dev/null differ diff --git a/versioned_docs/version-1.10/plugin/assets/ticker-demo.gif b/versioned_docs/version-1.10/plugin/assets/ticker-demo.gif deleted file mode 100644 index c4ba4b84..00000000 Binary files a/versioned_docs/version-1.10/plugin/assets/ticker-demo.gif and /dev/null differ diff --git a/versioned_docs/version-1.10/plugin/assets/use-tpl.png b/versioned_docs/version-1.10/plugin/assets/use-tpl.png deleted file mode 100644 index 7d64b5fa..00000000 Binary files a/versioned_docs/version-1.10/plugin/assets/use-tpl.png and /dev/null differ diff --git a/versioned_docs/version-1.10/plugin/custom-executor.md b/versioned_docs/version-1.10/plugin/custom-executor.md deleted file mode 100644 index 095e01d2..00000000 --- a/versioned_docs/version-1.10/plugin/custom-executor.md +++ /dev/null @@ -1,260 +0,0 @@ ---- -id: custom-executor -title: "Custom executor" -sidebar_position: 2 ---- - -You can extend Botkube functionality by writing custom executor plugin. An executor allows you to run a given command, such as `kubectl`, directly in the chat window of each communication platform For example. - -Plugin executor is a binary that implements the [executor](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) Protocol Buffers contract. - -## Goal - -This tutorial shows you how to build a custom `echo` executor that responds with a command that was specified by the user in a chat window. - -![echo-demo](./assets/echo-demo.gif) - -For a final implementation, see the [Botkube template repository](./quick-start.md). - -## Prerequisites - -- Basic understanding of the Go language. -- [Go](https://golang.org/doc/install) at least 1.18. - - See [go.mod](https://github.com/kubeshop/botkube/blob/main/go.mod#L1) for the recommended version used by Botkube team. -- [GoReleaser](https://goreleaser.com/) at least 1.13. - -### Develop plugin business logic - -1. Create an executor plugin directory: - - ```bash - mkdir botkube-plugins && cd botkube-plugins - ``` - -2. Initialize the Go module: - - ```bash - go mod init botkube-plugins - ``` - -3. Create the `main.go` file for the `echo` executor with the following template: - - ```go - cat << EOF > main.go - package main - - import ( - "context" - "fmt" - - "github.com/MakeNowJust/heredoc" - "github.com/hashicorp/go-plugin" - "github.com/kubeshop/botkube/pkg/api" - "github.com/kubeshop/botkube/pkg/api/executor" - ) - - // EchoExecutor implements the Botkube executor plugin interface. - type EchoExecutor struct{} - - func main() { - executor.Serve(map[string]plugin.Plugin{ - "echo": &executor.Plugin{ - Executor: &EchoExecutor{}, - }, - }) - } - EOF - ``` - - This template code imports required packages and registers `EchoExecutor` as the gRPC plugin. At this stage, the `EchoExecutor` service doesn't implement the required [Protocol Buffers](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) contract. We will add the required methods in the next steps. - -4. Download imported dependencies: - - ```bash - go mod tidy - ``` - -5. Add the required `Metadata` method: - - ```go - // Metadata returns details about the Echo plugin. - func (*EchoExecutor) Metadata(context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - Version: "1.0.0", - Description: "Echo sends back the command that was specified.", - JSONSchema: api.JSONSchema{ - Value: heredoc.Doc(`{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "echo", - "description": "Example echo plugin", - "type": "object", - "properties": { - "formatOptions": { - "description": "Options to format echoed string", - "type": "array", - "items": { - "type": "string", - "enum": [ "bold", "italic" ] - } - } - }, - "additionalProperties": false - }`), - }, - }, nil - } - ``` - - The `Metadata` method returns basic information about your plugin. This data is used when the plugin index is generated in an automated way. You will learn more about that in the next steps. - - Ąs a part of the `Metadata` method, you can define the plugin dependencies. To learn more about them, see the [Dependencies](./dependencies.md) document. - -6. Add the required `Execute` method: - - ```go - // Execute returns a given command as a response. - func (*EchoExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - return executor.ExecuteOutput{ - Message: api.NewCodeBlockMessage(response, true), - }, nil - } - ``` - - The `Execute` method is the heart of your executor plugin. This method runs your business logic and returns the execution output. Next, the Botkube core sends back the response to a given communication platform. - If the communication platform supports interactivity, you can construct and return interactive messages containing buttons, dropdowns, input text, and more complex formatting. To learn more about it, see the [Interactive Messages](./interactivity.md) guide. - - For each `Execute` method call, Botkube attaches the list of associated configurations. You will learn more about that in the [**Passing configuration to your plugin**](#passing-configuration-to-your-plugin) section. - -7. Add the required `Help` method: - - ```go - // Help returns help message - func (EchoExecutor) Help(context.Context) (api.Message, error) { - btnBuilder := api.NewMessageButtonBuilder() - return api.Message{ - Sections: []api.Section{ - { - Base: api.Base{ - Header: "Run `echo` commands", - Description: description, - }, - Buttons: []api.Button{ - btnBuilder.ForCommandWithDescCmd("Run", "echo 'hello world'"), - }, - }, - }, - }, nil - } - ``` - - You can use `api.NewCodeBlockMessage` or `api.NewPlaintextMessage` helper functions, or construct your own message. - -## Build plugin binaries - -Now 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 your needs. - -:::note -Instead of GoReleaser, you can use another tool of your choice. -::: - -1. Create the GoReleaser configuration file: - - ```yaml - cat << EOF > .goreleaser.yaml - project_name: botkube-plugins - before: - hooks: - - go mod download - - builds: - - id: echo - binary: executor_echo_{{ .Os }}_{{ .Arch }} - - no_unique_dist_dir: true - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - goarch: - - amd64 - - arm64 - goarm: - - 7 - - snapshot: - name_template: 'v{{ .Version }}' - EOF - ``` - -2. Build the binaries: - - ```bash - goreleaser build --rm-dist --snapshot - ``` - -Congrats! You just created your first Botkube executor plugin! :tada: - -Now it's time to [test it locally with Botkube](local-testing.md). Once you're done testing, see how to [distribute it](repository.md). - -## Passing configuration to your plugin - -Sometimes your executor plugin requires a configuration specified by the end-user. Botkube supports such requirement and provides an option to specify plugin configuration under `config`. An example Botkube configuration looks like this: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - name: "all-teams" - bindings: - executors: - - echo-team-a - - echo-team-b - -executors: - "echo-team-a": # executor configuration group name - botkube/echo: - enabled: true - config: - formatOptions: ["italic"] - "echo-team-b": # executor configuration group name - botkube/echo: - enabled: true - config: - formatOptions: ["bold"] -``` - -This means that two different `botkube/echo` plugin configurations were bound to the `all-teams` Slack channel. Under `executor.ExecuteInput{}.Configs`, you will find the list of configurations in the YAML format as specified under the `config` property for each bound and enabled executor. The order of the configuration is the same as specified under the `bindings.executors` property. It's up to the plugin author to merge the passed configurations. You can use our helper function from the plugin extension package (`pluginx`). - -```go -import ( - "context" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -// Config holds the executor configuration. -type Config struct { - FormatOptions []string `yaml:"options,omitempty"` -} - -func (EchoExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - var cfg Config - err := pluginx.MergeExecutorConfigs(in.Configs, &cfg) - if err != nil { - return executor.ExecuteOutput{}, err - } - // rest logic -} -``` - -:::caution -Botkube starts only one process of a given executor plugin, and the list of configuration YAMLs can be different per gRPC call, so you shouldn't cache the merged configuration. -::: - -## Notes - -- Streaming command response is not supported. As a result, commands like `helm install --wait` doesn't work well, as the response won't be sent until the command finishes. It's recommended to return the response as soon as possible. -- The interactive message is not yet supported. diff --git a/versioned_docs/version-1.10/plugin/custom-source.md b/versioned_docs/version-1.10/plugin/custom-source.md deleted file mode 100644 index 5caf9378..00000000 --- a/versioned_docs/version-1.10/plugin/custom-source.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -id: custom-source -title: "Custom source" -sidebar_position: 3 ---- - -You can extend Botkube functionality by writing custom source plugin. A source allows you to get asynchronous streaming of domain-specific events. For example, streaming Kubernetes or Prometheus events . - -Source is a binary that implements the [source](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) Protocol Buffers contract. - -## Goal - -This tutorial shows you how to build a custom `ticker` source that emits an event at a specified interval. - -![ticker-demo](./assets/ticker-demo.gif) - -For a final implementation, see the [Botkube template repository](./quick-start.md). - -## Prerequisites - -- Basic understanding of the Go language. -- [Go](https://golang.org/doc/install) at least 1.18. - - See [go.mod](https://github.com/kubeshop/botkube/blob/main/go.mod#L1) for the recommended version used by Botkube team. -- [GoReleaser](https://goreleaser.com/) at least 1.13. - -### Develop plugin business logic - -1. Create a source plugin directory: - - ```bash - mkdir botkube-plugins && cd botkube-plugins - ``` - -2. Initialize the Go module: - - ```bash - go mod init botkube-plugins - ``` - -3. Create the `main.go` file for the `ticker` source with the following template: - - ```go - cat << EOF > main.go - package main - - import ( - "context" - "fmt" - "time" - - "github.com/hashicorp/go-plugin" - "github.com/kubeshop/botkube/pkg/api" - "github.com/kubeshop/botkube/pkg/api/source" - "gopkg.in/yaml.v3" - ) - - // Config holds source configuration. - type Config struct { - Interval time.Duration - } - - // Ticker implements the Botkube source plugin interface. - type Ticker struct{} - - func main() { - source.Serve(map[string]plugin.Plugin{ - "ticker": &source.Plugin{ - Source: &Ticker{}, - }, - }) - } - EOF - ``` - - This template code imports required packages and registers `Ticker` as the gRPC plugin. At this stage, the `Ticker` service doesn't implement the required [Protocol Buffers](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) contract. We will add the required methods in the next steps. - -4. Download imported dependencies: - - ```bash - go mod tidy - ``` - -5. Add the required `Metadata` method: - - ```go - // Metadata returns details about the Ticker plugin. - func (Ticker) Metadata(_ context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - Version: "0.1.0", - Description: "Emits an event at a specified interval.", - }, nil - } - ``` - - The `Metadata` method returns basic information about your plugin. This data is used when the plugin index is generated in an automated way. You will learn more about that in the next steps. - - Ąs a part of the `Metadata` method, you can define the plugin dependencies. To learn more about them, see the [Dependencies](./dependencies.md) document. - -6. Add the required `Stream` method: - - ```go - // Stream sends an event after configured time duration. - func (Ticker) Stream(ctx context.Context, in source.StreamInput) (source.StreamOutput, error) { - cfg, err := mergeConfigs(in.Configs) - if err != nil { - return source.StreamOutput{}, err - } - - ticker := time.NewTicker(cfg.Interval) - out := source.StreamOutput{ - Event: make(chan source.Event), - } - - go func() { - for { - select { - case <-ctx.Done(): - ticker.Stop() - case <-ticker.C: - out.Event <- source.Event{ - Message: api.NewPlaintextMessage("Ticker Event", true), - } - } - } - }() - - return out, nil - } - - // mergeConfigs merges all input configuration. In our case we don't have complex merge strategy, - // the last one that was specified wins :) - func mergeConfigs(configs []*source.Config) (Config, error) { - // default config - finalCfg := Config{ - Interval: time.Minute, - } - - for _, inputCfg := range configs { - var cfg Config - err := yaml.Unmarshal(inputCfg.RawYAML, &cfg) - if err != nil { - return Config{}, fmt.Errorf("while unmarshalling YAML config: %w", err) - } - - if cfg.Interval != 0 { - finalCfg.Interval = cfg.Interval - } - } - - return finalCfg, nil - } - ``` - - The `Stream` method is the heart of your source plugin. This method runs your business logic and push events into the `out.Output` channel. Next, the Botkube core sends the event to a given communication platform. - - The `Stream` method is called only once. Botkube attaches the list of associated configurations. You will learn more about that in the [**Passing configuration to your plugin**](#passing-configuration-to-your-plugin) section. - -7. Implement `HandleExternalRequest` method: - - Plugins can handle external requests from Botkube incoming webhook. Any external system can call the webhook and trigger a given source plugin. By default, the path of the incoming webhook is `http://botkube.botkube.svc.cluster.local:2115/sources/v1/{sourceName}` and it supports POST requests in JSON payload format. - - - If you don't want to handle external events from incoming webhook, simply nest the `source.HandleExternalRequestUnimplemented` under your struct: - - ```go - // Ticker implements the Botkube executor plugin interface. - type Ticker struct { - // specify that the source doesn't handle external requests - source.HandleExternalRequestUnimplemented - } - ``` - - - To handle such requests, you need to implement the `HandleExternalRequest` method. In this case, the `message` property from payload is outputted to the bound communication platforms: - - ```go - // HandleExternalRequest handles incoming payload and returns an event based on it. - func (Forwarder) HandleExternalRequest(_ context.Context, in source.ExternalRequestInput) (source.ExternalRequestOutput, error) { - var p payload - err := json.Unmarshal(in.Payload, &p) - if err != nil { - return source.ExternalRequestOutput{}, fmt.Errorf("while unmarshaling payload: %w", err) - } - - if p.Message == "" { - return source.ExternalRequestOutput{}, fmt.Errorf("message cannot be empty") - } - - msg := fmt.Sprintf("*Incoming webhook event:* %s", p.Message) - return source.ExternalRequestOutput{ - Event: source.Event{ - Message: api.NewPlaintextMessage(msg, true), - }, - }, nil - } - ``` - -## Build plugin binaries - -Now it's time to build your plugin. For that purpose we will use GoReleaser. It simplifies building Go binaries for different architectures. - -:::note -Instead of GoReleaser, you can use another tool of your choice. The important thing is to produce the binaries for the architecture of the host platform where Botkube is running. -::: - -1. Create the GoReleaser configuration file: - - ```yaml - cat << EOF > .goreleaser.yaml - project_name: botkube-plugins - before: - hooks: - - go mod download - - builds: - - id: ticker - binary: source_ticker_{{ .Os }}_{{ .Arch }} - - no_unique_dist_dir: true - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - goarch: - - amd64 - - arm64 - goarm: - - 7 - - snapshot: - name_template: 'v{{ .Version }}' - EOF - ``` - -2. Build the binaries: - - ```bash - goreleaser build --rm-dist --snapshot - ``` - -Congrats! You just created your first Botkube source plugin! :tada: - -Now it's time to [test it locally with Botkube](local-testing.md). Once you're done testing, see how to [distribute it](repository.md). - -## Passing configuration to your plugin - -Sometimes your source plugin requires a configuration specified by the end-user. Botkube supports such requirement and provides an option to specify plugin configuration under `config`. An example Botkube configuration looks like this: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - name: "all-teams" - bindings: - sources: - - ticker-team-a - - ticker-team-b - -sources: - "ticker-team-a": - botkube/ticker: - enabled: true - config: - interval: 1s - "ticker-team-b": - botkube/ticker: - enabled: true - config: - interval: 2m -``` - -This means that two different `botkube/ticker` plugin configurations were bound to the `all-teams` Slack channel. For each bound configuration [Botkube source dispatcher](../architecture/index.md#plugin-source-bridge) calls `Stream` method with the configuration specified under the `bindings.sources` property. diff --git a/versioned_docs/version-1.10/plugin/debug.md b/versioned_docs/version-1.10/plugin/debug.md deleted file mode 100644 index 7dba3a98..00000000 --- a/versioned_docs/version-1.10/plugin/debug.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: debugging -title: "Debugging" -sidebar_position: 10 ---- - -Embedded logging allows you to access more information about the runtime operations of Botkube plugins. - -By default: - -- the gRPC client log level is set to `info`, -- the standard error ([`stderr`]()) of a plugin binary is logged at `error` level, -- the standard output ([`stdout`]()) of a plugin binary is ignored. - -To change the default log level, export a dedicated environment variable following this pattern `LOG_LEVEL_{pluginType}_{pluginRepo}_{pluginName}`, e.g., `LOG_LEVEL_EXECUTOR_BOTKUBE_KUBECTL`. The possible log level values are: - -- `trace` -- `debug` -- `info` -- `warning` -- `error` -- `fatal` -- `panic` - -The plugin standard output is logged only if `debug` level is set. - -:::info -The plugin name is normalized and all characters different from letters, digits, and the underscore (`_`) are replaced with underscore (`_`). -::: - -To change the log level for a given plugin directly in the Botkube deployment, specify `extraEnv` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. For example: - -```yaml -extraEnv: - - name: LOG_LEVEL_EXECUTOR_BOTKUBE_KUBECTL - value: "debug" -``` diff --git a/versioned_docs/version-1.10/plugin/dependencies.md b/versioned_docs/version-1.10/plugin/dependencies.md deleted file mode 100644 index 01e55d02..00000000 --- a/versioned_docs/version-1.10/plugin/dependencies.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -id: dependencies -title: "Dependencies" -sidebar_position: 6 ---- - -Plugins can depend on other binaries, which are then downloaded by Botkube along with a given plugin. This is supported for both executor and source plugins. - -## Define dependencies for plugin index generation - -As a part of the `Metadata` method, define the `Dependencies` property. The key is the name of the dependency, and the value is a structure with links to binaries for each platform. - -:::info -For downloading plugins and theirs dependencies, Botkube uses `go-getter` library. It supports multiple URL formats (such as HTTP, Git repositories or S3), and is able to unpack archives and extract binaries from them. For more details, see the documentation on the [`go-getter`](https://github.com/hashicorp/go-getter) GitHub repository. -::: - -```go -const ( - kubectlVersion = "v1.28.1" -) - -// Metadata returns details about kubectl plugin. -func (e *Executor) Metadata(context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - // ... - Dependencies: map[string]api.Dependency{ - "kubectl": { - URLs: map[string]string{ - "windows/amd64": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/windows/amd64/kubectl.exe", kubectlVersion), - "darwin/amd64": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/darwin/amd64/kubectl", kubectlVersion), - "darwin/arm64": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/darwin/arm64/kubectl", kubectlVersion), - "linux/amd64": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/amd64/kubectl", kubectlVersion), - "linux/s390x": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/s390x/kubectl", kubectlVersion), - "linux/ppc64le": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/ppc64le/kubectl", kubectlVersion), - "linux/arm64": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/arm64/kubectl", kubectlVersion), - "linux/386": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/386/kubectl", kubectlVersion), - } - }, - }, - }, nil -} -``` - -Such a definition will result in the following `dependencies` section in the plugin index: - -```yaml -entries: - - name: kubectl - # ... - urls: - - url: "..." # URL for darwin/amd64 binary - # ... - platform: - os: darwin - architecture: amd64 - dependencies: - kubectl: - url: https://dl.k8s.io/release/v1.28.1/bin/darwin/amd64/kubectl - - url: "..." # URL for darwin/arm64 binary - # ... - dependencies: - kubectl: - url: https://dl.k8s.io/release/v1.28.1/bin/darwin/arm64/kubectl - - url: "..." # URL for linux/amd64 binary - # ... - platform: - os: linux - architecture: amd64 - dependencies: - kubectl: - url: https://dl.k8s.io/release/v1.28.1/bin/linux/amd64/kubectl - - url: "..." # URL for linux/arm64 binary - # ... - platform: - os: linux - architecture: arm64 - dependencies: - kubectl: - url: https://dl.k8s.io/release/v1.28.1/bin/linux/arm64/kubectl -``` - -Read how to use the plugin index in the [Repository](./repository.md) document. - -## Using dependencies - -During Botkube startup, Botkube plugin manager fetches the plugin binaries along with all dependencies. Each dependency binary is named exactly as specified in the [plugin index](#define-dependencies-for-plugin-index-generation). The dependency is fetched to a directory specified in the `PLUGIN_DEPENDENCY_DIR` environment variable passed to the plugin. - -To make it easier, there's a helper function `plugin.ExecuteCommand` in the `github.com/kubeshop/botkube/pkg/plugin` package, which does all of the above. For example, the kubectl plugin uses the following code: - -```go -// set additional env variables -envs := map[string]string{ - "KUBECONFIG": kubeConfigPath, -} - -// runCmd is e.g. "kubectl get pods --all-namespaces" -// plugin.ExecuteCommand will replace kubectl with full path to the kubectl binary dependency -out, err := plugin.ExecuteCommand(ctx, runCmd, plugin.ExecuteCommandEnvs(envs)) -``` - -## Example - -To get familiar with the full example, see the [kubectl plugin](https://github.com/kubeshop/botkube/tree/main/cmd/executor/kubectl) in the Botkube repository. The Kubectl plugin depends on the official [kubectl CLI](https://kubernetes.io/docs/tasks/tools/#kubectl) binary, which is defined as a part of the `Metadata` method. diff --git a/versioned_docs/version-1.10/plugin/index.md b/versioned_docs/version-1.10/plugin/index.md deleted file mode 100644 index 4cb341bd..00000000 --- a/versioned_docs/version-1.10/plugin/index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -id: plugin -title: "Plugin Development" -sidebar_position: 6 ---- - -The Botkube plugin system allows you to extend the Botkube core with custom logic. For example, call or receive events from third-party services. - -To learn more about the Botkube plugin system, follow the recommended steps: - -- Get familiar with the Botkube [architecture](../architecture). -- Enable and configure the [Helm](../configuration/executor/helm.md) executor. -- Use the [template repository](./quick-start.md). -- Learn how to develop a custom [executor](custom-executor.md) or [source](custom-source.md) plugin. -- [Distribute the plugins](repository.md) that you built. - -Share feedback with us via [Slack](https://join.botkube.io/) or [GitHub](https://github.com/kubeshop/botkube/issues)! diff --git a/versioned_docs/version-1.10/plugin/interactivity.md b/versioned_docs/version-1.10/plugin/interactivity.md deleted file mode 100644 index 318617ca..00000000 --- a/versioned_docs/version-1.10/plugin/interactivity.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -id: interactive-messages -title: "Interactive messages" -sidebar_position: 5 ---- - -Some of our communication platforms support interactive messages. If interactivity is supported the `IsInteractivitySupported` property under source or execution context is set to **true**. - -In this guide, we describe how interactivity applies to messages, and show you how to build ones. - -:::tip -For an example implementation, see the [`msg` executor source-code](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/msg/main.go). -::: - -![demo](./assets/demo-msg.gif) - -## Primitives - -You can construct and return interactive messages containing buttons, dropdowns, input text, and more complex formatting. For that reason, we introduced a generic `api.Messages` model. - -- [Buttons](#buttons) -- [Dropdowns](#dropdowns) -- [Input text](#input-text-fields) - -For all primitives you need to attach the proper command that will be executed by Botkube. The pattern is: - -```go -import "github.com/kubeshop/botkube/pkg/api" - -command := api.MessageBotNamePlaceholder + " " + " " -``` - -The `api.MessageBotNamePlaceholder` constant, is our cross-platform placeholder that is replaced by Botkube core with a proper bot name. It's mandatory, otherwise Botkube core will ignore a given command, e.g. a button click. - -The `` and `` should be replaced based on your needs. You replace `` with your own plugin name, or other plugin name, like `kubectl`. However, if you use other plugin name, a given command won't work if plugin is not enabled. - -### Buttons - -You can define a list of buttons under `Section` object. To construct a given button you can use our helper `api.NewMessageButtonBuilder` builder. For example: - -```go -const pluginName = "msg" - -btnBuilder := api.NewMessageButtonBuilder() - -msg := api.Message{ - Sections: []api.Section{ - { - Buttons: []api.Button{ - btnBuilder.ForCommandWithDescCmd("Run act1", fmt.Sprintf("%s buttons act1", pluginName)), - btnBuilder.ForCommandWithDescCmd("Run act2", fmt.Sprintf("%s buttons act2", pluginName), api.ButtonStylePrimary), - btnBuilder.ForCommandWithDescCmd("Run act3", fmt.Sprintf("%s buttons act3", pluginName), api.ButtonStyleDanger), - }, - }, - }, -} -``` - -When a button is clicked, Botkube runs an associated command. For **Run act1** it's `msg buttons act1`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -If you use only `ForCommandWithoutDesc`, all buttons are render in the same line. -![btns-desc](./assets/btns-desc.png) - -Otherwise, each button is rendered in new line with the description on the left side and button on the right side. -![btns-inline](./assets/btns-inline.png) - -### Dropdowns - -You can define dropdowns under `Section` object. You can split options into groups. Optionally, you can define the initial option. It must be included also under `OptionsGroups`. - -```go -cmdPrefix := func(cmd string) string { - return fmt.Sprintf("%s %s %s", api.MessageBotNamePlaceholder, pluginName, cmd) -} - -msg := api.Message{ - Sections: []api.Section{ - { - Selects: api.Selects{ - ID: "select-id", - Items: []api.Select{ - { - Name: "two-groups", - Command: cmdPrefix("selects two-groups"), - OptionGroups: []api.OptionGroup{ - { - Name: cmdPrefix("selects two-groups/1"), - Options: []api.OptionItem{ - {Name: "BAR", Value: "BAR"}, - {Name: "BAZ", Value: "BAZ"}, - {Name: "XYZ", Value: "XYZ"}, - }, - }, - { - Name: cmdPrefix("selects two-groups/2"), - Options: []api.OptionItem{ - {Name: "123", Value: "123"}, - {Name: "456", Value: "456"}, - {Name: "789", Value: "789"}, - }, - }, - }, - // MUST be defined also under OptionGroups.Options slice. - InitialOption: &api.OptionItem{ - Name: "789", Value: "789", - }, - }, - }, - }, - }, - }, -} -``` - -When user select a given option, Botkube runs an associated command and appends selected option at the end. For **BAR** it's `msg selects two-gropus BAR`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -### Input text fields - -```go -msg := api.Message{ - PlaintextInputs: []api.LabelInput{ - { - Command: fmt.Sprintf("%s %s input-text", api.MessageBotNamePlaceholder, pluginName), - DispatchedAction: api.DispatchInputActionOnEnter, - Placeholder: "String pattern to filter by", - Text: "Filter output", - }, - }, -} -``` - -When user types an input string and clicks enter, Botkube runs an associated command and appends input text in quotes. For example, for input **"text"** it's `msg input-text "test"`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -## Message visibility - -If the interactivity is enabled, you can change the default message visibility options: - -- The `OnlyVisibleForYou` property allows you to display the message only to the user who clicked a given button or dropdown. It's taken into account only if respond to the interactive message. It cannot be used initial messages that are automatically sent to a given channel. -- The `ReplaceOriginalMessage` property allows you to replace the message which triggered interactive command. You cannot change `OnlyVisibleForYou` as the message retains its initial visibility. diff --git a/versioned_docs/version-1.10/plugin/local-testing.md b/versioned_docs/version-1.10/plugin/local-testing.md deleted file mode 100644 index 0d21a40a..00000000 --- a/versioned_docs/version-1.10/plugin/local-testing.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -id: local-testing -title: "Local testing" -sidebar_position: 7 ---- - -This document describes steps for running Botkube core locally together with a local file server for serving your plugins during development phase. - -**Prerequisite** - -- [Node.js](https://nodejs.org/en/download/), to use `npx` - -**Steps** - -1. Follow steps from [`CONTRIBUTING.md`](https://github.com/kubeshop/botkube/blob/main/CONTRIBUTING.md#build-and-run-locally) about running Botkube locally. - -2. Create a file with your plugins' repository, plugin configuration and bindings for enabled communication platform: - - ```yaml - plugins: - repositories: - local-repo: - url: http://localhost:8080/plugins-index.yaml - - executors: - "plugins": - local-repo/executor-name: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. - sources: - "plugins": - local-repo/source-name: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. - - communications: - # Enable a given communication platform and define bindings to a given executor and source plugins. - ``` - - For example, for Slack and example `echo` and `ticker` plugins, provide `appToken` and `botToken` and run the script: - -
- Create /tmp/config-values.yaml - - ```yaml - cat << EOF > /tmp/config-values.yaml - plugins: - repositories: - local-repo: - url: http://localhost:8080/plugins-index.yaml - - executors: - "plugins": - local-repo/echo: - enabled: true - config: - transformResponseToUpperCase: true - sources: - "plugins": - local-repo/ticker: - enabled: true - config: - interval: 5s - communications: - default-group: - socketSlack: - enabled: true - channels: - default: - name: random - bindings: - executors: - - 'plugins' - sources: - - 'plugins' - appToken: "" # provide your token starting with xapp-1- - botToken: "" # provide your token starting with xoxb- - settings: - clusterName: local-dev - EOF - ``` - -
- -3. In your plugin project directory, start a static plugin server: - - ```bash - # Use https://github.com/vercel/serve - npx serve --listen 8080 - ``` - - :::note - If Botkube runs on external Kubernetes cluster, you can use the tunneling software, for example [`ngrok`](https://ngrok.com/). It creates an externally addressable URL for a port you open locally on your machine. - ::: - -4. In your plugin project directory open a new terminal window. -5. Export Botkube plugins cache directory: - - ```bash - export BOTKUBE_PLUGINS_CACHE__DIR="/tmp/plugins" - ``` - -6. Export Botkube repository path cloned in the first step: - - ```bash - export BOTKUBE_REPO_PATH={botkube_repo_path} - ``` - -7. Export configuration files: - - ```bash - export BOTKUBE_CONFIG_PATHS="${BOTKUBE_REPO_PATH}/helm/botkube/values.yaml,/tmp/config-values.yaml" - ``` - -8. Build plugins and start Botkube: - - :::note - Each time you change a plugin source code, re-run the above command. - ::: - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -
- - - -1. Download index builder: - -```bash -go get github.com/kubeshop/botkube/hack -``` - -2. Build plugins and run Botkube: - -```bash -# rebuild plugins only for current GOOS and GOARCH -goreleaser build --rm-dist --snapshot --single-target && -# regenerate index -go run github.com/kubeshop/botkube/hack -binaries-path "./dist" -url-base-path "http://localhost:8080/dist" -use-archive=false && -# remove cached plugins -rm -rf $BOTKUBE_PLUGINS_CACHE__DIR && -# start Botkube -${BOTKUBE_REPO_PATH}/botkube -``` - - - - -```bash -# rebuild plugins only for current GOOS and GOARCH -make build-plugins-single && -# regenerate index -env PLUGIN_DOWNLOAD_URL_BASE_PATH="http://localhost:8080/dist" make gen-plugin-index && -# remove cached plugins -rm -rf $BOTKUBE_PLUGINS_CACHE__DIR && -# start Botkube -${BOTKUBE_REPO_PATH}/botkube -``` - - - -
diff --git a/versioned_docs/version-1.10/plugin/quick-start.md b/versioned_docs/version-1.10/plugin/quick-start.md deleted file mode 100644 index e4abb5f5..00000000 --- a/versioned_docs/version-1.10/plugin/quick-start.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: quick-start -title: "Quick start" -sidebar_position: 1 ---- - -Botkube provides a quick start repository to start developing Botkube [source](../architecture/index.md#source) and [executor](../architecture/index.md#executor) plugins in Go. It has all batteries included; example plugins: - -- The [`echo`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/echo/main.go) executor that sends back the command that was specified, -- The [`ticker`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/ticker/main.go) source that emits an event each time the configured time duration elapses, -- The [`forwarder`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/forwarder/main.go) source that echos the message sent as an incoming webhook request. - -and two example release jobs: - -- [GitHub releases](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/release.yml) -- [GitHub Pages](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/pages-release.yml) - -## Use template - -1. Navigate to [`botkube-plugins-template`](https://github.com/kubeshop/botkube-plugins-template). - -2. Click **"Use this template"**, next **"Create a new repository"** - - ![Create Repo](./assets/use-tpl.png) - - This creates your own plugin repository with a single commit. - -3. After a few seconds, the `.github/workflows/setup.yml` job will create a new commit. This job removes Kubeshop related files, such as: - - - `CONTRIBUTING.md` - - `CODE_OF_CONDUCT.md` - - `LICENSE` - - `SECURITY.md` - - `.github/CODEOWNERS` - - Additionally, it updates links in README.md to point to your own repository instead of Kubeshop's one. In case of job failure, you need to make and commit those changes manually. - - This job runs only once, later you can remove it or disable it. - -4. Decide which release job you prefer, the GitHub releases, or GitHub pages. Once decided, remove one the above workflow in your new repository: - - - GitHub releases, defined at `.github/workflows/release.yml` in your GitHub repository. - - GitHub Pages, defined at `.github/workflows/pages-release.yml` in your GitHub repository. - - If you pick the GitHub Pages, a further configuration is needed: - - 1. In project settings, enable [publishing GitHub Pages via GitHub Action](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow). - 2. Adjust the `github-pages` deployment environment. You can either: - - remove the deployment environment if you don't need any protection rules - - add an environment protection rule so that you can deploy pages on each new tag. If you use tagging like `vX.Y.Z`, you can add the `v*` rule. As an alternative, can select **All branches** from the dropdown. - -5. Add LICENSE file and update the README.md file to describe the plugins that you created. diff --git a/versioned_docs/version-1.10/plugin/repository.md b/versioned_docs/version-1.10/plugin/repository.md deleted file mode 100644 index 52635cc2..00000000 --- a/versioned_docs/version-1.10/plugin/repository.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -id: repo -title: "Repository" -sidebar_position: 8 ---- - -A plugin repository is a place where you store your plugin binaries. This repository must be publicly available and supports downloading assets via HTTP(s). This document explains how to create Botkube plugin repositories by providing examples based on GitHub functionality. However, any static file server can be used, for instance: `s3`, `gcs`, etc. - -This document describes how to set up such repository. If you use or plan to use GitHub you can adapt the [template repository](quick-start.md) that has batteries included to start developing and hosting Botkube plugins right away. - -## Index file - -Your plugin repository must contain at least one index file and one plugin binary. Depending on your needs and preferences, you can create one or more index files to categorize your plugins. You can host both the executor and source plugins in a single repository. You can also include them in the same index file. - -In the index file, provide an entry for every plugin from your plugin repository. The index file must have the following syntax: - -```yaml -entries: - - name: { plugin_name } - type: { plugin_type } # executor or source - description: { plugin_description } - version: { plugin_version } - urls: - - url: { url_to_plugin_binary } - platform: - os: { plugin_operating_system } # darwin or linux - architecture: { plugin_architecture } # amd64 or arm64 - dependencies: # optional dependencies - { dependency_name }: - url: { url_to_dependency_binary } -``` - -It is not required to host a plugin or dependency binary on the same server as the index file. - -### Generate index file - -You can create the index file by yourself our use our tool to generate it automatically based on the directory with plugins binaries. The binaries must be named according to the following pattern: - -- For executors, `executor_{plugin_name}_{os}_{arch}`; for example, `executor_kubectl_darwin_amd64`. -- For sources, `source_{plugin_name}_{os}_{arch}`; for example, `source_kubernetes_darwin_amd64`. - -**Steps** - -1. In your plugin repository, add `tools.go`: - - ```go - cat << EOF > tools.go - //go:build tools - - package tools - - import ( - _ "github.com/kubeshop/botkube/hack" - ) - EOF - ``` - - :::note - We use the `tools.go` file, which is the [recommended way of tracking tool dependencies](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module). - ::: - -2. Refresh dependencies: - - ```bash - go mod tidy - ``` - -3. Build all your plugins. See [**Build plugin binaries**](custom-executor.md). - -4. Generate an index file: - - ```bash - go run github.com/kubeshop/botkube/hack -binaries-path "./dist" -url-base-path "https://example.com" - ``` - - :::info - Replace the `-url-base-path` flag with the base path of your HTTP server. See [Hosting plugins](#host-plugins) for some examples. - ::: - -## Host plugins - -This section describes example ways for serving Botkube plugins. - -### GitHub releases - -A GitHub release allows you to upload additional assets that are later accessible with a predictable URL. When you generate the index file, specify the `-url-base-path` flag as `https://github.com/{owner}/{repo}/releases/download/{release_tag}`, for example, `https://github.com/kubeshop/botkube/releases/download/v1.0.0`. - -Once the plugin binaries are built and the index file is generated, you can create a GitHub release using [GitHub CLI](https://cli.github.com/). For example: - -```bash -gh release create v1.0.0 \ - ./dist/source_* \ - ./dist/executor_* \ - ./plugins-index.yaml -``` - -#### Automation - -You can use [GitHub Actions](https://docs.github.com/en/actions) to publish Botkube plugins automatically each time a new tag is pushed. See the [`release` workflow](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/release.yml) on the `botkube-plugins-template` repository for the out-of-the-box solution, which you can use and modify if needed. - -### GitHub pages - -GitHub allows you to serve static pages via GitHub Pages. When you generate the index file, specify the `-url-base-path` flag as `https://{user}.github.io/{repository}`, for example, `https://kubeshop.github.io/botkube-plugins`. - -**Initial setup** - -1. Navigate to the Git repository with your plugins. - -2. Create the `gh-pages` branch: - - ```bash - git switch --orphan gh-pages - git commit --allow-empty -m "Initialization commit" - git push -u origin gh-pages - ``` - -3. Follow [this](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch) guide to make sure your `gh-pages` branch is set as the source for GitHub Pages. - -**Publishing steps** - -1. Clone `gh-pages` into `/tmp/botkube-plugins`: - - ```bash - git clone -b gh-pages "https://github.com/{owner}/{repo}.git" /tmp/botkube-plugins - ``` - -2. Move built binaries and generated index file: - - ```bash - mv dist/executor_* /tmp/botkube-plugins/ - mv dist/source_* /tmp/botkube-plugins/ - mv plugins-index.yaml /tmp/botkube-plugins - ``` - -3. Commit and push copied files: - - ```bash - cd /tmp/botkube-plugins - git add -A - git commit -m "Release Botkube plugins" - git push - ``` - -4. Remove cloned `gh-pages`: - - ```bash - cd - - rm -rf /tmp/botkube-charts - ``` - -In such setup, you can use your default branch to store your plugins code, and the `gh-pages` branch as a plugin repository. - -#### Automation - -You can use [GitHub Actions](https://docs.github.com/en/actions) to publish Botkube plugins automatically each time a new tag is pushed. See the [`pages-release` workflow](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/pages-release.yml) on the `botkube-plugins-template` repository for the out-of-the-box solution, which you can use and modify if needed. - -### Use hosted plugins - -To use the plugins that you published, add your repository under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file for a given Botkube deployment. For example: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Once the plugin repository is added, you can refer to it in the `executor` or `sources` section. - -```yaml -executors: - "plugins": - repo-name/executor-name@v1.0.0: # Plugin name syntax: {repo}/{plugin}[@{version}]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. -sources: - "plugins": - repo-name/source-name@v1.0.0: # Plugin name syntax: {repo}/{plugin}[@{version}]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. -``` diff --git a/versioned_docs/version-1.10/plugin/troubleshooting.md b/versioned_docs/version-1.10/plugin/troubleshooting.md deleted file mode 100644 index 5cfa36ef..00000000 --- a/versioned_docs/version-1.10/plugin/troubleshooting.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -id: troubleshooting.md -title: "Troubleshooting" -sidebar_position: 9 ---- - -This document describes how to identify and resolve issues that might occur. - -### Missing source events - -**Symptoms** - -You don't get event message on a given communication platform even though the event occurred in your 3rd party service. - -**Debugging steps** - -- [Enable debugging mode for a given plugin](debug.md). - Once enabled, check the Botkube logs. You can filter them by your plugin name. You should see information about downloading and starting your source. For example: - - ```bash - INFO[2023-01-09T21:21:24+01:00] Starting Plugin Manager for all enabled plugins component="Plugin Manager" enabledSources=botkube/cm-watcher - INFO[2023-01-09T21:21:24+01:00] Downloading plugin. binPath=/tmp/plugins/botkube/source_v0.13.0_cm-watcher component="Plugin Manager" url="http://host.k3d.internal:3000/static/source_cm-watcher_darwin_amd64" - INFO[2023-01-09T21:21:24+01:00] source plugin registered successfully. binPath=/tmp/plugins/botkube/source_v0.13.0_cm-watcher component="Plugin Manager" plugin=botkube/cm-watcher version=v0.13.0 - INFO[2023-01-09T21:21:25+01:00] Start source streaming... pluginName=botkube/cm-watcher sources="[plugin-based]" - ``` - - If you don't see any of the above log messages: - - - Make sure that `source.{group_name}.{plugin_name}.enabled` property is set to `true` - - Make sure that a given source configuration (`sources.{group_name}`) is bind to a given communication platform (`bindings.sources: [{group_name}]`) - - If the source is not bound to any communication platform Botkube will not download and start such plugin. Even if it's enabled. - -- [Make sure that your plugin didn't crash](#plugin-process-exited). - -### Missing executor response - -**Symptoms** - -You run a given executor command in a chat window, but you don't get any response. - -**Debugging steps** - -- [Enable debugging mode for a given plugin](debug.md). - Once enabled, run a given executor command once again, and check the Botkube logs. You can filter them by your plugin name. You should see information about downloading and registering your executor. For example: - - ```bash - INFO[2023-01-09T21:21:24+01:00] Starting Plugin Manager for all enabled plugins component="Plugin Manager" enabledExecutors=botkube/echo - INFO[2023-01-09T21:21:24+01:00] Downloading plugin. binPath=/tmp/plugins/botkube/executor_v0.13.0_echo component="Plugin Manager" url="http://host.k3d.internal:3000/static/executor_echo_darwin_amd64" - INFO[2023-01-09T21:21:24+01:00] executor plugin registered successfully. binPath=/tmp/plugins/botkube/executor_v0.13.0_echo component="Plugin Manager" plugin=botkube/echo version=v0.13.0 - ``` - - If you don't see any of the above log messages: - - - Make sure that `executors.{group_name}.{plugin_name}.enabled` property is set to `true` - - Make sure that a given executor configuration (`executors.{group_name}`) is bind to a given communication platform (`bindings.executors: [{group_name}]`) - - If the executor is not bound to any communication platform Botkube will not download and start such plugin. Even if it's enabled. - -- [Make sure that your plugin didn't crash](#plugin-process-exited). - -### Plugin process exited - -**Symptoms** - -In Botkube logs, you see an error similar to: - -```bash -ERRO[2023-01-09T21:21:25+01:00] plugin process exited error="exit status 1" path=/tmp/plugins/botkube/executor_v0.13.0_echo pid=71127 plugin=botkube/echo -``` - -**Solution** - -It means that your plugin exited once it was started by Botkube [plugin manager](../architecture/index.md#plugin-manager). To start your plugin again, you need to restart the Botkube core process, as crashed plugins aren't restarted automatically. This issue is tracked in [botkube#878](https://github.com/kubeshop/botkube/issues/878). You need to make sure that our plugin doesn't exit once it's started. You should return each error on Botkube plugin interface, instead of crashing your application. To see your plugin standard output [set the `debug` for a given plugin](debug.md). - -### Plugin not found error - -**Symptoms** - -In Botkube logs, you see an error similar to: - -```bash -2023/01/09 21:37:04 while starting plugins manager: not found source plugin called "cm-test" in "botkube" repository -``` - -**Debugging steps** - -- Make sure that a given repository is defined under `plugins.repository`. -- Check that a given entry is defined in a given repository index file. You should find under `entries` a plugin with a given name, version and type (source or executor). - -### Botkube is killed by readiness probe while downloading plugins - -**Symptoms** - -In environments with low internet bandwidth Botkube might get killed by the readiness probe before it finishes downloading all plugins. -The solution to this problem is to increase the wait time of the readiness probe. - -**Solution** - -To increase the wait time of the readiness probe, you need to set the `initialDelaySeconds` property in -[values.yaml](https://github.com/kubeshop/botkube/blob/9e450fb63666b03118ee51fcf9b7eb6c3b74cbcf/helm/botkube/values.yaml#L794-L821) -to a higher value. For example: - -``` ---set deployment.readinessProbe.initialDelaySeconds=180 -``` diff --git a/versioned_docs/version-1.10/plugin/using-kubeconfig.md b/versioned_docs/version-1.10/plugin/using-kubeconfig.md deleted file mode 100644 index e958119b..00000000 --- a/versioned_docs/version-1.10/plugin/using-kubeconfig.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -id: using-kubeconfig -title: Using kubeconfig -sidebar_position: 4 ---- - -You can request Botkube to generate and pass kubeconfig file to your plugin by adding RBAC section -to your plugin configuration. The following example requests a kubeconfig that impersonates -user **User.rbac.authorization.k8s.io** `read-only-user`. For more information refer to the -[RBAC section](../configuration/rbac.md). The example is for executor plugins, source plugins -can access kubeconfig in their `Stream()` function in `source.StreamInput`. - -RBAC config for an example plugin: - -```yaml -executors: - "reader-team-a": - kube-reader: - enabled: true - context: - user: - type: Static - static: - value: read-only-user -``` - -The kubeconfig is available in `executor.ExecuteInput` as a slice of bytes. -There are two options to instantiate a Kubernetes Go client with this config. - -1. From bytes - -```go -import ( - "context" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/kubernetes" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -func (ReaderExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - config, err := clientcmd.RESTConfigFromKubeConfig(in.Context.KubeConfig) - if err != nil { - return executor.ExecuteOutput{}, err - } - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return executor.ExecuteOutput{}, err - } - ... -} -``` - -2. From file - -```go -import ( - "context" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/kubernetes" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -func (ReaderExecutor) Execute(ctx context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - kubeConfigPath, deleteFn, err := pluginx.PersistKubeConfig(ctx, in.Context.KubeConfig) - if err != nil { - return executor.ExecuteOutput{}, fmt.Errorf("while writing kubeconfig file: %w", err) - } - defer func() { - if deleteErr := deleteFn(ctx); deleteErr != nil { - fmt.Fprintf(os.Stderr, "failed to delete kubeconfig file %s: %v", kubeConfigPath, deleteErr) - } - }() - config, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath) - if err != nil { - return executor.ExecuteOutput{}, err - } - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return executor.ExecuteOutput{}, err - } - ... -} -``` diff --git a/versioned_docs/version-1.10/usage/assets/actionable-notifications.png b/versioned_docs/version-1.10/usage/assets/actionable-notifications.png deleted file mode 100644 index dd7f7656..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/actionable-notifications.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/disable-action.png b/versioned_docs/version-1.10/usage/assets/disable-action.png deleted file mode 100644 index ffb1c33d..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/disable-action.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/enable-action.png b/versioned_docs/version-1.10/usage/assets/enable-action.png deleted file mode 100644 index 6fcc249a..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/enable-action.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/flag_filter_kubectl_get_nodes.png b/versioned_docs/version-1.10/usage/assets/flag_filter_kubectl_get_nodes.png deleted file mode 100644 index 96deecce..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/flag_filter_kubectl_get_nodes.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/flag_filter_kubectl_logs.png b/versioned_docs/version-1.10/usage/assets/flag_filter_kubectl_logs.png deleted file mode 100644 index b2a8106e..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/flag_filter_kubectl_logs.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/list-actions.png b/versioned_docs/version-1.10/usage/assets/list-actions.png deleted file mode 100644 index 5bb5238f..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/list-actions.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/long-notification.png b/versioned_docs/version-1.10/usage/assets/long-notification.png deleted file mode 100644 index 68569f3e..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/long-notification.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/mm_notifier_start.png b/versioned_docs/version-1.10/usage/assets/mm_notifier_start.png deleted file mode 100644 index 63e8837d..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/mm_notifier_start.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/output-filtering-filter-response.png b/versioned_docs/version-1.10/usage/assets/output-filtering-filter-response.png deleted file mode 100644 index e34474b6..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/output-filtering-filter-response.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/output-filtering-get-pods-metrics.png b/versioned_docs/version-1.10/usage/assets/output-filtering-get-pods-metrics.png deleted file mode 100644 index 48a30c39..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/output-filtering-get-pods-metrics.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/output-filtering-get-pods.png b/versioned_docs/version-1.10/usage/assets/output-filtering-get-pods.png deleted file mode 100644 index 08793408..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/output-filtering-get-pods.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/output-filtering-logs-response.png b/versioned_docs/version-1.10/usage/assets/output-filtering-logs-response.png deleted file mode 100644 index 576dabf5..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/output-filtering-logs-response.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/output-filtering-metrics-logs-filter.png b/versioned_docs/version-1.10/usage/assets/output-filtering-metrics-logs-filter.png deleted file mode 100644 index d1fd07d3..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/output-filtering-metrics-logs-filter.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/output-filtering-metrics-logs.png b/versioned_docs/version-1.10/usage/assets/output-filtering-metrics-logs.png deleted file mode 100644 index 643d0334..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/output-filtering-metrics-logs.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/assets/short-notification.png b/versioned_docs/version-1.10/usage/assets/short-notification.png deleted file mode 100644 index 3234ac3e..00000000 Binary files a/versioned_docs/version-1.10/usage/assets/short-notification.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/automated-actions.md b/versioned_docs/version-1.10/usage/automated-actions.md deleted file mode 100644 index d6f1a7fa..00000000 --- a/versioned_docs/version-1.10/usage/automated-actions.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -id: automated-actions -title: "Automated actions" -sidebar_position: 3 ---- - -# Automated actions - -Actions allow you to automate your workflows by executing custom commands based on specific events. To read how to configure actions, see the [Action](../configuration/action.md) configuration document. - -## Manage actions - -Botkube allows you to manage actions using `@Botkube` commands. - -### List available actions - -Run `@Botkube list actions` to get list of configured actions and their running status: - -![List available actions](./assets/list-actions.png) - -### Disable action - -Run `@Botkube disable action {action-name}` to disable an action named `{action-name}`. The action settings are persisted across Botkube app restarts. - -![Disable action](./assets/disable-action.png) - -When you disable an action, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. - -### Enable action - -Run `@Botkube enable action {action-name}` to enable an action named `{action-name}`. The action settings are persisted across Botkube app restarts. - -![Enable action](./assets/enable-action.png) - -When you enable an action, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. diff --git a/versioned_docs/version-1.10/usage/event-notifications.md b/versioned_docs/version-1.10/usage/event-notifications.md deleted file mode 100644 index a59b60fe..00000000 --- a/versioned_docs/version-1.10/usage/event-notifications.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -id: event-notifications -title: "Event notifications" -sidebar_position: 1 ---- - -# Event notifications - -Botkube sends notifications according to the [sources](../configuration/source/index.md) configuration. - -## Actionable notifications - -If you have [`kubectl` executor enabled](../configuration/executor/kubectl.md) for a given channel, you can run commands related to a resource from the notification itself. Use the dropdown on the left to select and run a given command: - -![Actionable notifications](./assets/actionable-notifications.png) - -The command dropdown is disabled for resource deletion events. It uses executor bindings to determine which commands are available for a given resource. - -:::info -Actionable notifications are only available for the [Slack](../installation/slack/index.md) and [Microsoft Teams](../installation/teams/index.md) platforms that supports interactive messages. Currently, only a selected list of commands are supported, such as `describe`, `get`, or `logs`. -::: - -## Managing notifications - -Depending upon your configuration, you will receive notifications about Kubernetes resources lifecycle events and their health. -Botkube bot allows you to enable/disable notifications on each configured channel separately. Run `@Botkube help`, the bot will reply with the help message about the supported message formats. - -### View Botkube configuration - -Run `@Botkube show config` message from the configured channel where Botkube is added. The bot will reply to you with the configuration with which the controller is running. - -To see how to update the configuration, see the [Updating the configuration](../configuration/index.mdx#updating-the-configuration) section in the Configuration document. - -### Change notification sources - -To change the notification sources, you can: - -- run `@Botkube edit SourceBindings` command from the configured channel where Botkube is added. - - When you save the new notification sources, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. - -- For Botkube Cloud: edit Botkube Instance configuration in the Botkube Cloud dashboard. -- For self-hosted installations: run `helm upgrade` with updated installation command. - -### Disable notifications - -If you want to stop receiving notifications from Botkube, run `@Botkube disable notifications` from the configured channel where Botkube is added. You will no longer receive notifications from the Botkube in a given communication platform. - -The notification settings are persisted across Botkube app restarts. - -### Enable notifications - -If you want to receive Botkube notifications again, run `@Botkube enable notifications` from the configured channel where Botkube is added. - -The notification settings are persisted across Botkube app restarts. - -### Check notifications status - -Run `@Botkube status notifications` to check if notifications are enabled for a given communication platform. diff --git a/versioned_docs/version-1.10/usage/executor/assets/demo-x.gif b/versioned_docs/version-1.10/usage/executor/assets/demo-x.gif deleted file mode 100644 index 572a0fd7..00000000 Binary files a/versioned_docs/version-1.10/usage/executor/assets/demo-x.gif and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/executor/assets/flux-diff.gif b/versioned_docs/version-1.10/usage/executor/assets/flux-diff.gif deleted file mode 100644 index 6ffc20bd..00000000 Binary files a/versioned_docs/version-1.10/usage/executor/assets/flux-diff.gif and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/executor/assets/flux-interactivity.gif b/versioned_docs/version-1.10/usage/executor/assets/flux-interactivity.gif deleted file mode 100644 index 083a6bff..00000000 Binary files a/versioned_docs/version-1.10/usage/executor/assets/flux-interactivity.gif and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/executor/assets/helm-install-filter.png b/versioned_docs/version-1.10/usage/executor/assets/helm-install-filter.png deleted file mode 100644 index 9502e61e..00000000 Binary files a/versioned_docs/version-1.10/usage/executor/assets/helm-install-filter.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/executor/assets/kc-cmd-builder.gif b/versioned_docs/version-1.10/usage/executor/assets/kc-cmd-builder.gif deleted file mode 100644 index 63f672b5..00000000 Binary files a/versioned_docs/version-1.10/usage/executor/assets/kc-cmd-builder.gif and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/executor/assets/parsed-space-table.png b/versioned_docs/version-1.10/usage/executor/assets/parsed-space-table.png deleted file mode 100644 index 9d523779..00000000 Binary files a/versioned_docs/version-1.10/usage/executor/assets/parsed-space-table.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/executor/assets/x-quickstart.png b/versioned_docs/version-1.10/usage/executor/assets/x-quickstart.png deleted file mode 100644 index a5b7d60a..00000000 Binary files a/versioned_docs/version-1.10/usage/executor/assets/x-quickstart.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/executor/doctor.md b/versioned_docs/version-1.10/usage/executor/doctor.md deleted file mode 100644 index 8d45227f..00000000 --- a/versioned_docs/version-1.10/usage/executor/doctor.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: doctor -title: "Doctor" -sidebar_position: 4 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube allows you to execute `doctor` commands on your Kubernetes cluster. By default, `doctor` command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/doctor.md#enabling-plugin) section from the `doctor` configuration documentation. - -To execute the `doctor` commands, send message in following formats in the channel where Botkube is already added: - -- Kubernetes native prompt: - ``` - @Botkube doctor --namespace=[namespace] --resource=[resource] --error=[error] - ``` -- Free-form question: - ``` - @Botkube doctor "[free-form question]" - ``` - -By default, `chatgpt` is configured as alias for the `doctor` command. You can use them on par with the `doctor` command. To read more about aliases configuration, see the [Alias](../../configuration/alias.md) section. - -This command needs to be executed from configured channel. diff --git a/versioned_docs/version-1.10/usage/executor/exec.mdx b/versioned_docs/version-1.10/usage/executor/exec.mdx deleted file mode 100644 index 16d6db43..00000000 --- a/versioned_docs/version-1.10/usage/executor/exec.mdx +++ /dev/null @@ -1,204 +0,0 @@ ---- -id: exec -title: "Exec" -sidebar_position: 3 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The `exec` executor plugin allows you to install and run CLI applications directly from chat (e.g., Slack, Microsoft Teams, Discord, or Mattermost) without any hassle. - -It supports interactivity in the form of buttons and dropdowns. You can easily use all your favorite tools without typing, even from your mobile phone! - -![x-demo](./assets/demo-x.gif) - -:::note -To shorten the command, the `x` alias is used in all examples. Make sure you have it configured for your Botkube installation according to [Alias configuration](../../configuration/alias) document. - -In this context, the `x` stands for `extension` or `execution`. -::: - -# Usage - -## Install CLI - -To install a given CLI binary directly from a chat window, run: - -``` -@Botkube x install {source} -``` - -For downloading binaries, the `eget` library is used. It supports multiple URL formats and is able to unpack archives and extract binaries from them. For more details, see the documentation on the [`eget`](https://github.com/zyedidia/eget) GitHub repository. - -### Examples - -- `@Botkube x install https://get.helm.sh/helm-v3.10.3-linux-amd64.tar.gz --file helm` -- `@Botkube x install github.com/fluxcd/flux2` -- `@Botkube x install https://github.com/rikatz/kubepug --asset kubepug_darwin_amd64.tar.gz` - -## Execute CLI - -To execute a CLI command, run: - -``` -@Botkube x run {command} -``` - -### Examples - -- `@Botkube x run helm list -A` -- `@Botkube x run flux get sources git` - -:::tip -For convenience, you can configure a Botkube alias to simplify running `flux` commands, according to the [Alias configuration](../../configuration/alias) document. Later, you can simply type `@Botkube flux get sources git`. -::: - -# Templates - -The `exec` plugin supports defining templates for executed commands. As a result, you can specify how to process the CLI output or define your own message response. - -```yaml -# An array of templates that define how to convert the command output into an interactive message. -templates: - - trigger: - command: - # Specifies the prefix of the command that triggers the template and the parser used to parse the output. - # If specified, it has higher priority than the regex field. - prefix: "helm list" - # Specifies the regex that should match a given command - # If specified, it has lower priority than the prefix field. - regex: "regex: '^helm list(?:\s+(-A|-a))*\s?$'" - # Specifies the message template type. - type: "" - # Message template depending on the selected type. - message: { } -``` - -Supported template types: - -- [`parser:table:space`](#table-parser) -- [`wrapper`](#wrapper) -- [`tutorial`](#tutorial) - -Navigate to the [`exec`](https://github.com/kubeshop/botkube/tree/main/cmd/executor/x/templates) plugin directory to see official examples. - -## Table parser - -The `parser:table:space` template knows how to convert space-separated tables into an interactive message. This allows you to select a single item from a dropdown and perform additional actions in the context of the selected item without typing anything. - -For example, such a table: - -```shell -NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION -psql default 1 2023-04-27 19:30:48.042056 +0200 CEST deployed postgresql-12.2.7 15.2.0 -traefik kube-system 1 2023-04-19 20:58:57.709052559 +0000 UTC deployed traefik-10.19.300 2.6.2 -traefik-crd kube-system 1 2023-04-19 20:58:56.564578223 +0000 UTC deployed traefik-crd-10.19.300 -``` - -is displayed as: - -![](./assets/parsed-space-table.png) - -The table output is parsed with the following rules: - -- All headers are normalized using the [`Title`](https://pkg.go.dev/golang.org/x/text/cases#Title) function. For example: - - - `APP VERSION` is `AppVersion` - - `NAME` is `Name` - - `namespace` is `Namespace` - -- Empty cells are allowed, and they are printed as an empty string. - -By default, the first row is selected and displayed in the message. The `actions` and `preview` properties are rendered in the context of the selected row. - -### Syntax - -Here is an example syntax that converts the `helm list -A` command into an interactive message: - -```yaml -type: "parser:table:space" -message: - # Creates a dropdown menu with a given name, where the items are generated using the `keyTpl` parameter. - selects: - - name: "Release" - keyTpl: "{{ .Namespace }}/{{ .Name }}" - - # Defines additional actions that can be performed in the context of the selected item. In this example, the user can view notes, values, or delete the selected release. - # optional - actions: - notes: "helm get notes {{ .Name }} -n {{ .Namespace }}" - values: "helm get values {{ .Name }} -n {{ .Namespace }}" - delete: "helm delete {{ .Name }} -n {{ .Namespace }}" - - # Displays a preview of the selected item. Fields `Name`, `Namespace`, `Status`, and `Chart` are generated using the output of the command. It's useful to display only important context. - # optional - preview: | - Name: {{ .Name }} - Namespace: {{ .Namespace }} - Status: {{ .Status }} - Chart: {{ .Chart }} -``` - -## Wrapper - -The wrapper template allows adding extra buttons to the CLI output without modifying the output itself. It's useful to attach some pre-defined commands. - -### Syntax - -Here is an example syntax to add two predefined buttons to a given output message: - -```yaml -type: "wrapper" -message: - buttons: - - # Button name - name: "Get Help" - # URL to open on click. - url: "https://example.com/help" - - # Button name - name: "Initialize" - # Button command to run. Use `{{BotName}}` placeholder for commands that should be executed by Botkube - command: "{{BotName}} x run flux install" - # Button style, supported values: primary, danger - style: "primary" -``` - -## Tutorial - -The tutorial template allows you to define a custom response for a given command. For example, when the trigger command is set to `trigger.comand.prefix: "quickstart helm"` and a user types `@Botkube x run quickstart helm`, the command itself is not executed. Instead, a defined tutorial message is returned. - -![quickstart](./assets/x-quickstart.png) - -### Syntax - -Here is an example syntax to return tutorial with two predefined buttons: - -```yaml -type: "tutorial" -message: - # Pagination rules - paginate: - # Maximum number of rendered buttons per page - page: 5 - # Message header - header: "Helm Quick Start tutorial" - # Tutorial steps that are rendered in a given order. - buttons: - - # Button name - name: "Global Help" - # Button description to display on the left side of the button. - description: "{{BotName}} helm help" - # Button command to run. Use `{{BotName}}` placeholder for commands that should be executed by Botkube - command: "{{BotName}} x run helm help" - - name: "Version" - description: "{{BotName}} helm version" - command: "{{BotName}} x run helm version" -``` diff --git a/versioned_docs/version-1.10/usage/executor/flux.md b/versioned_docs/version-1.10/usage/executor/flux.md deleted file mode 100644 index 8582319f..00000000 --- a/versioned_docs/version-1.10/usage/executor/flux.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -id: flux -title: "Flux" -sidebar_position: 5 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube offers seamless execution of Flux CLI commands within your Kubernetes cluster. By default, Flux command execution is disabled. To enable it, refer to the [Enabling plugin](../../configuration/executor/flux.md#enabling-plugin) section. - -To execute the `flux` CLI commands, send a message in the channel where Botkube is present. For example: - -``` -@Botkube flux tutorial -``` - -## Interactive Usage - -We have also incorporated interactivity (tables, etc.) to simplify running Flux CLI commands e.g. from mobile devices. - -![flux-interactivity](./assets/flux-interactivity.gif) - -## Simplified Kustomization Diffing Flow - -With the Botkube Flux executor, you can execute a single command to perform a diff between a specific pull request and the cluster state. For instance: - -``` -@Botkube flux diff kustomization podinfo --path ./kustomize --github-ref [PR Number| URL | Branch] -``` - -![flux-diff](./assets/flux-diff.gif) - -This command automates several tasks: - -- Automatically discovering the associated GitHub repository for the given kustomization. -- Cloning the repository. -- Checking out a given pull request. -- Comparing pull request changes with the current cluster state. -- Sharing the diff report. - -The diff results are posted on the Slack channel, making it easy for team members to review and discuss the changes. Additionally, the returned message provides additional contextual actions: - -- Posting the diff report as a GitHub comment on the corresponding pull request. -- Approving the pull request. -- Viewing the pull request. - -### GitHub automation - -To enhance your workflow's efficiency, you can use the [GitHub Events](../../configuration/source/github-events.md) source for automatic notification of pull request events, complete with an integrated `flux diff` button. - -```yaml -github: - auth: - accessToken: "ghp_" # GitHub PAT - -repositories: - - name: { owner }/{name} - on: - pullRequests: - - types: [ "open" ] - paths: - # Patterns for included file changes in pull requests. - include: [ 'kustomize/.*' ] - notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " -``` - -Don't forget to bind the plugin to one of the channels. diff --git a/versioned_docs/version-1.10/usage/executor/helm.md b/versioned_docs/version-1.10/usage/executor/helm.md deleted file mode 100644 index f86d3db9..00000000 --- a/versioned_docs/version-1.10/usage/executor/helm.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -id: helm -title: "Helm" -sidebar_position: 3 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube allows you to execute `helm` commands on your Kubernetes cluster. By default, `helm` command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/helm.md#enabling-plugin) section from the `helm` configuration documentation. - -To execute `helm` commands, send message in the following format in the channel where Botkube is already added: - -``` -@Botkube helm [command] [flags] -``` - -At least one `helm` executor needs to be enabled and bound to a given channel. - -:::caution -Using the interactive filter input field causes the Helm command to be re-executed. Be careful when using it for read-write commands. - -![Interactive Helm install filtering](./assets/helm-install-filter.png) - -This issue is tracked in [botkube#907](https://github.com/kubeshop/botkube/issues/907). -::: - -## Supported commands - -The Helm executor plugin has the exact same syntax as the Helm CLI. However, not all commands and flags are supported. If an unsupported flag is specified, you will get a dedicated error, e.g: - -``` -The "--wait" flag is not supported by the Botkube Helm plugin. Please remove it. -``` - -Additionally, the following flag syntax is not supported: - -- No whitespace between short flag name and its value. Instead of `-oyaml`, use `-o yaml`. -- Merging multiple short flags together. Instead of `-Aa`, use `-A -a`. - -### Read-only commands - -List of the read-only commands: - -- `@Botkube helm help` - shows the general Helm plugin help message. -- `@Botkube helm list` - lists all releases on cluster where Botkube is installed. - - The `--filter` flag is reserved by Botkube. As a result, to use the Helm filter functionality use `-f` instead, e.g. `helm list -f 'ara[a-z]+'`. -- `@Botkube helm status` - displays the status of the named release. -- `@Botkube helm version` - shows the version of the Helm CLI used by this Botkube plugin. - -### Read-write commands - -For the read-write commands the Botkube RBAC needs to be adjusted. For more information, see the [**Enabling plugin**](../../configuration/executor/helm.md#enabling-plugin) section. - -List of the read-write commands: - -- `@Botkube helm rollback` - rolls back a given release to a previous revision. -- `@Botkube helm test` - runs tests for a given release. -- `@Botkube helm uninstall` - uninstalls a given release. -- `@Botkube helm upgrade` - upgrades a given release. -- `@Botkube helm install` - installs a given chart to cluster where Botkube is installed. There are two different ways you to install a Helm chart: - - By absolute URL: `helm install mynginx https://example.com/charts/nginx-1.2.3.tgz` - - By chart reference and repository URL: `helm install --repo https://example.com/charts/ mynginx nginx` diff --git a/versioned_docs/version-1.10/usage/executor/index.md b/versioned_docs/version-1.10/usage/executor/index.md deleted file mode 100644 index b4f7614c..00000000 --- a/versioned_docs/version-1.10/usage/executor/index.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: executor -title: "Executor" -sidebar_position: 1 ---- - -While deploying Botkube, you can specify which [executors](../../configuration/executor) you want to enable. - -To check which executors are enabled, and get the aliases configured for them, run `@Botkube list executors`. - -## Aliases - -Alias is a shortcut for a longer command or just a part of it. It can be defined for all commands, including executor plugins and built-in Botkube commands. When you use an alias, the command is replaced with the underlying command before executing it. For example, `@Botkube k get pods` is replaced with `@Botkube kubectl get pods` before executing it. - -Once you configured aliases, you can use them interchangeably with a full command. For example: - -- `k` as `kubectl`, -- `kgp` as `kubectl get pods`, -- `kgpa` as `kubectl get pods -A`, -- `hh` as `helm history`, -- `a` as `list actions`, the built-in Botkube command, - -and so on. Your imagination is the limit! - -Aliases are defined globally for the whole Botkube installation. To see which aliases are available for current conversation, run `@Botkube list aliases`. - -To learn how to configure aliases and see the default configuration, see the [Alias](../../configuration/alias.md) section. - -## Specify cluster name - -:::warning -Multi-cluster approach is supported only for the Mattermost and Discord integrations. Slack and Microsoft Teams integrations require separate Slack or Microsoft Teams apps for each Botkube installation. -::: - -If you have installed Botkube backend on multiple clusters, you can pass `--cluster-name` flag to execute kubectl command on specific cluster. - -To get the list of all clusters configured in botkube, you can use the ping command. - -For cluster-specific response, use `--cluster-name` flag to specify the cluster's name on which command needs to be executed. -Use of this flag allows you to get response from any channel or group where Botkube is added. -The flag is ignored in notifier commands as they can be executed from the configured channel only. - -## Filtering text output - -Use the `--filter` flag to filter the output of Botkube executor commands. This returns any lines matching the flag's provided value. - -The `--filter` flag uses simple string matching. And, only works for Botkube executor commands that return text output, e.g. `kubectl` or `list executors` commands. - -### Filtering `kubectl` output - -![flag_filter_kubectl_get_nodes](../assets/flag_filter_kubectl_get_nodes.png) -![flag_filter_kubectl_logs](../assets/flag_filter_kubectl_logs.png) diff --git a/versioned_docs/version-1.10/usage/executor/kubectl.md b/versioned_docs/version-1.10/usage/executor/kubectl.md deleted file mode 100644 index 265f643c..00000000 --- a/versioned_docs/version-1.10/usage/executor/kubectl.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: kubectl -title: "Kubectl" -sidebar_position: 2 ---- - -Botkube allows you to execute `kubectl` commands on your Kubernetes cluster. By default, kubectl command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/kubectl.md#enabling-plugin) section from the `kubectl` configuration documentation. - -To execute the `kubectl` commands, send message in following format in the channel where Botkube is already added: - -``` -@Botkube kubectl [verb] [resource] [flags] -``` - -By default, `k` and `kc` are configured as aliases for the `kubectl` command. You can use them on par with the `kubectl` command. To read more about aliases configuration, see the [Alias](../../configuration/alias.md) section. - -This command needs to be executed from configured channel. - -## Interactive kubectl commands builder - -Use the interactive `kubectl` command builder to construct a `kubectl` command just by selecting items from dropdowns. This is especially useful on mobile when typing the command is harder. - -The builder includes a resource name dropdown list. This is pre-populated with all the relevant resource names. It's great for discovering resources with the option to select them. E.g. Just grab a Pod name without needing to type or copy-and-paste. - -To start the interactive `kubectl` command builder, run `@Botkube kubectl` from the configured channel where Botkube is added. -You can also use any of the [configured aliases](../../configuration/alias.md) - for example, the default `k` one, as illustrated below: - -![kubectl command builder](./assets/kc-cmd-builder.gif) - -### Limitations - -Keep in mind that the interactive command builder may not support all the commands that you can run just by typing them directly in a chat window. The following policies are applied: - -- Under verbs' dropdown, we display verbs that are defined under the `interactiveBuilder.allowed.verbs` configuration. - :::tip - The default verbs for the `kubectl` plugin found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - If you ServiceAccount allow running other actions such as `delete`, you can add them directly under [`interactiveBuilder.allowed.verbs`](../../configuration/executor/kubectl.md#configuration-syntax). - ::: - -- Under resources' dropdown, we display resources that are defined under the `interactiveBuilder.allowed.resources` configuration and are allowed for already selected verb. For example, for the `logs` verb we display only `pods`, `statefulsets`, `deployments`, and `daemonsets`. - :::tip - The default resources for the `kubectl` plugin found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - - If you ServiceAccount allow access to more resources, you can add them directly under [`interactiveBuilder.allowed.resources`](../../configuration/executor/kubectl.md#configuration-syntax). - ::: - -- For resources that are namespace-scoped, under namespaces' dropdown, we display `interactiveBuilder.allowed.namespaces` if defined. If static namespaces are not specified, plugin needs to have access to fetch all Namespaces, otherwise Namespace dropdown won't be visible at all. - -- The `kubectl` command preview is displayed only if the command that you built is valid, and you have permission to run it. diff --git a/versioned_docs/version-1.10/usage/index.md b/versioned_docs/version-1.10/usage/index.md deleted file mode 100644 index d226cf77..00000000 --- a/versioned_docs/version-1.10/usage/index.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -id: usage -title: "Usage" -sidebar_position: 4 ---- - -# Usage - -Botkube allows you to monitor your Kubernetes cluster, as well as debug and troubleshoot your workloads. - -## See all available commands - -Run `@Botkube help` to find information about the supported commands. - -## Check Botkube status - -Run `@Botkube ping` to the channel where Botkube is added. The Botkube will respond you with the **pong** message from all the configured clusters. - -For [multi-cluster configuration](./executor/index.md#specify-cluster-name), use the `--cluster-name` flag to get response from the cluster mentioned in the flag. Else check the deployment in Kubernetes cluster in the **botkube** namespace. diff --git a/versioned_docs/version-1.10/usage/interactive-output-filtering.md b/versioned_docs/version-1.10/usage/interactive-output-filtering.md deleted file mode 100644 index ba96ae2f..00000000 --- a/versioned_docs/version-1.10/usage/interactive-output-filtering.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -id: interactive-output-filtering -title: "Interactive output filtering" -sidebar_position: 4 ---- - -:::info -Interactive output filtering is only available for the [Slack integration](../installation/slack/index.md) that supports interactive messages. -::: - -:::caution -Using the interactive filter input field causes the command to be re-executed. Be careful when using it for read-write commands. -This issue is tracked in [botkube#907](https://github.com/kubeshop/botkube/issues/907). -::: - -Sometimes you can get long response from a certain command and you may want to filter that to see a subset of the actual result. -For each communication platform, you can use the `--filter` flag at the end of your command. To learn more, see the [Flags](executor/index.md#filtering-kubectl-output) section. - -If you use the [Slack integration](../installation/slack/index.md) that supports interactive messages, there is another option to handle that: interactive output filtering. -Interactivity is achieved via an input action text box where you can add your filter criteria as text and press the **Enter** button. - -### Long response filtering - -Output Filter input text box will be attached to your command response if response has more than 15 lines. Let's see an example for this situation. - -1. List pods with `@Botkube kubectl get pods -n kube-system` - ![metrics_pods](assets/output-filtering-get-pods-metrics.png) -2. Let's check the logs of `metrics-server` with `@Botkube kubectl logs -f metrics-server-7cd5fcb6b7-hzvq8 -n kube-system` - ![metrics_logs](assets/output-filtering-metrics-logs.png) -3. Notice that Filter Output is attached to response. Type `RequestHeaderAuthRequestController` to filter and press `Enter`. - ![metrics_filter_logs](assets/output-filtering-metrics-logs-filter.png) - -## Attachment response filtering - -Command response is uploaded as text file once the actual size of response message reaches the limit of messaging platform. Let's take a look how Filter Output behaves for this situation. - -1. List the pods with `@Botkube kubectlc get pods -n kube-system` - ![get_pods](assets/output-filtering-get-pods.png) -2. Let's check the logs of Traefik with command `@Botkube kubectl logs -f traefik-df4ff85d6-f2mkz -n kube-system`. Notice that, you might have different pod list, so please select a suitable one for your case. - ![pod_logs](assets/output-filtering-get-pods.png) -3. Since the response is big, it is uploaded as file and you can realize a reply thread. Please expand it to see filter output. -4. Assume we want to see log lines only containing `Configuration` word. Type `Configuration` in the Filter Output input box and click enter. You will see filtered result as a response. - ![filter_response](assets/output-filtering-filter-response.png) diff --git a/versioned_docs/version-1.10/usage/source/argocd.md b/versioned_docs/version-1.10/usage/source/argocd.md deleted file mode 100644 index 44254265..00000000 --- a/versioned_docs/version-1.10/usage/source/argocd.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -id: argocd -title: ArgoCD -sidebar_position: 5 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube allows you to consume ArgoCD events on your Kubernetes cluster. By default, `argocd` plugin is disabled. See the [**Enabling source**](../../configuration/source/argocd#enabling-plugin) section from the `argocd` configuration documentation. - -Once it is enabled, the ArgoCD plugin will configure ArgoCD notifications so that Botkube receives them on its incoming webhook. Then, Botkube will send them to configured platforms as shown below. - -![ArgoCD events](./assets/argocd-events.png) - -## Interactive events - -For platforms that support interactivity, such as Slack and Microsoft Teams, Botkube sends interactive messages for ArgoCD events, that allow you to perform actions on the event. By default, the following actions are supported: - -- Run commands on the Application: - - `get` - - `describe` -- View the Application in the ArgoCD UI -- Open the source repository in the browser - -Interactive buttons and commands can be configured. See the [Configuration](../../configuration/source/argocd.md) document for more details. diff --git a/versioned_docs/version-1.10/usage/source/assets/argocd-events.png b/versioned_docs/version-1.10/usage/source/assets/argocd-events.png deleted file mode 100644 index 11447ddb..00000000 Binary files a/versioned_docs/version-1.10/usage/source/assets/argocd-events.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/source/assets/keptn-events.png b/versioned_docs/version-1.10/usage/source/assets/keptn-events.png deleted file mode 100644 index 755dbf69..00000000 Binary files a/versioned_docs/version-1.10/usage/source/assets/keptn-events.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/source/assets/pod-created.png b/versioned_docs/version-1.10/usage/source/assets/pod-created.png deleted file mode 100644 index cd8acde7..00000000 Binary files a/versioned_docs/version-1.10/usage/source/assets/pod-created.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/source/assets/prometheus-alerts.png b/versioned_docs/version-1.10/usage/source/assets/prometheus-alerts.png deleted file mode 100644 index 0fa8fef5..00000000 Binary files a/versioned_docs/version-1.10/usage/source/assets/prometheus-alerts.png and /dev/null differ diff --git a/versioned_docs/version-1.10/usage/source/index.md b/versioned_docs/version-1.10/usage/source/index.md deleted file mode 100644 index 206b1667..00000000 --- a/versioned_docs/version-1.10/usage/source/index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -id: source -title: "Source" -sidebar_position: 1 ---- - -While deploying Botkube, you can specify which [sources](../../configuration/source) you want to enable. - -To check which sources are enabled, run `@Botkube list sources` diff --git a/versioned_docs/version-1.10/usage/source/keptn.md b/versioned_docs/version-1.10/usage/source/keptn.md deleted file mode 100644 index 65bb93ca..00000000 --- a/versioned_docs/version-1.10/usage/source/keptn.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -id: keptn -title: "Keptn" -sidebar_position: 4 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube allows you to consume `keptn` events on your Kubernetes cluster. By default, `keptn` plugin is disabled. See the [**Enabling plugin**](../../configuration/source/keptn#enabling-plugin) section from the `keptn` configuration documentation. - -Once it is enabled, Botkube Keptn plugin will consume Keptn events and send them to configured platforms as shown below. - -![Keptn Events](./assets/keptn-events.png) diff --git a/versioned_docs/version-1.10/usage/source/kubernetes.md b/versioned_docs/version-1.10/usage/source/kubernetes.md deleted file mode 100644 index 57feab7e..00000000 --- a/versioned_docs/version-1.10/usage/source/kubernetes.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -id: kubernetes -title: "Kubernetes" -sidebar_position: 2 ---- - -Botkube allows you to consume `kubernetes` events on your Kubernetes cluster. By default, `kubernetes` plugin is disabled. See the [**Enabling source**](../../configuration/source/kubernetes#enabling-plugin) section from the `kubernetes` configuration documentation. - -Once it is enabled, Botkube Kubernetes plugin will consume Kubernetes events and send them to configured platforms as shown below. - -![Pod Created](./assets/pod-created.png) diff --git a/versioned_docs/version-1.10/usage/source/prometheus.md b/versioned_docs/version-1.10/usage/source/prometheus.md deleted file mode 100644 index e8f61af7..00000000 --- a/versioned_docs/version-1.10/usage/source/prometheus.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -id: prometheus -title: "Prometheus" -sidebar_position: 3 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube allows you to consume `prometheus` alerts on your Kubernetes cluster. By default, `prometheus` plugin is disabled. See the [**Enabling plugin**](../../configuration/source/prometheus#enabling-plugin) section from the `prometheus` configuration documentation. - -Once it is enabled, Botkube Prometheus plugin will consume Prometheus alerts and send them to configured platforms as shown below. - -![Prometheus Alerts](./assets/prometheus-alerts.png) diff --git a/versioned_docs/version-1.7/architecture/assets/arch-dark.svg b/versioned_docs/version-1.7/architecture/assets/arch-dark.svg deleted file mode 100644 index e844b875..00000000 --- a/versioned_docs/version-1.7/architecture/assets/arch-dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
K8s events
K8s events
User
User
starts gRPC
streaming
starts gRPC...
Plugin Source
Bridge
Plugin Source...
Botkube core
Botkube core
interacts with
interacts with
kubectl
kubectl
helm
helm
Bot (bidirectional)
Bot (bidirectional)
Sink (unidirectional)
Sink (unidirectional)
Executors
Executors
executes gRPC
call
executes gRPC...
Plugin Executor
Bridge
Plugin Executor...
K8s events
K8s events
Prometheus
Prometheus
Sources
Sources
Communications
Communications
Downloaded plugins
Downloaded plugins
downloads and starts
plugin binaries
downloads and starts...
reads index file with 
available plugins
reads index file with...
Plugin
Manager
Plugin...
Filter Engine
Filter Engine
Plugin Index File
Plugin Index File
Plugin Index File
Plugin Index File
Plugins repository
Plugins repository
helm
helm
argo
argo
Prometheus
Prometheus
kubectl
kubectl
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.7/architecture/assets/arch-light.svg b/versioned_docs/version-1.7/architecture/assets/arch-light.svg deleted file mode 100644 index 098e469a..00000000 --- a/versioned_docs/version-1.7/architecture/assets/arch-light.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
K8s events
K8s events
User
User
starts gRPC
streaming
starts gRPC...
Plugin Source
Bridge
Plugin Source...
Botkube core
Botkube core
interacts with
interacts with
kubectl
kubectl
helm
helm
Bot (bidirectional)
Bot (bidirectional)
Sink (unidirectional)
Sink (unidirectional)
Executors
Executors
executes gRPC
call
executes gRPC...
Plugin Executor
Bridge
Plugin Executor...
K8s events
K8s events
Prometheus
Prometheus
Sources
Sources
Communications
Communications
Downloaded plugins
Downloaded plugins
downloads and starts
plugin binaries
downloads and starts...
reads index file with 
available plugins
reads index file with...
Plugin
Manager
Plugin...
Filter Engine
Filter Engine
Plugin Index File
Plugin Index File
Plugin Index File
Plugin Index File
Plugins repository
Plugins repository
helm
helm
argo
argo
Prometheus
Prometheus
kubectl
kubectl
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.7/architecture/index.md b/versioned_docs/version-1.7/architecture/index.md deleted file mode 100644 index 12a0d432..00000000 --- a/versioned_docs/version-1.7/architecture/index.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -id: architecture -title: "Architecture" -sidebar_position: 7 ---- - -This document describes high-level Botkube architecture, all components in the system and interactions between them. - -Botkube is split into two main parts: - -- Botkube agent: Botkube binary that serves as a bridge between communication platforms (e.g. Slack, Discord) and Botkube plugins (sources and executors). -- [Botkube plugins](../plugin/index.md): The executable binaries that communicate with Botkube agent over an RPC interface. Botkube supports two types of plugins, respectively called Source plugins and Executor plugins. - -## Components - -The following diagram visualizes all main components in the system. - -![Architecture](assets/arch-light.svg#gh-light-mode-only)![Architecture](assets/arch-dark.svg#gh-dark-mode-only) - -### Plugin repository - -A plugin repository is a place where plugin binaries and index file are stored. This repository must be publicly available and supports downloading assets via HTTP(s). Any static file server can be used, for instance: GitHub Pages, `s3`, `gcs`, etc. - -### Plugin manager - -Plugin manager takes care of downloading enabled and bound plugins, running a given plugin binary and maintaining the gRPC connection. Under the hood, the [`go-plugin`](https://github.com/hashicorp/go-plugin/) library is used. Plugin manager is responsible both for the executor and source plugins. - -### Plugin executor bridge - -Plugin executor bridge is resolving the received Botkube command, calling the respective plugin, and sending back the response to a given communication platform. - -### Executor - -Executor is a binary that implements the [executor](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) Protocol Buffers contract. Executor runs a given command and returns the response in a synchronous way. For example, running `kubectl` or `helm` commands. - -Streaming command response is not supported. As a result, commands like `helm install --wait` doesn't work well, as the response won't be sent until the command finishes. - -The `kubectl` is a built-in Botkube executor. It will be extracted in the future Botkube releases. - -### Plugin source bridge - -Plugin source bridge is dispatching received source events to all configured communication channels. - -### Source - -Source is a binary that implements the [source](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) Protocol Buffers contract. Source starts asynchronous streaming of domain-specific events. For example, streaming Kubernetes events. - -### Bot - -Bot represents a bidirectional communication platform. Each bot is responsible for authenticating, managing connections, and providing an interface for receiving and sending messages for a given platform like Slack, Discord, etc. Connection is mostly done via WebSocket. - -### Sink - -Sink represents a unidirectional communication platform. Each sink is responsible for authenticating, managing connections, and providing an interface for sending messages for a given platform like Elasticsearch, outgoing webhook, etc. diff --git a/versioned_docs/version-1.7/cli/_category_.json b/versioned_docs/version-1.7/cli/_category_.json deleted file mode 100644 index 3f09750c..00000000 --- a/versioned_docs/version-1.7/cli/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "CLI", - "position": 5 -} diff --git a/versioned_docs/version-1.7/cli/commands/_category_.json b/versioned_docs/version-1.7/cli/commands/_category_.json deleted file mode 100644 index 053c6e32..00000000 --- a/versioned_docs/version-1.7/cli/commands/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "Commands" -} diff --git a/versioned_docs/version-1.7/cli/commands/botkube.md b/versioned_docs/version-1.7/cli/commands/botkube.md deleted file mode 100644 index 2738598c..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: botkube ---- - -## botkube - -Botkube CLI - -### Synopsis - -botkube - Botkube CLI - -A utility that simplifies working with Botkube. - -Quick Start: - - $ botkube install # Install Botkube - $ botkube uninstall # Uninstall Botkube - -Botkube Cloud: - - $ botkube login # Login into Botkube Cloud - $ botkube migrate # Automatically migrates Open Source installation into Botkube Cloud - -``` -botkube [flags] -``` - -### Options - -``` - -h, --help help for botkube - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube config](botkube_config.md) - This command consists of multiple subcommands for working with Botkube configuration -- [botkube install](botkube_install.md) - install or upgrade Botkube in k8s cluster -- [botkube login](botkube_login.md) - Login to a Botkube Cloud -- [botkube migrate](botkube_migrate.md) - Automatically migrates Botkube installation into Botkube Cloud -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics -- [botkube uninstall](botkube_uninstall.md) - uninstall Botkube from cluster -- [botkube version](botkube_version.md) - Print the CLI version diff --git a/versioned_docs/version-1.7/cli/commands/botkube_config.md b/versioned_docs/version-1.7/cli/commands/botkube_config.md deleted file mode 100644 index 2d0e7e77..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube_config.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: botkube config ---- - -## botkube config - -This command consists of multiple subcommands for working with Botkube configuration - -### Options - -``` - -h, --help help for config -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI -- [botkube config get](botkube_config_get.md) - Displays Botkube configuration diff --git a/versioned_docs/version-1.7/cli/commands/botkube_config_get.md b/versioned_docs/version-1.7/cli/commands/botkube_config_get.md deleted file mode 100644 index 56660f62..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube_config_get.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: botkube config get ---- - -## botkube config get - -Displays Botkube configuration - -``` -botkube config get [flags] -``` - -### Examples - -``` -# Show configuration for currently installed Botkube -botkube config get - -# Show configuration in JSON format -botkube config get -ojson - -# Save configuration in file -botkube config get > config.yaml - -``` - -### Options - -``` - --cfg-exporter-image-registry string Registry for the Config Exporter job image (default "ghcr.io") - --cfg-exporter-image-repo string Repository for the Config Exporter job image (default "kubeshop/botkube-config-exporter") - --cfg-exporter-image-tag string Tag of the Config Exporter job image (default "v9.99.9-dev") - --cfg-exporter-poll-period duration Interval used to check if Config Exporter job was finished (default 1s) - --cfg-exporter-timeout duration Maximum execution time for the Config Exporter job (default 1m0s) - --cloud-env-api-key string API key environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_API_KEY") - --cloud-env-endpoint string Endpoint environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_ENDPOINT") - --cloud-env-id string Identifier environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_IDENTIFIER") - -h, --help help for get - -l, --label string Label used for identifying the Botkube pod (default "app=botkube") - -n, --namespace string Namespace of Botkube pod (default "botkube") - --omit-empty-values Omits empty keys from printed configuration (default true) - -o, --output string Output format. One of: json | yaml (default "yaml") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube config](botkube_config.md) - This command consists of multiple subcommands for working with Botkube configuration diff --git a/versioned_docs/version-1.7/cli/commands/botkube_install.md b/versioned_docs/version-1.7/cli/commands/botkube_install.md deleted file mode 100644 index 6301e659..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube_install.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: botkube install ---- - -## botkube install - -install or upgrade Botkube in k8s cluster - -### Synopsis - -Use this command to install or upgrade the Botkube agent. - -``` -botkube install [OPTIONS] [flags] -``` - -### Examples - -``` -# Install latest stable Botkube version -botkube install - -# Install Botkube 0.1.0 version -botkube install --version 0.1.0 - -# Install Botkube from local git repository. Needs to be run from the main directory. -botkube install --repo @local -``` - -### Options - -``` - --atomic If set, process rolls back changes made in case of failed install/upgrade. The --wait flag will be set automatically if --atomic is used - -y, --auto-approve Skips interactive approval when upgrade is required. - --chart-name string Botkube Helm chart name. (default "botkube") - --dependency-update Update dependencies if they are missing before installing the chart - --description string add a custom description - --disable-openapi-validation If set, it will not validate rendered templates against the Kubernetes OpenAPI Schema - --dry-run Simulate an installation - --force Force resource updates through a replacement strategy - -h, --help help for install - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - --namespace string Botkube installation namespace. (default "botkube") - --no-hooks Disable pre/post install/upgrade hooks - --release-name string Botkube Helm chart release name. (default "botkube") - --render-subchart-notes If set, render subchart notes along with the parent - --repo string Botkube Helm chart repository location. It can be relative path to current working directory or URL. Use @stable tag to select repository which holds the stable Helm chart versions. (default "https://charts.botkube.io/") - --reset-values When upgrading, reset the values to the ones built into the chart - --reuse-values When upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored - --set stringArray Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --set-file stringArray Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) - --set-json stringArray Set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2) - --set-literal stringArray Set a literal STRING value on the command line - --set-string stringArray Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --skip-crds If set, no CRDs will be installed. - --timeout duration Maximum time during which the Botkube installation is being watched, where "0" means "infinite". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default 10m0s) - -f, --values strings Specify values in a YAML file or a URL (can specify multiple) - --version string Botkube version. Possible values @latest, 1.2.0, ... (default "@latest") - -w, --watch --timeout Watches the status of the Botkube installation until it finish or the defined --timeout occurs. (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.7/cli/commands/botkube_login.md b/versioned_docs/version-1.7/cli/commands/botkube_login.md deleted file mode 100644 index 6dbc9943..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube_login.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: botkube login ---- - -## botkube login - -Login to a Botkube Cloud - -``` -botkube login [OPTIONS] [flags] -``` - -### Examples - -``` -# start interactive setup -botkube login - -``` - -### Options - -``` - --cloud-dashboard-url string Botkube Cloud URL (default "https://app.botkube.io") - -h, --help help for login - --local-server-addr string Address of a local server which is used for the login flow (default "localhost:8085") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.7/cli/commands/botkube_migrate.md b/versioned_docs/version-1.7/cli/commands/botkube_migrate.md deleted file mode 100644 index a100c4fc..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube_migrate.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: botkube migrate ---- - -## botkube migrate - -Automatically migrates Botkube installation into Botkube Cloud - -### Synopsis - -Automatically migrates Botkube installation to Botkube Cloud. -This command will create a new Botkube Cloud instance based on your existing Botkube configuration, and upgrade your Botkube installation to use the remote configuration. - -Supported Botkube bot platforms for migration: - -- Socket Slack -- Discord -- Mattermost - -Limitations: - -- Plugins are sourced from Botkube repository - -Use label selector to choose which Botkube pod you want to migrate. By default it's set to app=botkube. - -Examples: - - $ botkube migrate --label app=botkube --instance-name botkube-slack # Creates new Botkube Cloud instance with name botkube-slack and migrates pod with label app=botkube to it - -``` -botkube migrate [OPTIONS] [flags] -``` - -### Options - -``` - -y, --auto-approve Skips interactive approval for upgrading Botkube installation. - --cfg-exporter-image-registry string Registry for the Config Exporter job image (default "ghcr.io") - --cfg-exporter-image-repo string Repository for the Config Exporter job image (default "kubeshop/botkube-config-exporter") - --cfg-exporter-image-tag string Tag of the Config Exporter job image (default "v9.99.9-dev") - --cfg-exporter-poll-period duration Interval used to check if Config Exporter job was finished (default 1s) - --cfg-exporter-timeout duration Maximum execution time for the Config Exporter job (default 1m0s) - --cloud-api-url string Botkube Cloud API URL (default "https://api.botkube.io/graphql") - --cloud-dashboard-url string Botkube Cloud URL (default "https://app.botkube.io") - --cloud-env-api-key string API key environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_API_KEY") - --cloud-env-endpoint string Endpoint environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_ENDPOINT") - --cloud-env-id string Identifier environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_IDENTIFIER") - -h, --help help for migrate - --image-tag string Botkube image tag, possible values latest, v1.2.0, ... - --instance-name string Botkube Cloud Instance name that will be created - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - -l, --label string Label used for identifying the Botkube pod (default "app=botkube") - -n, --namespace string Namespace of Botkube pod (default "botkube") - -q, --skip-connect Skips connecting to Botkube Cloud after migration - --skip-open-browser Skips opening web browser after migration - --timeout duration Maximum time during which the Botkube installation is being watched, where "0" means "infinite". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default 10m0s) - --token string Botkube Cloud authentication token - -w, --watch --timeout Watches the status of the Botkube installation until it finish or the defined --timeout occurs. (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.7/cli/commands/botkube_telemetry.md b/versioned_docs/version-1.7/cli/commands/botkube_telemetry.md deleted file mode 100644 index 00e22bea..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube_telemetry.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: botkube telemetry ---- - -## botkube telemetry - -Configure collection of anonymous analytics - -### Options - -``` - -h, --help help for telemetry -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI -- [botkube telemetry disable](botkube_telemetry_disable.md) - Disable Botkube telemetry -- [botkube telemetry enable](botkube_telemetry_enable.md) - Enable Botkube telemetry diff --git a/versioned_docs/version-1.7/cli/commands/botkube_telemetry_disable.md b/versioned_docs/version-1.7/cli/commands/botkube_telemetry_disable.md deleted file mode 100644 index 65da8f3d..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube_telemetry_disable.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: botkube telemetry disable ---- - -## botkube telemetry disable - -Disable Botkube telemetry - -``` -botkube telemetry disable [flags] -``` - -### Examples - -``` -# To improve the user experience, Botkube collects anonymized data. -# It does not collect any identifying information, and all analytics -# are used only as aggregated collection of data to improve Botkube -# and adjust its roadmap. -# Read our privacy policy at https://docs.botkube.io/privacy - -# The Botkube CLI tool collects anonymous usage analytics. -# This data is only available to the Botkube authors and helps us improve the tool. - -# Disable Botkube telemetry -botkube telemetry disable - - - -``` - -### Options - -``` - -h, --help help for disable -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics diff --git a/versioned_docs/version-1.7/cli/commands/botkube_telemetry_enable.md b/versioned_docs/version-1.7/cli/commands/botkube_telemetry_enable.md deleted file mode 100644 index 0f2aa6db..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube_telemetry_enable.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: botkube telemetry enable ---- - -## botkube telemetry enable - -Enable Botkube telemetry - -``` -botkube telemetry enable [flags] -``` - -### Examples - -``` -# To improve the user experience, Botkube collects anonymized data. -# It does not collect any identifying information, and all analytics -# are used only as aggregated collection of data to improve Botkube -# and adjust its roadmap. -# Read our privacy policy at https://docs.botkube.io/privacy - -# Enable Botkube telemetry -botkube telemetry enable - - - -``` - -### Options - -``` - -h, --help help for enable -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics diff --git a/versioned_docs/version-1.7/cli/commands/botkube_uninstall.md b/versioned_docs/version-1.7/cli/commands/botkube_uninstall.md deleted file mode 100644 index cfcd752d..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube_uninstall.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: botkube uninstall ---- - -## botkube uninstall - -uninstall Botkube from cluster - -### Synopsis - -Use this command to uninstall the Botkube agent. - -``` -botkube uninstall [OPTIONS] [flags] -``` - -### Examples - -``` -# Uninstall default Botkube Helm release -botkube uninstall - -# Uninstall specific Botkube Helm release -botkube uninstall --release-name botkube-dev -``` - -### Options - -``` - -y, --auto-approve Skips interactive approval for deletion. - --cascade string Must be "background", "orphan", or "foreground". Selects the deletion cascading strategy for the dependents. Defaults to background. (default "background") - --description string add a custom description - --dry-run Simulate an uninstallation - -h, --help help for uninstall - --keep-history remove all associated resources and mark the release as deleted, but retain the release history - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - --namespace string Botkube namespace. (default "botkube") - --no-hooks prevent hooks from running during uninstallation - --release-name string Botkube Helm release name. (default "botkube") - --timeout duration time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s) - --wait if set, will wait until all the resources are deleted before returning. It will wait for as long as --timeout (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.7/cli/commands/botkube_version.md b/versioned_docs/version-1.7/cli/commands/botkube_version.md deleted file mode 100644 index 4603edb5..00000000 --- a/versioned_docs/version-1.7/cli/commands/botkube_version.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: botkube version ---- - -## botkube version - -Print the CLI version - -``` -botkube version [flags] -``` - -### Examples - -``` - -botkube version -botkube version -o=json -botkube version -o=yaml -botkube version -o=short - -``` - -### Options - -``` - -h, --help help for version - -o, --output string Output format. One of: json | pretty | short | yaml (default "pretty") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.7/cli/getting-started.mdx b/versioned_docs/version-1.7/cli/getting-started.mdx deleted file mode 100644 index 89ede9dc..00000000 --- a/versioned_docs/version-1.7/cli/getting-started.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -id: getting-started -title: "Getting Started" -sidebar_position: 1 ---- - -# Getting Started - -Botkube includes a command-line interface (CLI) that you can use to interact with Botkube and Botkube Cloud from your terminal, or from a script. - -## Installation - -Select tab depending on the system you use: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -Use Homebrew to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- -Alternatively, download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.7.0/botkube-darwin-arm64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -
- - - -Use Homebrew to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- -Alternatively, download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.7.0/botkube-darwin-amd64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -
- - - -Download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.7.0/botkube-linux-amd64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -:::note -You may need to use `sudo` to run the `mv` command as it moves the binary file to the `/usr/local/bin/` directory. -::: - -
- -Alternatively, if you use Homebrew, you can use it to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- - - -Use curl to download the Botkube CLI binary: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.7.0/botkube-windows-amd64.exe -``` - -Move the binary to a directory under your `%PATH%`. - - - - - -Use curl to download the Botkube CLI binary: - -```shell -export OS="" # allowed values: darwin, linux, windows -export ARCH="" # allowed values: amd64, arm64, armv7 -#export SUFFIX=".exe" # uncomment if OS is 'windows' -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.7.0/botkube-${OS}-${ARCH}${SUFFIX} -``` - -Move the binary to a directory under your `PATH`. - - - -
- -## First use - -For the commands that are nested under `cloud` command you first need to authenticate with Botkube cloud by running: - -```bash -botkube login -``` - -If credentials are valid, the output is: - -```shell -Login Succeeded -``` - -All available commands you can simply discover by running `botkube --help` or `botkube -h` to see the help output which corresponds to a given command. - -## Autocompletion - -To learn how to enable autocompletion for your shell, run: - -```bash -botkube completion --help -``` - -> **NOTE:** Be sure to **restart your shell** after installing autocompletion. - -When you start typing a `botkube` command, press the `` character to show a list of available completions. Type `-` to show available flag completions. diff --git a/versioned_docs/version-1.7/cli/migrate.md b/versioned_docs/version-1.7/cli/migrate.md deleted file mode 100644 index 6b434328..00000000 --- a/versioned_docs/version-1.7/cli/migrate.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: migrating-installation-to-botkube-cloud -title: "Migrating installation to Botkube Cloud" -sidebar_position: 2 ---- - -## Migrating installation to Botkube Cloud - -If you have started using Botkube with the Open Source installation, you have the option to migrate this instance to be managed using [Botkube Cloud](https://app.botkube.io/). - -To make the migration process easier, we provide a dedicated `botkube cloud migrate` command that seamlessly transfers your Botkube installation to Botkube Cloud. - -Supported Botkube platforms: - -- Socket Slack -- Discord -- Mattermost - -## Steps - -1. [Install Botkube CLI](./getting-started.mdx#installation) -2. [Login into Botkube Cloud](./getting-started.mdx#first-use) -3. Run Botkube migrate: - - ```bash - botkube cloud migrate - ``` - -## Limitations - -The following list contains current limitations that we will address in the near future: - -- `extraObjects` in Botkube [helm configurations](https://github.com/kubeshop/botkube/blob/593746a70d9eb23469c28e5c0274c9a40a7b651d/helm/botkube/values.yaml#L1040) are ignored. If you have any extra resources under `extraObjects` section, you need to migrate them on your own. -- Custom `rbac.groups` are ignored. -- All 3rd-party plugins are ignored. -- Minimal supported Botkube version is v1.0.0. - -## See more - -To learn more about `botkube cloud migrate` and all supported settings, visit the [Botkube migrate](./commands/botkube_migrate.md) document. diff --git a/versioned_docs/version-1.7/configuration/action.md b/versioned_docs/version-1.7/configuration/action.md deleted file mode 100644 index 147f96bf..00000000 --- a/versioned_docs/version-1.7/configuration/action.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -id: action -title: Action -sidebar_position: 5 ---- - -The action configuration allows you to automate your workflow by defining commands that are executed on an incoming event. Similar to communication platforms, actions use [source bindings](source/index.md) to define the event sources (command triggers) and [executor bindings](../configuration/executor) to run a given command. - -The actions can be disabled and enabled using dedicated commands. See the [Automated actions](../usage/automated-actions.md) usage document for more details. - -## Predefined actions - -There are two predefined actions available: - -- `describe-created-resource` - describes a newly created resource, -- `show-logs-on-error` - prints logs on Pod/StatefulSet/DaemonSet/Deployment error. - -Both of them are disabled by default. See details in the [Syntax](#syntax) section. - -## Action output - -The command output is sent to the communication platforms that define the same source bindings. If there is no communication platform defined with the same source bindings, the action is still executed, but the output is ignored. - -To learn more how to configure sources for communicators, read the [communication](./communication/index.md) documentation. - -## Command templates - -Each action defines the `command` property which defines a command to be executed. It supports [Go template](https://golang.org/pkg/text/template/) syntax. The command template is rendered before actual execution. - -The following variables are available: - -- `{{ .Event }}` - the event object that triggered the action. See all available event properties in the [`event.go`](https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go) file. - -There are multiple helper functions supported by the templating engine. To learn more, read the documentation on the [`slim-sprig`](https://go-task.github.io/slim-sprig/) library page. - -## Syntax - -```yaml -# Map of actions. Action contains configuration for automation based on observed events. -# The property name under `actions` object is an alias for a given configuration. You can define multiple actions configuration with different names. -# -# Format: actions.{alias} -actions: - "describe-created-resource": - # If true, enables the action. - enabled: false - # Action display name posted in the channels bound to the same source bindings. - displayName: "Describe created resource" - # Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). - # You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. - command: "kubectl describe {{ .Event.TypeMeta.Kind | lower }}{{ if .Event.Namespace }} -n {{ .Event.Namespace }}{{ end }} {{ .Event.Name }}" - - # Bindings for a given action. - bindings: - # Event sources that trigger a given action. - sources: - - k8s-create-events - # Executors configuration used to execute a configured command. - executors: - - k8s-default-tools - "show-logs-on-error": - # If true, enables the action. - enabled: false - - # Action display name posted in the channels bound to the same source bindings. - displayName: "Show logs on error" - # Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). - # You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available event properties on https://github.com/kubeshop/botkube/blob/main/pkg/event/event.go. - command: "kubectl logs {{ .Event.TypeMeta.Kind | lower }}/{{ .Event.Name }} -n {{ .Event.Namespace }}" - - # Bindings for a given action. - bindings: - # Event sources that trigger a given action. - sources: - - k8s-err-with-logs-events - # Executors configuration used to execute a configured command. - executors: - - k8s-default-tools -``` - -## RBAC - -The `ChannelName` RBAC policy is not supported for automated actions at this time. -Use the `Static` RBAC policy instead. For more information read the [RBAC](./rbac.md) documentation. diff --git a/versioned_docs/version-1.7/configuration/alias.md b/versioned_docs/version-1.7/configuration/alias.md deleted file mode 100644 index 33e8d116..00000000 --- a/versioned_docs/version-1.7/configuration/alias.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -id: alias -title: Alias -sidebar_position: 4 ---- - -Botkube can define multiple aliases for arbitrary commands. The aliases are replaced with the underlying command before executing it. Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. - -Aliases work for all commands, including executor plugins and Botkube built-in ones. To learn more about how to configure Executors, see the [Executor](./executor/index.md) section. - -Aliases are defined globally for the whole Botkube installation. Once they are configured, read the [Aliases](../usage/executor/index.md#aliases) section in Usage document. - -## Syntax - -```yaml -# Custom aliases for given commands. -# The aliases are replaced with the underlying command before executing it. -# Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. -# -## Format: aliases.{alias} -aliases: - kc: - command: kubectl - displayName: "Kubectl alias" - k: - command: kubectl - displayName: "Kubectl alias" -## Multi-word alias example: -# kgp: -# command: kubectl get pods -# displayName: "Get pods" -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.7/configuration/assets/botkube-read-only.svg b/versioned_docs/version-1.7/configuration/assets/botkube-read-only.svg deleted file mode 100644 index d396ca54..00000000 --- a/versioned_docs/version-1.7/configuration/assets/botkube-read-only.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
dispatch
command
dispatch...
runs kubectl 
command
runs kubectl...
Slack
Slack
#general
#general
Kubernetes
Kubernetes
API Server
API Server
runs plugin
with dedicate
kubeconfig 
runs plugin...
resolves mapping
and generates
kubeconfig
resolves mapping...
#kubeconfig
group: general
#kubeconfiggroup...
uses
attached kubeconfig
uses...
kubectl plugin
kubectl plugin
# RBAC config mapping
botkube/kubectl:

context:
rbac:
group:
type: ChannelName
# RBAC config mapping...
Botkube Core
Botkube Core
Channels:
Channels:
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.7/configuration/assets/cloud-rbac-default.png b/versioned_docs/version-1.7/configuration/assets/cloud-rbac-default.png deleted file mode 100644 index d8882292..00000000 Binary files a/versioned_docs/version-1.7/configuration/assets/cloud-rbac-default.png and /dev/null differ diff --git a/versioned_docs/version-1.7/configuration/communication/index.md b/versioned_docs/version-1.7/configuration/communication/index.md deleted file mode 100644 index 99a262fd..00000000 --- a/versioned_docs/version-1.7/configuration/communication/index.md +++ /dev/null @@ -1,254 +0,0 @@ ---- -id: communication -title: "Communication" -sidebar_position: 1 ---- - -The communication settings contain: - -- Configuration for communication platforms scoped in separate communication groups, -- Platform-specific options, such as multichannel configuration for platforms that support channels. - -## Communication groups - -Communication group is a way to aggregate separate configurations for a set of communication platforms. You can specify multiple communication groups, and, in a result, support multiple Slack or Mattermost workspaces, Discord servers, or Elasticsearch server instances. - -Also, most platforms also support another level of multiple configurations within a workspace. For example, Slack supports multichannel configuration. To learn more about platform-specific options, see the [Syntax](#syntax) section. - -:::note -The purpose of the communication group is to allow using multiple workspaces, e.g. for Slack or Mattermost. To use multiple channels inside the same workspace, don't define separate communication groups, but use `channels` property under a given communication platform instead. -::: - -### Example - -Consider the following configuration: - -```yaml -communications: - "first-group": # Your own alias of a given communication group - slack: - enabled: true - token: "{SLACK_TOKEN_1}" # Token for Botkube Slack app installed in Workspace 1 - channels: - "general": # Your own alias for the channel configuration - name: general - bindings: - executors: # Executors configuration for a given channel - - k8s-default-tools - sources: # Notification sources configuration for a given channel - - k8s-events - "random": # Your own alias for the channel configuration - name: random - bindings: - executors: [] # Executors configuration for a given channel - sources: # Notification sources configuration for a given channel - - k8s-events - "second-group": # Your own alias of a given communication group - slack: - enabled: true - token: "{SLACK_TOKEN_2}" # Token for Botkube Slack app installed in Workspace 2 - channels: - "primary-channel": # Your own alias for the channel configuration - name: general - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: true - bindings: - executors: # Executors configuration for a given channel - - k8s-default-tools - sources: # Notification sources configuration for a given channel - - k8s-events -``` - -The example YAML configuration definition results in the following configuration. - -For Slack **Workspace 1**, as defined by the first communication group (`first-group`): - -- Notifications from `k8s-events` source are sent to the `general` and `random` channels. -- Commands from the `k8s-default-tools` configuration can be executed in the `general` channel. On `random` channel executors are not configured. - -For Slack **Workspace 2**, as defined by the second communication group (`second-group`): - -- Notifications are configured to be sent from the `k8s-events` source to the `general` channel. They are disabled by default, and can be enabled with `@Botkube` command or during Botkube upgrade. -- Commands from the `k8s-default-tools` configuration can be executed in the `general` channel. - -## Source and Executor Bindings - -Most of the communication platforms support executor and source bindings, which allows fine-tuning the notifications and allowed Botkube commands inside a given channel. - -With executor bindings you can configure which executors are allowed in a given channel. To read more about executor configuration, see the [Executor](../executor) document. - -With source bindings, you can specify which events are sent to a given channel (or, in case of Elasticsearch, index). To read more about source configuration, see the [Source](../source) document. - -## Known limitations - -Currently, [Microsoft Teams](../../installation/teams/) integration works differently than other bot integrations, such as Slack or Discord. While Microsoft Teams support multiple channels for forwarding notifications, you need to turn them on with `@Botkube enable notifications` on each channel. Microsoft Teams uses source and executor bindings defined under `communications.teams.bindings` property for all channels in the following way: - -- Executor bindings apply to all MS Teams channels where Botkube has access to. -- Source bindings apply to all channels which have notification turned on with `@Botkube enable notifications` command. - -## Syntax - -Each communication platform has specific options, however they share a similar syntax for consistency. -For example, bot integrations such as Slack, Mattermost or Discord have multichannel support, that is you can configure multiple channels with separate bindings. Same with Elasticsearch - you can forward notifications to multiple Elasticsearch indices, according to the sources configuration. - -```yaml -# Map of communication groups. Communication group contains settings for multiple communication platforms. -# The property name under `communications` object is an alias for a given configuration group. You can define multiple communication groups with different names. -# -# Format: communications.{alias} -communications: - "default-group": - # Settings for Slack. - slack: - # If true, enables Slack bot. - enabled: false - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - # Format: channels.{alias} - channels: - "default": - # Slack channel name without '#' prefix where you have added Botkube and want to receive notifications in. - name: "SLACK_CHANNEL" - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: false - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-events - # Slack token. - token: "SLACK_API_TOKEN" - - # Settings for Mattermost. - mattermost: - # If true, enables Mattermost bot. - enabled: false - # User in Mattermost which belongs the specified Personal Access token. - botName: "Botkube" - # The URL (including http/https schema) where Mattermost is running. e.g. https://example.com:9243 - url: "MATTERMOST_SERVER_URL" - # Personal Access token generated by Botkube user. - token: "MATTERMOST_TOKEN" - # The Mattermost Team name where Botkube is added. - team: "MATTERMOST_TEAM" - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - # Format: channels.{alias} - channels: - "default": - # The Mattermost channel name for receiving Botkube alerts. - # The Botkube user needs to be added to it. - name: "MATTERMOST_CHANNEL" - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: false - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-events - - # Settings for MS Teams. - teams: - # If true, enables MS Teams bot. - enabled: false - # The Bot name set while registering Bot to MS Teams. - botName: "Botkube" - # The Botkube application ID generated while registering Bot to MS Teams. - appID: "APPLICATION_ID" - # The Botkube application password generated while registering Bot to MS Teams. - appPassword: "APPLICATION_PASSWORD" - bindings: - # Executor bindings apply to all MS Teams channels where Botkube has access to. - executors: - - k8s-default-tools - # Source bindings apply to all channels which have notification turned on with `@Botkube enable notifications` command. - sources: - - k8s-events - # The path in endpoint URL provided while registering Botkube to MS Teams. - messagePath: "/bots/teams" - # The Service port for bot endpoint on Botkube container. - port: 3978 - - # Settings for Discord. - discord: - # If true, enables Discord bot. - enabled: false - # Botkube Bot Token. - token: "DISCORD_TOKEN" - # Botkube Application Client ID. - botID: "DISCORD_BOT_ID" - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - # Format: channels.{alias} - channels: - "default": - # Discord channel ID for receiving Botkube alerts. - # The Botkube user needs to be added to it. - id: "DISCORD_CHANNEL_ID" - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: false - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-events - - # Settings for Elasticsearch. - elasticsearch: - # If true, enables Elasticsearch. - enabled: false - awsSigning: - # If true, enables awsSigning using IAM for Elasticsearch hosted on AWS. Make sure AWS environment variables are set. - # [Ref doc](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html). - enabled: false - # AWS region where Elasticsearch is deployed. - awsRegion: "us-east-1" - # AWS IAM Role arn to assume for credentials, use this only if you don't want to use the EC2 instance role or not running on AWS instance. - roleArn: "" - # The server URL, e.g. https://example.com:9243 - server: "ELASTICSEARCH_ADDRESS" - # Basic Auth username. - username: "ELASTICSEARCH_USERNAME" - # Basic Auth password. - password: "ELASTICSEARCH_PASSWORD" - # If true, skips the verification of TLS certificate of the Elastic nodes. - # It's useful for clusters with self-signed certificates. - skipTLSVerify: false - # Map of configured indices. The `indices` property name is an alias for a given configuration. - # - # Format: indices.{alias} - indices: - "default": - # Configures Elasticsearch index settings. - name: botkube - type: botkube-event - shards: 1 - replicas: 0 - bindings: - # Notification sources configuration for a given index. - sources: - - k8s-events - - # Settings for Webhook. - webhook: - # If true, enables Webhook. - enabled: false - # The Webhook URL, e.g.: https://example.com:80 - url: "WEBHOOK_URL" - bindings: - # -- Notification sources configuration for the webhook. - sources: - - k8s-events -``` - -The default configuration for Helm chart can be found in [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml). diff --git a/versioned_docs/version-1.7/configuration/communication/vault-csi.md b/versioned_docs/version-1.7/configuration/communication/vault-csi.md deleted file mode 100644 index e9279d57..00000000 --- a/versioned_docs/version-1.7/configuration/communication/vault-csi.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -id: vault-csi -title: "Tokens from Vault via CSI driver" -sidebar_position: 1 ---- - -This tutorial shows how to install Botkube which takes the configuration from Vault instance. - -## Prerequisites - -- Kubernetes Clusters that supports CSI. - - For example, to run [K3s](https://k3s.io/) using [Lima](https://github.com/lima-vm/lima), run: - - ```bash - limactl start template://k3s - ``` - -- [Socket Slack integration installed](../../installation/slack/socket-slack.md). -- [`helm`](https://helm.sh/docs/intro/install/) v3 installed. -- [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) installed. - -## Steps - -This instruction guides you through the installation of Botkube and Vault on a Kubernetes cluster and configuring them together. - -1. Install Vault with CSI enabled: - - ```bash - helm repo add hashicorp https://helm.releases.hashicorp.com - helm repo update - helm install vault hashicorp/vault --namespace default \ - --set "server.dev.enabled=true" \ - --set "injector.enabled=false" \ - --set "csi.enabled=true" - ``` - -2. Add Slack token in Vault: - - ```bash - # Exec to pod - kubectl exec -n default -it vault-0 -- /bin/sh - ``` - - ```bash - # Write the token to Vault - vault kv put -mount=secret slack-app-token token=xapp-... - vault kv put -mount=secret slack-bot-token token=xoxb-... - ``` - -3. Enable Vault's Kubernetes authentication: - - ```bash - vault auth enable kubernetes - vault write auth/kubernetes/config \ - kubernetes_host="https://$KUBERNETES_PORT_443_TCP_ADDR:443" - ``` - - ```bash - vault policy write internal-app - < /tmp/values.yaml << ENDOFFILE - extraObjects: - - apiVersion: secrets-store.csi.x-k8s.io/v1 - kind: SecretProviderClass - metadata: - name: vault-database - spec: - provider: vault - parameters: - roleName: "database" - vaultAddress: "http://vault.default:8200" - objects: | - - objectName: "slack-app-token" - secretPath: "secret/data/slack-app-token" - secretKey: "token" - - objectName: "slack-bot-token" - secretPath: "secret/data/slack-bot-token" - secretKey: "token" - secretObjects: - - secretName: communication-slack - type: Opaque - data: - - objectName: "slack-app-token" - key: "slack-app-token" - - objectName: "slack-bot-token" - key: "slack-bot-token" - - communications: - 'default-group': - # Settings for SocketSlack - socketSlack: - enabled: true - channels: {} # configure your channels - # botToken - specified via env variable - # appToken - specified via env variable - - extraEnv: - - name: BOTKUBE_COMMUNICATIONS_DEFAULT-GROUP_SOCKET__SLACK_APP__TOKEN - valueFrom: - secretKeyRef: - name: communication-slack - key: slack-app-token - - name: BOTKUBE_COMMUNICATIONS_DEFAULT-GROUP_SOCKET__SLACK_BOT__TOKEN - valueFrom: - secretKeyRef: - name: communication-slack - key: slack-bot-token - - extraVolumeMounts: - - name: secrets-store-inline - mountPath: "/mnt/secrets-store" - readOnly: true - - extraVolumes: - - name: secrets-store-inline - csi: - driver: secrets-store.csi.k8s.io - readOnly: true - volumeAttributes: - secretProviderClass: "vault-database" - ENDOFFILE - ``` - -6. Install Botkube: - - :::note - You need to clone the https://github.com/kubeshop/botkube first. - ::: - - ```bash - helm install botkube --namespace default \ - -f /tmp/values.yaml \ - ./helm/botkube - ``` diff --git a/versioned_docs/version-1.7/configuration/executor/doctor.md b/versioned_docs/version-1.7/configuration/executor/doctor.md deleted file mode 100644 index 44e33e0a..00000000 --- a/versioned_docs/version-1.7/configuration/executor/doctor.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: doctor -title: Doctor -sidebar_position: 5 ---- - -The Botkube Doctor executor plugin allows you to run the `doctor` command directly in the chat window of each communication platform. Doctor is a ChatGPT integration project that knows how to diagnose Kubernetes problems and suggest solutions. - -The Doctor plugin is hosted by the official Botkube plugin repository. To enable the Doctor plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable the `doctor` executor, add `--set 'executors.ai.botkube/doctor.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). The `doctor` plugin uses ChatGPT for diagnosing problems, so you need to obtain an API Key from the OpenAI website as described [here](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key) and set it as follows: -`--set 'executors.ai.botkube/doctor.config.apiKey='` - -## Syntax - -```yaml -# 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: - "k8s-tools": - # Doctor executor configuration. - botkube/doctor: - enabled: false - ## Custom doctor plugin configuration. - config: - ## Open API key for accessing the ChatGPT engine. You can get it at https://platform.openai.com/account/api-keys. - apiKey: "" - ## OpenAI API Base URL. If empty, the default "https://api.openai.com/v1" value is used. - apiBaseUrl: "" - ## Default engine to use. If empty, "text-davinci-003" engine is used. - defaultEngine: "" - ## Optional organization ID for requests. - organizationID: "" - ## User agent to use for requests. If empty, the default value is used ("go-gpt3"). - userAgent: "" -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.7/configuration/executor/exec.md b/versioned_docs/version-1.7/configuration/executor/exec.md deleted file mode 100644 index 058f262f..00000000 --- a/versioned_docs/version-1.7/configuration/executor/exec.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -id: exec -title: Exec -sidebar_position: 4 ---- - -The `exec` executor plugin allows you to install and run CLI applications directly from chat (e.g., Slack, Discord, or Mattermost) without any hassle. - -The `exec` plugin is hosted by the official Botkube plugin repository. To enable the `exec` plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable `exec` plugin, add `--set 'executors.bins-management.botkube/exec.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). By default, the read-only `KUBECONFIG` is assigned. - -For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it from plugin's `context` configuration. To learn more refer to the [RBAC section](../rbac.md). - -## Syntax - -```yaml -# 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: - bins-management: - # Exec executor configuration. - # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - botkube/exec: - enabled: false - # Custom Exec plugin configuration. - config: - # An array of templates that define how to convert the command output into an interactive message. - templates: - # Link to templates source - # It uses the go-getter library, which supports multiple URL formats (such as HTTP, Git repositories, or S3) and is able to unpack archives. - # For more details, see the documentation at https://github.com/hashicorp/go-getter. - - ref: github.com/kubeshop/botkube//cmd/executor/exec/templates?ref=main - context: - # RBAC configuration for this plugin. - rbac: - group: - # Static impersonation for given group. - type: Static - static: - # Name of group.rbac.authorization.k8s.io the plugin role will be bound to. - values: [botkube-plugins-default] -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.7/configuration/executor/flux.md b/versioned_docs/version-1.7/configuration/executor/flux.md deleted file mode 100644 index 83df8b4d..00000000 --- a/versioned_docs/version-1.7/configuration/executor/flux.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -id: flux -title: Flux -sidebar_position: 6 ---- - -The Botkube Flux executor plugin allows you to run the [`flux`](https://fluxcd.io/) CLI commands directly within the chat window of your chosen communication platform. - -The Flux plugin is hosted in the official Botkube plugin repository. To enable the Flux plugin, ensure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml -``` - -## Prerequisite elevated RBAC permissions - -One of the plugin capabilities is the `flux diff` command. To use it, you need to update the Flux plugin RBAC configuration. This is necessary because the command performs a server-side dry run that requires patch permissions, as specified in the [Kubernetes documentation](https://kubernetes.io/docs/reference/using-api/api-concepts/#dry-run-authorization). - -If you use Botkube self-hosted installation in version 1.4.1 or newer, you can create them during Botkube install/upgrade by specifying `--set="rbac.groups.flux.create=true"` override. - -However, you can also create them manually: - -```shell -cat > /tmp/flux-rbac.yaml << ENDOFFILE ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: flux -rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list", "patch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: flux -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: flux -subjects: -- kind: Group - name: flux - apiGroup: rbac.authorization.k8s.io -ENDOFFILE - -kubectl apply -f /tmp/flux-rbac.yaml -``` - -Next, use the `flux` group in the plugin RBAC configuration: - -```yaml -executors: - flux: - botkube/flux: - enabled: true - config: - # ... - - context: - rbac: - group: - type: Static - static: - values: ["flux"] -``` - -## Enabling plugin - -To enable the GitHub plugin, add the following flag to the Botkube [`install` command](../../cli/commands/botkube_install.md): - -```sh ---set 'executors.flux.botkube/flux.enabled'=true -``` - -The Flux plugin comes with integrated GitHub support. To enable it, you'll need a valid [GitHub token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token). Set the token using the following command: - -```sh ---set 'executors.flux.botkube/flux.config.github.auth.accessToken=' -``` - -By default, the Flux plugin has read-only access. To perform actions like creating or deleting Flux-related sources, you'll need to customize the [RBAC](../rbac.md#configuration). - -## Plugin Configuration Syntax - -```yaml -# 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: - flux: - botkube/flux: - enabled: false - config: - github: - auth: - # GitHub access token. - # Instructions for token creation: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token. - # Lack of token may limit functionality, e.g., adding comments to pull requests or approving them. - accessToken: "" - log: - level: "info" -``` - -For the default Helm chart configuration, refer to the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.7/configuration/executor/helm.md b/versioned_docs/version-1.7/configuration/executor/helm.md deleted file mode 100644 index 9b4e2f47..00000000 --- a/versioned_docs/version-1.7/configuration/executor/helm.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -id: helm -title: Helm -sidebar_position: 3 ---- - -The Botkube Helm executor plugin allows you to run the `helm` command directly in the chat window of each communication platform. - -The Helm plugin is hosted by the official Botkube plugin repository. To enable the Helm plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable Helm plugin, add `--set 'executors.k8s-default-tools.botkube/helm.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). By default, just the read-only Helm commands are supported. - -For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it from plugin's `context` configuration. To learn more refer to the [RBAC section](../rbac.md). - -## Syntax - -```yaml -# 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: - "k8s-tools": - botkube/helm: # Plugin name syntax: /[@]. 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. - helmDriver: "secret" # Allowed values are configmap, secret, memory. - helmCacheDir: "/tmp/helm/.cache" - helmConfigDir: "/tmp/helm/" - context: - # RBAC configuration for this plugin. - rbac: - group: - # Static impersonation for given group. - type: Static - static: - # Name of group.rbac.authorization.k8s.io the plugin role will be bound to. - values: [botkube-plugins-default] -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -## Merging strategy - -For all collected `helm` executors bindings, configuration properties are overridden based on the order of the binding list. The priority is given to the last binding specified on the list. Empty properties are omitted. - -### Example - -Consider such configuration: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - name: "random" - bindings: - executors: - - helm-one - - helm-two - - helm-three - -executors: - "helm-one": - botkube/helm: - enabled: true - config: - helmDriver: "secret" - helmCacheDir: "/tmp/helm/.cache" - helmConfigDir: "/tmp/helm/" - "helm-two": - botkube/helm: - enabled: true - config: - helmDriver: "configmap" - "helm-three": - botkube/helm: - enabled: false - config: - helmDriver: "secret" - helmCacheDir: "/example/helm/.cache" - helmConfigDir: "/example/helm/" -``` - -We can see that: - -- The `helmDriver` is set to `configmap` as it's overridden by the `helm-two` binding - the **last one** which is both enabled and sets the `helmDriver` property. -- The `helmConfigDir` and `helmCacheDir` are set to values specified by the `helm-one` configuration as the `helm-two` don't specify them. -- The `helm-tree` binding is disabled (`botkube/helm.enabled` is set to `false`), so it's not taken into account. diff --git a/versioned_docs/version-1.7/configuration/executor/index.md b/versioned_docs/version-1.7/configuration/executor/index.md deleted file mode 100644 index 9f2ac2b2..00000000 --- a/versioned_docs/version-1.7/configuration/executor/index.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -id: executor -title: Executor -sidebar_position: 3 ---- - -The executor configuration allows you to define multiple executor configurations that can be later referred in [communication](../communication) bindings. For example, take a look at such executor definition: - -```yaml -executors: - "kubectl-global": # This is an executor configuration name, which is referred in communication bindings. - kubectl: - # ... trimmed ... - - "helm-read-only": # This is an executor configuration name, which is referred in communication bindings. - helm: - # ... trimmed ... -``` - -This can be later used by the communication platforms: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - bindings: - executors: # The order is important for merging strategy. - - kubectl-global # The executor configuration name - - helm-read-only # The executor configuration name - # ... trimmed ... -``` - -To use the Botkube executor plugins, first you need to define the plugins repository under the `plugins` property: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Next, you can configure executor from a given repository: - -```yaml -executors: - "plugins": - repo-name/executor-name@v1.0.0: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} -``` - -For all executor configuration properties, see the [**syntax**](#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. - -```yaml -# -- 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 - -```yaml -# 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: - "k8s-tools": - botkube/helm@v1.7.0: # Plugin name syntax: /[@]. 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. - helmDriver: "secret" - - 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.7.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](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.7/configuration/executor/kubectl.md b/versioned_docs/version-1.7/configuration/executor/kubectl.md deleted file mode 100644 index ca5da693..00000000 --- a/versioned_docs/version-1.7/configuration/executor/kubectl.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -id: kubectl -title: Kubectl -sidebar_position: 2 ---- - -The Botkube Kubectl executor plugin allows you to run the `kubectl` command directly in the chat window of each communication platform. - -The Kubectl plugin is hosted by the official Botkube plugin repository. To enable the Helm plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable `kubectl` executor, add `--set 'executors.k8s-default-tools.botkube/kubectl.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). By default, just the read-only `kubectl` commands are supported. - -For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it from plugin's `context` configuration. To learn more refer to the [RBAC section](../rbac.md). - -## Syntax - -```yaml -# 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: - "k8s-tools": - # Kubectl executor configuration. - botkube/kubectl: - enabled: false - config: - # Configures the default Namespace for executing Botkube `kubectl` commands. If not set, uses the 'default'. - defaultNamespace: "default" - # Configures the interactive kubectl command builder. - interactiveBuilder: - allowed: - # Configures which K8s namespace are displayed in namespace dropdown. - # If not specified, plugin needs to have access to fetch all Namespaces, otherwise Namespace dropdown won't be visible at all. - namespaces: ["default"] - # Configures which `kubectl` methods are displayed in commands dropdown. - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - # Configures which K8s resource are displayed in resources dropdown. - resources: ["deployments", "pods", "namespaces"] - context: - # RBAC configuration for this plugin. - rbac: - group: - # Static impersonation for given group. - type: Static - static: - # Name of group.rbac.authorization.k8s.io the plugin role will be bound to. - values: [botkube-plugins-default] -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -## Merging strategy - -For all collected `kubectl` executors bindings, configuration properties are overridden based on the order of the binding list. The priority is given to the last binding specified on the list. Empty properties are omitted. - -### Example - -Consider such configuration: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - name: "random" - bindings: - executors: - - kubectl-one - - kubectl-two - - kubectl-three - -executors: - "kubectl-one": - kubectl: - enabled: true - config: - defaultNamespace: "default" - interactiveBuilder: - allowed: - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - resources: ["deployments", "pods", "namespaces"] - "kubectl-two": - kubectl: - enabled: true - config: - interactiveBuilder: - allowed: - namespaces: ["default"] - verbs: ["api-resources", "top"] - "kubectl-three": - kubectl: - enabled: false - config: - interactiveBuilder: - allowed: - namespaces: ["kube-system"] -``` - -We can see that: - -- Only the `default` namespace is displayed in the interactive command builder. This is a result of merging `kubectl-one` and `kubectl-two`. The `kubectl-three` binding is not taken into account as it's disabled. -- Only the `api-resources` and `top` verbs are displayed in the interactive command builder as they are overridden by the `kubectl-two`. -- All resources defined in `kubectl-one` are displayed in the interactive command builder as other enabled bindings don't override this property. diff --git a/versioned_docs/version-1.7/configuration/general.md b/versioned_docs/version-1.7/configuration/general.md deleted file mode 100644 index deb37cb8..00000000 --- a/versioned_docs/version-1.7/configuration/general.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: general -title: General -sidebar_position: 6 ---- - -The general settings holds a general configuration for the Botkube backend. For example, log level, disabling config watcher and similar. - -## Syntax - -```yaml -# General Botkube configuration. -settings: - # Cluster name to differentiate incoming messages. - clusterName: not-configured - # If true, notifies about new Botkube releases. - upgradeNotifier: true - # Botkube logging settings. - log: - # Sets one of the log levels. Allowed values: `info`, `warn`, `debug`, `error`, `fatal`, `panic`. - level: info - # Configures log format. Allowed values: `text`, `json`. - formatter: json - # If true, disable ANSI colors in logging. Ignored when `json` formatter is used. - disableColors: false - -# Parameters for the Config Watcher component which reloads Botkube on ConfigMap changes. -# It restarts Botkube when configuration data change is detected. It watches ConfigMaps and/or Secrets with the `botkube.io/config-watch: "true"` label from the namespace where Botkube is installed. -configWatcher: - # If true, restarts the Botkube Pod on config changes. - enabled: true - # In-cluster Config Watcher configuration. It is used when remote configuration is not provided. - inCluster: - # Resync period for the Config Watcher informers. - informerResyncPeriod: 10m -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.7/configuration/helm-chart-parameters.md b/versioned_docs/version-1.7/configuration/helm-chart-parameters.md deleted file mode 100644 index 610e84b5..00000000 --- a/versioned_docs/version-1.7/configuration/helm-chart-parameters.md +++ /dev/null @@ -1,299 +0,0 @@ ---- -id: helm-chart-parameters -title: Helm chart parameters -sidebar_position: 8 ---- - -![Version: v1.7.0](https://img.shields.io/badge/Version-v1.7.0-informational?style=flat-square) ![AppVersion: v1.7.0](https://img.shields.io/badge/AppVersion-v1.7.0-informational?style=flat-square) - -Controller for the Botkube Slack app which helps you monitor your Kubernetes cluster, debug deployments and run specific checks on resources in the cluster. - -**Homepage:** [botkube.io](https://botkube.io) - -## Maintainers - -| Name | Email | -| ---------------- | --------------------- | -| Botkube Dev Team | `dev-team@botkube.io` | - -## Source Code - -- [github.com/kubeshop/botkube](https://github.com/kubeshop/botkube) - -## Parameters - -| Key | Type | Default | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------- | -| [image.registry](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L14) | string | `"ghcr.io"` | Botkube container image registry. | -| [image.repository](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L16) | string | `"kubeshop/botkube"` | Botkube container image repository. | -| [image.pullPolicy](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L18) | string | `"IfNotPresent"` | Botkube container image pull policy. | -| [image.tag](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L20) | string | `"v1.7.0"` | Botkube container image tag. Default tag is `appVersion` from Chart.yaml. | -| [podSecurityPolicy](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L24) | object | `{"enabled":false}` | Configures Pod Security Policy to allow Botkube to run in restricted clusters. [Ref doc](https://kubernetes.io/docs/concepts/policy/pod-security-policy/). | -| [securityContext](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L30) | object | Runs as a Non-Privileged user. | Configures security context to manage user Privileges in Pod. [Ref doc](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod). | -| [containerSecurityContext](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L36) | object | `{"allowPrivilegeEscalation":false,"privileged":false,"readOnlyRootFilesystem":true}` | Configures container security context. [Ref doc](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container). | -| [rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L43) | object | `{"create":true,"groups":{"argocd":{"create":false,"rules":[{"apiGroups":[""],"resources":["configmaps"],"verbs":["get","update"]},{"apiGroups":["argoproj.io"],"resources":["applications"],"verbs":["get","patch"]}]},"botkube-plugins-default":{"create":true,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list"]}]},"flux-read-patch":{"create":false,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list","patch"]}]}},"rules":[],"serviceAccountMountPath":"/var/run/7e7fd2f5-b15d-4803-bc52-f54fba357e76/secrets/kubernetes.io/serviceaccount","staticGroupName":""}` | Role Based Access for Botkube Pod and plugins. [Ref doc](https://kubernetes.io/docs/admin/authorization/rbac/). | -| [rbac.serviceAccountMountPath](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L47) | string | `"/var/run/7e7fd2f5-b15d-4803-bc52-f54fba357e76/secrets/kubernetes.io/serviceaccount"` | It is used to specify a custom path for mounting a service account to the Botkube deployment. This is important because we run plugins within the same Pod, and we want to avoid potential bugs when plugins rely on the default in-cluster K8s client configuration. Instead, they should always use kubeconfig specified directly for a given plugin. | -| [rbac.create](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L50) | bool | `true` | Configure RBAC resources for Botkube and (deprecated) `staticGroupName` subject with `rules`. For creating RBAC resources related to plugin permissions, use the `groups` property. | -| [rbac.rules](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L52) | list | `[]` | Deprecated. Use `rbac.groups` instead. | -| [rbac.staticGroupName](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L54) | string | `""` | Deprecated. Use `rbac.groups` instead. | -| [rbac.groups](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L56) | object | `{"argocd":{"create":false,"rules":[{"apiGroups":[""],"resources":["configmaps"],"verbs":["get","update"]},{"apiGroups":["argoproj.io"],"resources":["applications"],"verbs":["get","patch"]}]},"botkube-plugins-default":{"create":true,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list"]}]},"flux-read-patch":{"create":false,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list","patch"]}]}}` | Use this to create RBAC resources for specified group subjects. | -| [rbac.groups.argocd.create](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L65) | bool | `false` | Set it to `true` when using ArgoCD source plugin. | -| [rbac.groups.flux-read-patch.create](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L75) | bool | `false` | Set it to `true` when using Flux executor plugin to enable `flux diff`. | -| [kubeconfig.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L84) | bool | `false` | If true, enables overriding the Kubernetes auth. | -| [kubeconfig.base64Config](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L86) | string | `""` | A base64 encoded kubeconfig that will be stored in a Secret, mounted to the Pod, and specified in the KUBECONFIG environment variable. | -| [kubeconfig.existingSecret](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L91) | string | `""` | A Secret containing a kubeconfig to use. | -| [actions](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L98) | object | See the `values.yaml` file for full object. | Map of actions. Action contains configuration for automation based on observed events. The property name under `actions` object is an alias for a given configuration. You can define multiple actions configuration with different names. | -| [actions.describe-created-resource.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L101) | bool | `false` | If true, enables the action. | -| [actions.describe-created-resource.displayName](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L103) | string | `"Describe created resource"` | Action display name posted in the channels bound to the same source bindings. | -| [actions.describe-created-resource.command](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L108) | string | See the `values.yaml` file for the command in the Go template form. | Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available Kubernetes event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. | -| [actions.describe-created-resource.bindings](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L111) | object | `{"executors":["k8s-default-tools"],"sources":["k8s-create-events"]}` | Bindings for a given action. | -| [actions.describe-created-resource.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L113) | list | `["k8s-create-events"]` | Event sources that trigger a given action. | -| [actions.describe-created-resource.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L116) | list | `["k8s-default-tools"]` | Executors configuration used to execute a configured command. | -| [actions.show-logs-on-error.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L120) | bool | `false` | If true, enables the action. | -| [actions.show-logs-on-error.displayName](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L123) | string | `"Show logs on error"` | Action display name posted in the channels bound to the same source bindings. | -| [actions.show-logs-on-error.command](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L128) | string | See the `values.yaml` file for the command in the Go template form. | Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available Kubernetes event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. | -| [actions.show-logs-on-error.bindings](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L130) | object | `{"executors":["k8s-default-tools"],"sources":["k8s-err-with-logs-events"]}` | Bindings for a given action. | -| [actions.show-logs-on-error.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L132) | list | `["k8s-err-with-logs-events"]` | Event sources that trigger a given action. | -| [actions.show-logs-on-error.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L135) | list | `["k8s-default-tools"]` | Executors configuration used to execute a configured command. | -| [sources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L144) | object | See the `values.yaml` file for full object. | Map of sources. Source contains configuration for Kubernetes events and sending recommendations. The property name under `sources` object is an alias for a given configuration. You can define multiple sources configuration with different names. Key name is used as a binding reference. | -| [sources.k8s-recommendation-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L149) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [executors.k8s-default-tools.botkube/helm.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [executors.ai.botkube/doctor.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [executors.bins-management.botkube/exec.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.bins-management.botkube/exec.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.ai.botkube/doctor.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.k8s-default-tools.botkube/helm.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [executors.bins-management.botkube/exec.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [executors.ai.botkube/doctor.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [executors.k8s-default-tools.botkube/helm.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [executors.bins-management.botkube/exec.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [executors.k8s-default-tools.botkube/helm.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [executors.ai.botkube/doctor.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L174) | object | `{"ingress":{"backendServiceValid":true,"tlsSecretValid":true},"pod":{"labelsSet":true,"noLatestImageTag":true}}` | Describes configuration for various recommendation insights. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L176) | object | `{"labelsSet":true,"noLatestImageTag":true}` | Recommendations for Pod Kubernetes resource. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod.noLatestImageTag](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L178) | bool | `true` | If true, notifies about Pod containers that use `latest` tag for images. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod.labelsSet](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L180) | bool | `true` | If true, notifies about Pod resources created without labels. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L182) | object | `{"backendServiceValid":true,"tlsSecretValid":true}` | Recommendations for Ingress Kubernetes resource. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress.backendServiceValid](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L184) | bool | `true` | If true, notifies about Ingress resources with invalid backend service reference. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress.tlsSecretValid](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L186) | bool | `true` | If true, notifies about Ingress resources with invalid TLS secret reference. | -| [sources.k8s-all-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L192) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L198) | object | See the `values.yaml` file for full object. | Filter settings for various sources. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters.objectAnnotationChecker](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L200) | bool | `true` | If true, enables support for `botkube.io/disable` resource annotation. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters.nodeEventsChecker](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L202) | bool | `true` | If true, filters out Node-related events that are not important. | -| [sources.k8s-all-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L206) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-create-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L210) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L210) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-all-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L210) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L210) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-err-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L210) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-all-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L220) | object | `{"message":{"exclude":[],"include":[]},"reason":{"exclude":[],"include":[]},"types":["create","delete","error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L222) | list | `["create","delete","error"]` | Lists all event types to be watched. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L228) | object | `{"exclude":[],"include":[]}` | Optional list of exact values or regex patterns to filter events by event reason. Skipped, if both include/exclude lists are empty. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason.include](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L230) | list | `[]` | Include contains a list of allowed values. It can also contain regex expressions. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason.exclude](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L233) | list | `[]` | Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. Exclude list is checked before the Include list. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L236) | object | `{"exclude":[],"include":[]}` | Optional list of exact values or regex patterns to filter event by event message. Skipped, if both include/exclude lists are empty. If a given event has multiple messages, it is considered a match if any of the messages match the constraints. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message.include](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L238) | list | `[]` | Include contains a list of allowed values. It can also contain regex expressions. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message.exclude](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L241) | list | `[]` | Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. Exclude list is checked before the Include list. | -| [sources.k8s-all-events.botkube/kubernetes.config.annotations](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L245) | object | `{}` | Filters Kubernetes resources to watch by annotations. Each resource needs to have all the specified annotations. Regex expressions are not supported. | -| [sources.k8s-all-events.botkube/kubernetes.config.labels](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L248) | object | `{}` | Filters Kubernetes resources to watch by labels. Each resource needs to have all the specified labels. Regex expressions are not supported. | -| [sources.k8s-all-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L255) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources to watch. Resources are identified by its type in `{group}/{version}/{kind (plural)}` format. Examples: `apps/v1/deployments`, `v1/pods`. Each resource can override the namespaces and event configuration by using dedicated `event` and `namespaces` field. Also, each resource can specify its own `annotations`, `labels` and `name` regex. | -| [sources.k8s-err-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L369) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-err-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L376) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-err-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L380) | object | `{"types":["error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-err-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L382) | list | `["error"]` | Lists all event types to be watched. | -| [sources.k8s-err-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L387) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L413) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L420) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L424) | object | `{"types":["error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L426) | list | `["error"]` | Lists all event types to be watched. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L431) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.k8s-create-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L444) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-create-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L451) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-create-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L455) | object | `{"types":["create"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-create-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L457) | list | `["create"]` | Lists all event types to be watched. | -| [sources.k8s-create-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L462) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L479) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.extraButtons](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L484) | list | `[{"button":{"commandTpl":"doctor --resource={{ .Kind | lower }}/{{ .Name }} --namespace={{ .Namespace }} --error={{ .Reason }} --bk-cmd-header='AI assistance'","displayName":"Get Help"},"enabled":true,"trigger":{"type":["error"]}}]` | Define extra buttons to be displayed beside notification message. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L495) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L499) | object | `{"types":["error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L501) | list | `["error"]` | Lists all event types to be watched. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L506) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.prometheus.botkube/prometheus.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L533) | bool | `false` | If true, enables `prometheus` source. | -| [sources.prometheus.botkube/prometheus.config.url](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L536) | string | `"http://localhost:9090"` | Prometheus endpoint without api version and resource. | -| [sources.prometheus.botkube/prometheus.config.ignoreOldAlerts](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L538) | bool | `true` | If set as true, Prometheus source plugin will not send alerts that is created before plugin start time. | -| [sources.prometheus.botkube/prometheus.config.alertStates](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L540) | list | `["firing","pending","inactive"]` | Only the alerts that have state provided in this config will be sent as notification. https://pkg.go.dev/github.com/prometheus/prometheus/rules#AlertState | -| [sources.prometheus.botkube/prometheus.config.log](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L542) | object | `{"level":"info"}` | Logging configuration | -| [sources.prometheus.botkube/prometheus.config.log.level](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L544) | string | `"info"` | Log level | -| [sources.keptn.botkube/keptn.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L550) | bool | `false` | If true, enables `keptn` source. | -| [sources.keptn.botkube/keptn.config.url](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L553) | string | `"http://api-gateway-nginx.keptn.svc.cluster.local/api"` | Keptn API Gateway URL. | -| [sources.keptn.botkube/keptn.config.token](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L555) | string | `""` | Keptn API Token to access events through API Gateway. | -| [sources.keptn.botkube/keptn.config.project](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L557) | string | `""` | Optional Keptn project. | -| [sources.keptn.botkube/keptn.config.service](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L559) | string | `""` | Optional Keptn Service name under the project. | -| [sources.keptn.botkube/keptn.config.log](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L561) | object | `{"level":"info"}` | Logging configuration | -| [sources.keptn.botkube/keptn.config.log.level](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L563) | string | `"info"` | Log level | -| [sources.argocd.botkube/argocd.config](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L578) | object | `{"argoCD":{"notificationsConfigMap":{"name":"argocd-notifications-cm","namespace":"argocd"},"uiBaseUrl":"http://localhost:8080"},"defaultSubscriptions":{"applications":[{"name":"guestbook","namespace":"argocd"}]}}` | Config contains configuration for ArgoCD source plugin. This section lists only basic options, and uses default triggers and templates which are based on ArgoCD Notification Catalog ones (https://github.com/argoproj/argo-cd/blob/master/notifications_catalog/install.yaml). Advanced customization (including triggers and templates) is described in the documentation. | -| [sources.argocd.botkube/argocd.config.defaultSubscriptions.applications](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L581) | list | `[{"name":"guestbook","namespace":"argocd"}]` | Provide application name and namespace to subscribe to all events for a given application. | -| [sources.argocd.botkube/argocd.config.argoCD.uiBaseUrl](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L586) | string | `"http://localhost:8080"` | ArgoCD UI base URL. It is used for generating links in the incoming events. | -| [sources.argocd.botkube/argocd.config.argoCD.notificationsConfigMap](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L588) | object | `{"name":"argocd-notifications-cm","namespace":"argocd"}` | ArgoCD Notifications ConfigMap reference. | -| [executors](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L598) | object | See the `values.yaml` file for full object. | Map of executors. Executor contains configuration for running `kubectl` commands. The property name under `executors` is an alias for a given configuration. You can define multiple executor configurations with different names. Key name is used as a binding reference. | -| [executors.k8s-default-tools.botkube/helm.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L604) | bool | `false` | If true, enables `helm` commands execution. | -| [executors.k8s-default-tools.botkube/helm.config.helmDriver](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L609) | string | `"secret"` | Allowed values are configmap, secret, memory. | -| [executors.k8s-default-tools.botkube/helm.config.helmConfigDir](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L611) | string | `"/tmp/helm/"` | Location for storing Helm configuration. | -| [executors.k8s-default-tools.botkube/helm.config.helmCacheDir](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L613) | string | `"/tmp/helm/.cache"` | Location for storing cached files. Must be under the Helm config directory. | -| [executors.k8s-default-tools.botkube/kubectl.config](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L622) | object | See the `values.yaml` file for full object including optional properties related to interactive builder. | Custom kubectl configuration. | -| [executors.flux.botkube/flux.config.log](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L692) | object | `{"level":"info"}` | Logging configuration | -| [executors.flux.botkube/flux.config.log.level](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L694) | string | `"info"` | Log level | -| [aliases](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L708) | object | See the `values.yaml` file for full object. | Custom aliases for given commands. The aliases are replaced with the underlying command before executing it. Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. | -| [existingCommunicationsSecretName](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L735) | string | `""` | Configures existing Secret with communication settings. It MUST be in the `botkube` Namespace. To reload Botkube once it changes, add label `botkube.io/config-watch: "true"`. | -| [communications](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L742) | object | See the `values.yaml` file for full object. | Map of communication groups. Communication group contains settings for multiple communication platforms. The property name under `communications` object is an alias for a given configuration group. You can define multiple communication groups with different names. | -| [communications.default-group.socketSlack.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L747) | bool | `false` | If true, enables Slack bot. | -| [communications.default-group.socketSlack.channels](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L751) | object | `{"default":{"bindings":{"executors":["k8s-default-tools","bins-management","ai","flux"],"sources":["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]},"name":"SLACK_CHANNEL"}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.socketSlack.channels.default.name](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L754) | string | `"SLACK_CHANNEL"` | Slack channel name without '#' prefix where you have added Botkube and want to receive notifications in. | -| [communications.default-group.socketSlack.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L757) | list | `["k8s-default-tools","bins-management","ai","flux"]` | Executors configuration for a given channel. | -| [communications.default-group.socketSlack.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L763) | list | `["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]` | Notification sources configuration for a given channel. | -| [communications.default-group.socketSlack.botToken](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L770) | string | `""` | Slack bot token for your own Slack app. [Ref doc](https://api.slack.com/authentication/token-types). | -| [communications.default-group.socketSlack.appToken](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L773) | string | `""` | Slack app-level token for your own Slack app. [Ref doc](https://api.slack.com/authentication/token-types). | -| [communications.default-group.mattermost.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L777) | bool | `false` | If true, enables Mattermost bot. | -| [communications.default-group.mattermost.botName](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L779) | string | `"Botkube"` | User in Mattermost which belongs the specified Personal Access token. | -| [communications.default-group.mattermost.url](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L781) | string | `"MATTERMOST_SERVER_URL"` | The URL (including http/https schema) where Mattermost is running. e.g https://example.com:9243 | -| [communications.default-group.mattermost.token](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L783) | string | `"MATTERMOST_TOKEN"` | Personal Access token generated by Botkube user. | -| [communications.default-group.mattermost.team](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L785) | string | `"MATTERMOST_TEAM"` | The Mattermost Team name where Botkube is added. | -| [communications.default-group.mattermost.channels](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L789) | object | `{"default":{"bindings":{"executors":["k8s-default-tools","bins-management","ai","flux"],"sources":["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]},"name":"MATTERMOST_CHANNEL","notification":{"disabled":false}}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.mattermost.channels.default.name](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L793) | string | `"MATTERMOST_CHANNEL"` | The Mattermost channel name for receiving Botkube alerts. The Botkube user needs to be added to it. | -| [communications.default-group.mattermost.channels.default.notification.disabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L796) | bool | `false` | If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. | -| [communications.default-group.mattermost.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L799) | list | `["k8s-default-tools","bins-management","ai","flux"]` | Executors configuration for a given channel. | -| [communications.default-group.mattermost.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L805) | list | `["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]` | Notification sources configuration for a given channel. | -| [communications.default-group.teams.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L814) | bool | `false` | If true, enables MS Teams bot. | -| [communications.default-group.teams.botName](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L816) | string | `"Botkube"` | The Bot name set while registering Bot to MS Teams. | -| [communications.default-group.teams.appID](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L818) | string | `"APPLICATION_ID"` | The Botkube application ID generated while registering Bot to MS Teams. | -| [communications.default-group.teams.appPassword](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L820) | string | `"APPLICATION_PASSWORD"` | The Botkube application password generated while registering Bot to MS Teams. | -| [communications.default-group.teams.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L823) | list | `["k8s-default-tools","bins-management","ai","flux"]` | Executor bindings apply to all MS Teams channels where Botkube has access to. | -| [communications.default-group.teams.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L829) | list | `["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]` | Source bindings apply to all channels which have notification turned on with `@Botkube enable notifications` command. | -| [communications.default-group.teams.messagePath](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L835) | string | `"/bots/teams"` | The path in endpoint URL provided while registering Botkube to MS Teams. | -| [communications.default-group.teams.port](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L837) | int | `3978` | The Service port for bot endpoint on Botkube container. | -| [communications.default-group.discord.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L842) | bool | `false` | If true, enables Discord bot. | -| [communications.default-group.discord.token](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L844) | string | `"DISCORD_TOKEN"` | Botkube Bot Token. | -| [communications.default-group.discord.botID](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L846) | string | `"DISCORD_BOT_ID"` | Botkube Application Client ID. | -| [communications.default-group.discord.channels](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L850) | object | `{"default":{"bindings":{"executors":["k8s-default-tools","bins-management","ai","flux"],"sources":["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]},"id":"DISCORD_CHANNEL_ID","notification":{"disabled":false}}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.discord.channels.default.id](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L854) | string | `"DISCORD_CHANNEL_ID"` | Discord channel ID for receiving Botkube alerts. The Botkube user needs to be added to it. | -| [communications.default-group.discord.channels.default.notification.disabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L857) | bool | `false` | If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. | -| [communications.default-group.discord.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L860) | list | `["k8s-default-tools","bins-management","ai","flux"]` | Executors configuration for a given channel. | -| [communications.default-group.discord.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L866) | list | `["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]` | Notification sources configuration for a given channel. | -| [communications.default-group.elasticsearch.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L875) | bool | `false` | If true, enables Elasticsearch. | -| [communications.default-group.elasticsearch.awsSigning.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L879) | bool | `false` | If true, enables awsSigning using IAM for Elasticsearch hosted on AWS. Make sure AWS environment variables are set. [Ref doc](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html). | -| [communications.default-group.elasticsearch.awsSigning.awsRegion](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L881) | string | `"us-east-1"` | AWS region where Elasticsearch is deployed. | -| [communications.default-group.elasticsearch.awsSigning.roleArn](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L883) | string | `""` | AWS IAM Role arn to assume for credentials, use this only if you don't want to use the EC2 instance role or not running on AWS instance. | -| [communications.default-group.elasticsearch.server](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L885) | string | `"ELASTICSEARCH_ADDRESS"` | The server URL, e.g https://example.com:9243 | -| [communications.default-group.elasticsearch.username](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L887) | string | `"ELASTICSEARCH_USERNAME"` | Basic Auth username. | -| [communications.default-group.elasticsearch.password](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L889) | string | `"ELASTICSEARCH_PASSWORD"` | Basic Auth password. | -| [communications.default-group.elasticsearch.skipTLSVerify](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L892) | bool | `false` | If true, skips the verification of TLS certificate of the Elastic nodes. It's useful for clusters with self-signed certificates. | -| [communications.default-group.elasticsearch.logLevel](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L899) | string | `""` | Specify the log level for Elasticsearch client. Leave empty to disable logging. | -| [communications.default-group.elasticsearch.indices](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L904) | object | `{"default":{"bindings":{"sources":["k8s-err-events","k8s-recommendation-events"]},"name":"botkube","replicas":0,"shards":1,"type":"botkube-event"}}` | Map of configured indices. The `indices` property name is an alias for a given configuration. | -| [communications.default-group.elasticsearch.indices.default.name](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L907) | string | `"botkube"` | Configures Elasticsearch index settings. | -| [communications.default-group.elasticsearch.indices.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L913) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for a given index. | -| [communications.default-group.webhook.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L920) | bool | `false` | If true, enables Webhook. | -| [communications.default-group.webhook.url](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L922) | string | `"WEBHOOK_URL"` | The Webhook URL, e.g.: https://example.com:80 | -| [communications.default-group.webhook.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L925) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for the webhook. | -| [communications.default-group.slack](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L935) | object | See the `values.yaml` file for full object. | Settings for deprecated Slack integration. **DEPRECATED:** Legacy Slack integration has been deprecated and removed from the Slack App Directory. Use `socketSlack` instead. Read more here: https://docs.botkube.io/installation/slack/ | -| [settings.clusterName](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L953) | string | `"not-configured"` | Cluster name to differentiate incoming messages. | -| [settings.lifecycleServer](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L956) | object | `{"enabled":true,"port":2113}` | Server configuration which exposes functionality related to the app lifecycle. | -| [settings.healthPort](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L959) | int | `2114` | | -| [settings.upgradeNotifier](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L961) | bool | `true` | If true, notifies about new Botkube releases. | -| [settings.log.level](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L965) | string | `"info"` | Sets one of the log levels. Allowed values: `info`, `warn`, `debug`, `error`, `fatal`, `panic`. | -| [settings.log.disableColors](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L967) | bool | `false` | If true, disable ANSI colors in logging. Ignored when `json` formatter is used. | -| [settings.log.formatter](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L969) | string | `"json"` | Configures log format. Allowed values: `text`, `json`. | -| [settings.systemConfigMap](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L972) | object | `{"name":"botkube-system"}` | Botkube's system ConfigMap where internal data is stored. | -| [settings.persistentConfig](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L977) | object | `{"runtime":{"configMap":{"annotations":{},"name":"botkube-runtime-config"},"fileName":"_runtime_state.yaml"},"startup":{"configMap":{"annotations":{},"name":"botkube-startup-config"},"fileName":"_startup_state.yaml"}}` | Persistent config contains ConfigMap where persisted configuration is stored. The persistent configuration is evaluated from both chart upgrade and Botkube commands used in runtime. | -| [ssl.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L992) | bool | `false` | If true, specify cert path in `config.ssl.cert` property or K8s Secret in `config.ssl.existingSecretName`. | -| [ssl.existingSecretName](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L998) | string | `""` | Using existing SSL Secret. It MUST be in `botkube` Namespace. | -| [ssl.cert](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1001) | string | `""` | SSL Certificate file e.g certs/my-cert.crt. | -| [service](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1004) | object | `{"name":"metrics","port":2112,"targetPort":2112}` | Configures Service settings for ServiceMonitor CR. | -| [ingress](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1011) | object | `{"annotations":{"kubernetes.io/ingress.class":"nginx"},"create":false,"host":"HOST","tls":{"enabled":false,"secretName":""}}` | Configures Ingress settings that exposes MS Teams endpoint. [Ref doc](https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource). | -| [serviceMonitor](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1022) | object | `{"enabled":false,"interval":"10s","labels":{},"path":"/metrics","port":"metrics"}` | Configures ServiceMonitor settings. [Ref doc](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitor). | -| [deployment.annotations](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1032) | object | `{}` | Extra annotations to pass to the Botkube Deployment. | -| [deployment.livenessProbe](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1034) | object | `{"failureThreshold":35,"initialDelaySeconds":1,"periodSeconds":2,"successThreshold":1,"timeoutSeconds":1}` | Liveness probe. | -| [deployment.livenessProbe.initialDelaySeconds](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1036) | int | `1` | The liveness probe initial delay seconds. | -| [deployment.livenessProbe.periodSeconds](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1038) | int | `2` | The liveness probe period seconds. | -| [deployment.livenessProbe.timeoutSeconds](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1040) | int | `1` | The liveness probe timeout seconds. | -| [deployment.livenessProbe.failureThreshold](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1042) | int | `35` | The liveness probe failure threshold. | -| [deployment.livenessProbe.successThreshold](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1044) | int | `1` | The liveness probe success threshold. | -| [deployment.readinessProbe](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1047) | object | `{"failureThreshold":35,"initialDelaySeconds":1,"periodSeconds":2,"successThreshold":1,"timeoutSeconds":1}` | Readiness probe. | -| [deployment.readinessProbe.initialDelaySeconds](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1049) | int | `1` | The readiness probe initial delay seconds. | -| [deployment.readinessProbe.periodSeconds](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1051) | int | `2` | The readiness probe period seconds. | -| [deployment.readinessProbe.timeoutSeconds](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1053) | int | `1` | The readiness probe timeout seconds. | -| [deployment.readinessProbe.failureThreshold](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1055) | int | `35` | The readiness probe failure threshold. | -| [deployment.readinessProbe.successThreshold](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1057) | int | `1` | The readiness probe success threshold. | -| [extraAnnotations](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1064) | object | `{}` | Extra annotations to pass to the Botkube Pod. | -| [extraLabels](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1066) | object | `{}` | Extra labels to pass to the Botkube Pod. | -| [priorityClassName](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1068) | string | `""` | Priority class name for the Botkube Pod. | -| [nameOverride](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1071) | string | `""` | Fully override "botkube.name" template. | -| [fullnameOverride](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1073) | string | `""` | Fully override "botkube.fullname" template. | -| [resources](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1079) | object | `{}` | The Botkube Pod resource request and limits. We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. [Ref docs](https://kubernetes.io/docs/user-guide/compute-resources/) | -| [extraEnv](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1091) | list | `[{"name":"LOG_LEVEL_SOURCE_BOTKUBE_KUBERNETES","value":"debug"}]` | Extra environment variables to pass to the Botkube container. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables). | -| [extraVolumes](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1105) | list | `[]` | Extra volumes to pass to the Botkube container. Mount it later with extraVolumeMounts. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/volume/#Volume). | -| [extraVolumeMounts](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1120) | list | `[]` | Extra volume mounts to pass to the Botkube container. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1). | -| [nodeSelector](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1138) | object | `{}` | Node labels for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/user-guide/node-selection/). | -| [tolerations](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1142) | list | `[]` | Tolerations for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/). | -| [affinity](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1146) | object | `{}` | Affinity for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). | -| [serviceAccount.create](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1150) | bool | `true` | If true, a ServiceAccount is automatically created. | -| [serviceAccount.name](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1153) | string | `""` | The name of the service account to use. If not set, a name is generated using the fullname template. | -| [serviceAccount.annotations](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1155) | object | `{}` | Extra annotations for the ServiceAccount. | -| [extraObjects](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1158) | list | `[]` | Extra Kubernetes resources to create. Helm templating is allowed as it is evaluated before creating the resources. | -| [analytics.disable](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1186) | bool | `false` | If true, sending anonymous analytics is disabled. To learn what date we collect, see [Privacy Policy](https://docs.botkube.io/privacy#privacy-policy). | -| [configWatcher](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1190) | object | `{"enabled":true,"inCluster":{"informerResyncPeriod":"10m"}}` | Parameters for the Config Watcher component which reloads Botkube on ConfigMap changes. It restarts Botkube when configuration data change is detected. It watches ConfigMaps and/or Secrets with the `botkube.io/config-watch: "true"` label from the namespace where Botkube is installed. | -| [configWatcher.enabled](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1192) | bool | `true` | If true, restarts the Botkube Pod on config changes. | -| [configWatcher.inCluster](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1194) | object | `{"informerResyncPeriod":"10m"}` | In-cluster Config Watcher configuration. It is used when remote configuration is not provided. | -| [configWatcher.inCluster.informerResyncPeriod](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1196) | string | `"10m"` | Resync period for the Config Watcher informers. | -| [plugins](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1199) | object | `{"cacheDir":"/tmp","healthCheckInterval":"10s","incomingWebhook":{"enabled":true,"port":2115,"targetPort":2115},"repositories":{"botkube":{"url":"https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml"}},"restartPolicy":{"threshold":10,"type":"DeactivatePlugin"}}` | Configuration for Botkube executors and sources plugins. | -| [plugins.cacheDir](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1201) | string | `"/tmp"` | Directory, where downloaded plugins are cached. | -| [plugins.repositories](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1203) | object | `{"botkube":{"url":"https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml"}}` | List of plugins repositories. | -| [plugins.repositories.botkube](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1205) | object | `{"url":"https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml"}` | This repository serves officially supported Botkube plugins. | -| [plugins.incomingWebhook](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1208) | object | `{"enabled":true,"port":2115,"targetPort":2115}` | Configure Incoming webhook for source plugins. | -| [plugins.restartPolicy](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1213) | object | `{"threshold":10,"type":"DeactivatePlugin"}` | Botkube Restart Policy on plugin failure. | -| [plugins.restartPolicy.type](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1215) | string | `"DeactivatePlugin"` | Restart policy type. Allowed values: "RestartAgent", "DeactivatePlugin". | -| [plugins.restartPolicy.threshold](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1217) | int | `10` | Number of restarts before policy takes into effect. | -| [config](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1221) | object | `{"provider":{"apiKey":"","endpoint":"https://api.botkube.io/graphql","identifier":""}}` | Configuration for synchronizing Botkube configuration. | -| [config.provider](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1223) | object | `{"apiKey":"","endpoint":"https://api.botkube.io/graphql","identifier":""}` | Base provider definition. | -| [config.provider.identifier](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1226) | string | `""` | Unique identifier for remote Botkube settings. If set to an empty string, Botkube won't fetch remote configuration. | -| [config.provider.endpoint](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1228) | string | `"https://api.botkube.io/graphql"` | Endpoint to fetch Botkube settings from. | -| [config.provider.apiKey](https://github.com/kubeshop/botkube/blob/release-1.7/helm/botkube/values.yaml#L1230) | string | `""` | Key passed as a `X-API-Key` header to the provider's endpoint. | - -### AWS IRSA on EKS support - -AWS has introduced IAM Role for Service Accounts in order to provide fine-grained access. This is useful if you are looking to run Botkube inside an EKS cluster. For more details visit https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html. - -Annotate the Botkube Service Account as shown in the example below and add the necessary Trust Relationship to the corresponding Botkube role to get this working. - -``` -serviceAccount: - annotations: - eks.amazonaws.com/role-arn: "{role_arn_to_assume}" -``` diff --git a/versioned_docs/version-1.7/configuration/index.mdx b/versioned_docs/version-1.7/configuration/index.mdx deleted file mode 100644 index 5b643c8b..00000000 --- a/versioned_docs/version-1.7/configuration/index.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -id: configuration -title: Configuration -sidebar_position: 3 ---- - -Botkube backend allows you to specify [source](./source), [executor](./executor), [communication](./communication), and [general](./general) Botkube settings. Check the related documents for more detailed explanation. - -The configuration settings are read from two sources: - -- the configuration files specified by the `BOTKUBE_CONFIG_PATHS` environment variable or `--config/-c` flag. For example: - - ```bash - export BOTKUBE_CONFIG_PATHS="global.yaml,team-b-specific.yaml" - # or - ./botkube --config "global.yaml,team-b-specific.yaml" - ``` - - You can split individual settings into multiple configuration files. The priority will be given to the last (right-most) file specified. Files with `_` name prefix are always read as the last ones. See the [merging strategy](#merging-strategy) section for more details. - - :::note - For Helm installation, Botkube uses `_runtime_state.yaml` and `_startup_state.yaml` files to store its internal state. Remember to keep these files in the `BOTKUBE_CONFIG_PATHS` environment variable. - ::: - -- the exported [environment variables](#environment-variables) that overrides the configuration specified in the files. - -## Helm install options - -Advanced Helm install options are documented [here](helm-chart-parameters). - -## Updating the configuration - -To update Botkube configuration, you can either: - -- upgrade Botkube installation with Helm, -- or use dedicated `@Botkube` commands, to e.g. toggle notifications or edit Source Bindings. See the [Usage](../usage/index.md) document for more details. - -If you wish to change the configuration with Helm, create a `/tmp/values.yaml` file that contains the new values and run: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -```shell -botkube install -f /tmp/values.yaml -``` - - - - - -```shell -helm upgrade -n botkube botkube -f /tmp/values.yaml helm/botkube --wait -``` - - - - -As both Helm release upgrade and some of the `@Botkube` commands modify the same configuration, it is merged during command execution. -Whenever you specify a new value in the `/tmp/values.yaml` file, it will override the existing value in the configuration. - -### Preventing overrides by default Helm chart values - -Keep in mind that even if you don't specify custom values in the `/tmp/values.yaml` file, Helm can override the existing values with the default ones. - -Consider the following config: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - botToken: "{botToken}" - appToken: "{appToken}" - channels: - "default": - name: general - notification: - disabled: false # default from the Helm chart - bindings: - sources: - - k8s-all-events # default from the Helm chart -# (...) -``` - -Assume that users ran the following commands: - -``` -@Botkube edit SourceBindings k8s-err-events, k8s-recommendation-events -@Botkube disable notifications -``` - -Which effectively result in the following config that Botkube sees: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - botToken: "{botToken}" - appToken: "{appToken}" - channels: - "default": - name: general - notification: - disabled: true # set by user command - bindings: - sources: - - k8s-err-events # set by user command - - k8s-recommendation-events # set by user command -# (...) -``` - -To persist the configuration that users provided, and not overwrite notification and source bindings values, run Helm upgrade with: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - name: general - notification: null # explicitly not use defaults from Helm chart - bindings: - sources: null # explicitly not use defaults from Helm chart -# (...) other values -``` - -The following properties need such `null` value during upgrade, if you want to keep the previous configuration: - -- `communications.default-group.{communication-platform}.channels.default.notifications`, where `{communication-platform}` is any communication platform supported except Microsoft Teams, -- `communications.default-group.{communication-platform}.channels.default.bindings.sources`, where `{communication-platform}` is any communication platform supported except Microsoft Teams, -- `communications.default-group.teams.bindings.sources`. - -To learn more, read the [Deleting a default key](https://helm.sh/docs/chart_template_guide/values_files/#deleting-a-default-key) paragraph in Helm documentation. - -## Environment variables - -The individual communication settings can be specified via environment variables. They take priority and override the configuration specified in the file. - -To construct the environment variable name, take any property from the configuration file and make it uppercase. Use the underscore for properties that are nested. Use the double underscore for all camelCase properties. Finally, add the `BOTKUBE_` prefix. - -For example, such configuration property from YAML: - -```yaml -settings: - kubectl: - defaultNamespace: "NAMESPACE" -``` - -is mapped to the `BOTKUBE_SETTINGS_KUBECTL_DEFAULT__NAMESPACE` environment variable. - -This is a useful feature that allows you to store the overall configuration in a file, where sensitive data, such as tokens, can be put in environment variables. See the [**Tokens from Vault via CSI driver**](./communication/vault-csi/) tutorial for an example use-case. - -## Merging strategy - -Botkube allows you to split individual settings into multiple configuration files. The following rules apply: - -- The priority will be given to the last (right-most) file specified. -- Files with `_` name prefix are always read as the last ones following the initial order. -- Objects are merged together and primitive fields are overridden. For example: - - ```yaml - # a.yaml - first file - settings: - clusterName: dev-cluster - kubectl: - enabled: false - ``` - - ```yaml - # _a.yaml - second file with `_` prefix - settings: - clusterName: demo-cluster - ``` - - ```yaml - # b.yaml - third file - settings: - kubectl: - enabled: true - ``` - - ```yaml - # result - settings: - clusterName: demo-cluster - kubectl: - enabled: true - ``` - -- The arrays items are not merged, they are overridden. For example: - - ```yaml - # a.yaml - settings: - kubectl: - enabled: true - commands: - verbs: - ["api-resources", "api-versions", "cluster-info", "describe", "diff", "explain", "get", "logs", "top", "auth"] - ``` - - ```yaml - # b.yaml - settings: - kubectl: - commands: - verbs: ["get", "logs", "top", "auth"] - ``` - - ```yaml - # result - settings: - kubectl: - enabled: true - commands: - verbs: ["get", "logs", "top", "auth"] - ``` diff --git a/versioned_docs/version-1.7/configuration/rbac.md b/versioned_docs/version-1.7/configuration/rbac.md deleted file mode 100644 index cc2c87ed..00000000 --- a/versioned_docs/version-1.7/configuration/rbac.md +++ /dev/null @@ -1,432 +0,0 @@ ---- -id: rbac -title: RBAC -sidebar_position: 4 ---- - -Botkube allows plugins to access Kubernetes API by defining [RBAC](https://en.wikipedia.org/wiki/Role-based_access_control) rules as part of plugin `context.rbac` configuration. Kubeconfig generation needs to be requested by defining `context.rbac` property. - -Based on this configuration Botkube generates a temporary [kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) with user and/or group impersonation. -This kubeconfig is available to plugins in the `Execute` and `Stream` contexts. - -## Architecture - -Botkube uses its own cluster credentials to generate a temporary kubeconfig, and the kubeconfig uses [user/group impersonation](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation). - -For source plugins, the kubeconfig is generated once - during plugin startup. -For executor plugins, the kubeconfig is generated every time a command is sent to the plugin, which allows greater flexibility, such as including the name of the channel the command was sent from. - -![diagram](assets/botkube-read-only.svg "diagram") - -## Configuration - -For each executor and source plugin, you can define a `context.rbac` configuration. This config is used to generate a dedicated kubeconfig. - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static # Static or ChannelName - static: # applicable only for "Static" user mapping type - value: botkube-internal-static-user - prefix: "" # optional prefix for user name; useful especially for channel name mapping - group: - type: Static # Static or ChannelName - static: # applicable only for "Static" group mapping type - values: - - "my-group1" - - "my-group2" - prefix: "" # optional prefix for all group names; useful especially for channel name mapping -``` - -### Mapping types - -For both user and group, the following mapping types are supported: - -- `Static` - - For user, it uses a single static value. For group, it uses a list of static values. The value is prepended with an optional prefix. - -- `ChannelName` - - Channel name is used as subject for user or group impersonation. The channel name is prepended with an optional prefix. - This mapping is only available for executor plugins. - -### Default configuration - -When a given plugin have `context.rbac` property undefined, Botkube doesn't generate a kubeconfig for this plugin. To request kubeconfig generation, define `context.rbac` property with empty value: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: {} # enable kubeconfig generation -``` - -However, such configuration will generate a kubeconfig with empty impersonation config, which effectively means an anonymous access to the Kubernetes API. - -During Botkube installation, Botkube generates Kubernetes ClusterRole and ClusterRoleBinding resources with read-only access for the default group `botkube-plugins-default`. This group is used by default across the `values.yaml` for all default plugins. - -```yaml -rbac: - # ... - groups: - "botkube-plugins-default": - create: true - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] -``` - -See the [`values.yaml`](https://github.com/kubeshop/botkube/blob/v1.7.0/helm/botkube/values.yaml) for more details. - -#### Defaults for user mapping when group mapping is used - -Kubernetes requires user for group impersonation. That's why when a group mapping is user without `context.rbac.user` mapping defined, Botkube uses `botkube-internal-static-user` user name for impersonation. -For example, when the following configuration is used: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - # no user mapping defined - group: - type: Static - static: - value: botkube-plugins-default -``` - -It is equivalent to: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static - static: - value: botkube-internal-static-user - group: - type: Static - static: - value: botkube-plugins-default -``` - -#### Defaults for Botkube Cloud - -When configuring plugin on Botkube Cloud, the "Default" permissions mean that the `botkube-plugins-default` group will be used, which have read-only access to Kubernetes API and is configured during Botkube installation. See the [Default configuration](#default-configuration) section. - -![Cloud RBAC defaults](./assets/cloud-rbac-default.png) - -## Examples - -This paragraph contains examples of RBAC configuration for different use cases. - -:::tip -You can use `rbac.groups` or `extraObjects` overrides during Botkube installation to create custom RBAC resources. See the [`values.yaml`](https://github.com/kubeshop/botkube/blob/v1.7.0/helm/botkube/values.yaml) for more details. -::: - -### Kubectl executor with read-only Pod access based on static group mapping - -In this example an executor plugin is defined with static RBAC that maps to group `read-pods`. - -1. Consider the following Botkube config: - - ```yaml - # ... - executors: - "kubectl-read-only": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - group: - type: Static - static: - values: [read-pods] - ``` - -Let's assume this plugin is bound to at least one channel. - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: kubectl-read-pods - rules: - - apiGroups: [""] - resources: ["pods"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: kubectl-read-pods - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kubectl-read-pods - subjects: - - kind: Group - name: read-pods # <-- this is the group name used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, when this executor plugin is invoked, Botkube generates a kubeconfig impersonating group `read-pods` and passes it to the plugin. The plugin then can authenticate with the API server with identity of group `read-pods`. In that way, the plugin can use read-only operations on Pods. - -### Kubernetes source plugin with read-only access based on static user mapping - -In this example a single source plugin is defined with static RBAC that maps to user `kubernetes-read-only`. - -1. Consider the following Botkube config: - - ```yaml - sources: - "kubernetes": - botkube/kubernetes@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static - static: - value: kubernetes-read-only - ``` - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: reader - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: reader - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: reader - subjects: - - kind: User - name: kubernetes-read-only # <-- this is the username used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, the source plugin can access all Kubernetes resources with read-only permissions. - -### Kubectl executor plugin with different permissions based on channel name mapping - -In this example **kubectl** executor plugin is configured with channel name mapping and bound to two channels, `ch-1` and `ch-2`. In Kubernetes RBAC resources, group `ch-1` is given write access, while group `ch-2` is given only read access. - -1. Consider the following Botkube config: - - ```yaml - executors: - "kubectl": - botkube/kubectl@v1: - # ... - enabled: true - context: - rbac: - group: - type: ChannelName - communications: - "default-group": - socketSlack: - enabled: true - # ... - channels: - "ch-1": - name: ch-1 - bindings: - executors: - - kubectl - "ch-2": - name: ch-2 - bindings: - executors: - - kubectl - # ... - ``` - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: editor - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list", "update", "create", "delete"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: editor - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: editor - subjects: - - kind: Group - name: ch-1 # <-- channel name used in Botkube config - apiGroup: rbac.authorization.k8s.io - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: read-only - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: read-only - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: read-only - subjects: - - kind: Group - name: ch-2 # <-- channel name used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, users in channel `ch-1` can execute all kubectl commands, while users in channel `ch-2` can only execute read-only commands. - -## Limitations - -This paragraph contains limitations of the current implementation. - -### Shared file system - -Botkube runs plugin processes in the same container within the same Pod. Therefore, all plugins share the same file system. - -If you're a plugin developer and decide to write kubeconfig to the file system, be aware -that it can be accessible by all plugins in the container. - -### RBAC configuration merging - -The same executor plugins with different RBAC configuration cannot be bound to the same channel. This is validated during Botkube startup and will result in an error. - -For example, the following configuration is invalid: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - # ... - channels: - "ch-1": - name: ch-1 - bindings: - executors: - - kubectl - - kubectl-read-only -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: # Different RBAC configuration - group: - type: ChannelName - "kubectl-read-only": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: # Different RBAC configuration - user: - type: Static - static: - value: kubectl-read-only -``` - -### Supported RBAC mappings - -While Executor plugins support multiple mapping types, there are the following limitations: - -- Source plugins support only the `Static` mapping. -- Automated [actions](../usage/automated-actions.md) support only the `Static` mapping. - -## Troubleshooting - -In most cases troubleshooting Botkube RBAC issues means [troubleshooting Kubernetes RBAC](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access), where `kubectl auth` command can help. - -If you see the following error: - -``` -Error: create: failed to create: secrets is forbidden: User "botkube-internal-static-user" cannot create resource "secrets" in API group "" in the namespace "default" -``` - -that means the RBAC rules configured for a given plugin are insufficient in a given context. - -Firstly, ensure what user/group is used for impersonation. To do that, check your configuration against the mapping description from the [Configuration](#configuration) section. - -### Checking available actions for a given user/group - -After obtaining proper user and group, use the following command to list all available actions for a given user and/or group: - -```shell -kubectl auth can-i --as {user} --as-group {group} --list -``` - -For example, to list all available actions for user `botkube-internal-static-user` and group `private-channel` use: - -```shell -kubectl auth can-i --as botkube-internal-static-user --as-group private-channel --list -``` - -### Checking if a given user/group can perform a given action - -To verify if a given user and/or group can perform a given action, use: - -```shell -kubectl auth can-i get pod -n botkube --as {user} --as-group {group} -``` - -For example, to verify if user `botkube-internal-static-user` and group `private-channel` can get Secret in namespace `botkube` use: - -```shell -kubectl auth can-i get secret -n botkube --as botkube-internal-static-user --as-group private-channel -``` - -## Plugin development - -If you are a plugin developer and want to learn how to use generated kubeconfig in the plugin codebase, refer to [Using kubeconfig](../plugin/using-kubeconfig.md) document. diff --git a/versioned_docs/version-1.7/configuration/source/argocd.md b/versioned_docs/version-1.7/configuration/source/argocd.md deleted file mode 100644 index a02bd141..00000000 --- a/versioned_docs/version-1.7/configuration/source/argocd.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -id: argocd -title: ArgoCD -sidebar_position: 5 ---- - -ArgoCD source plugin sends events from ArgoCD to configured communication platforms. During startup, the plugin configures ArgoCD webhooks, triggers, templates and subscriptions based on the [ArgoCD Notification Catalog](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/catalog/). -It uses native [ArgoCD notifications](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/triggers/) configuration to send the events to Botkube communication platforms. - -The plugin is hosted in the official Botkube plugin repository. To enable the GitHub plugin, ensure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml -``` - -## Prerequisite elevated RBAC permissions - -ArgoCD plugin requires specific RBAC permissions. If you use Botkube self-hosted installation in version 1.4.1 or newer, you can create them during Botkube install/upgrade by specifying `--set="rbac.groups.argocd.create=true"` override. - -However, you can also create them manually: - -```shell -cat > /tmp/argocd-rbac.yaml << ENDOFFILE ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: argocd -rules: - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "update"] - - apiGroups: ["argoproj.io"] - resources: ["applications"] - verbs: ["get", "patch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: argocd -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: argocd -subjects: -- kind: Group - name: argocd - apiGroup: rbac.authorization.k8s.io -ENDOFFILE - -kubectl apply -f /tmp/argocd-rbac.yaml -``` - -Next, use the `argocd` group in the plugin RBAC configuration: - -```yaml -"argocd": - botkube/argocd: - enabled: true - config: - # ... - context: - rbac: - group: - type: Static - static: - values: ["argocd"] -``` - -## Enabling plugin - -:::note -In order to enable the plugin, ArgoCD has to be already installed on the cluster and all watched Applications need to be created. - -Also, remember to create RBAC resources for the plugin. See the [Elevated RBAC permissions required](#prerequisite-elevated-rbac-permissions) section. -::: - -To enable the ArgoCD plugin and watch a single ArgoCD Application named `guestbook` in `argocd` Namespace, add the following flag to the Botkube [`install` command](../../cli/commands/botkube_install.md): - -```sh ---set 'sources.argocd.botkube/argocd.enabled'=true \ ---set='rbac.groups.argocd.create'=true \ # flag available in Botkube 1.4.1+ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[0].name'=guestbook \ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[0].namespace'=argocd -``` - -You can watch multiple ArgoCD Applications by specifying `config.defaultSubscriptions.applications[n]` values, such as: - -```sh ---set 'sources.argocd.botkube/argocd.enabled'=true \ ---set='rbac.groups.argocd.create'=true \ # flag available in Botkube 1.4.1+ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[0].name'=first-app \ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[0].namespace'=first-app-ns \ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[1].name'=second-app \ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[1].namespace'=second-app-ns -``` - -## Syntax - -### Basic configuration - -This section lists all basic configuration options for the ArgoCD source plugin. The ArgoCD notification config is created automatically during plugin startup and uses triggers and templates based on the [ArgoCD Notification Catalog](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/catalog/). - -```yaml -sources: - "argocd": - botkube/argocd: - enabled: true - context: - rbac: - group: - type: Static - static: - values: ["argocd"] - # Config contains configuration for ArgoCD source plugin. - # This section lists only basic options, and uses default triggers and templates - # which are based on ArgoCD Notification Catalog ones (https://github.com/argoproj/argo-cd/blob/master/notifications_catalog/install.yaml). - # Advanced customization (including triggers and templates) is described in the documentation. - config: - defaultSubscriptions: - # -- Provide application name and namespace to subscribe to all events for a given application. - applications: - - name: "guestbook" - namespace: "argocd" - argoCD: - # ArgoCD UI base URL. It is used for generating links in the incoming events. - uiBaseUrl: http://localhost:8080 - # ArgoCD Notifications ConfigMap reference. - notificationsConfigMap: - name: argocd-notifications-cm - namespace: argocd -``` - -### Advanced configuration - -You can customize all triggers, templates, webhook registration and more. For advanced properties, see the [`default-config.yaml`](https://github.com/kubeshop/botkube/blob/main/internal/source/argocd/default-config.yaml) file. - -## Cleanup - -When you disable the plugin, it won't revert all changes made during the plugin startup. To clean up all ArgoCD follow the manual steps: - -- Clean up ArgoCD Notifications ConfigMap. It is usually named `argocd-notifications-cm` in the `argocd` Namespace. - - Remove all properties that contains `b-` or `botkube-` prefixes in the name. - - - Webhook property name follows the syntax `service.webhook.{webhook-name}`. For example, the `service.webhook.b-784e` property was created by Botkube. - - Template property name follows the syntax `template.{template-name}`. For example, the `template.template.botkube-argocd-ch05k-app-health-degraded` property was created by Botkube. - - Trigger property name follows the syntax `trigger.{trigger-name}`. For example, the `trigger.b-372839f86ed61c4c88` property was created by Botkube. - -- Remove all `argocd.argoproj.io/notifications` annotations from ArgoCD Applications which contain `b-` prefix in the trigger and webhook names. - - The annotation key pattern is `notifications.argoproj.io/subscribe.{trigger-name}.{webhook-name}`. For example, the annotation `notifications.argoproj.io/subscribe.b-5cc4c004df01230f72.b-efc0: ""` was created by Botkube and it should be deleted if the plugin is disabled. diff --git a/versioned_docs/version-1.7/configuration/source/github-events.md b/versioned_docs/version-1.7/configuration/source/github-events.md deleted file mode 100644 index 5cb027f7..00000000 --- a/versioned_docs/version-1.7/configuration/source/github-events.md +++ /dev/null @@ -1,250 +0,0 @@ ---- -id: github-events -title: GitHub Events -sidebar_position: 4 ---- - -The Botkube GitHub Events source sends events for configured GitHub repositories. These events can be sent to communication channels or actions. To learn how to bind sources to communication channels or actions, refer to the [Communication](../communication/index.md) and [Action](../action.md) documents. - -The GitHub Events plugin is hosted in the official Botkube plugin repository. To enable the GitHub plugin, ensure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable the GitHub plugin, add the following flag to the Botkube [`install` command](../../cli/commands/botkube_install.md): - -```sh ---set 'sources.github.botkube/github-events.enabled'=true -``` - -## Syntax - -```yaml -# Map of sources. The `sources` property name is an alias for a given configuration. -# Key name is used as a binding reference. -# -# Format: sources.{alias} -sources: - "github": - botkube/github-events: # Plugin name syntax: /[@]. 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. - # Logger configuration settings. - log: - level: info - format: json - - # GitHub client configuration settings. - github: - # Auth allows you to set either PAT or APP credentials. - # If none provided then watch functionality could not work properly, e.g. you can reach the API calls quota or if you are setting GitHub Enterprise base URL then an unauthorized error can occur. - auth: - # The GitHub access token. - # Instruction for creating a token can be found here: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token. - accessToken: your-github-token - # AppConfig represents the GitHub App configuration. - # This replaces the AccessToken. - app: - # GitHub App ID for authentication. - id: "" - - # GitHub App Installation ID. - installationId: "" - - # GitHub App private key in PEM format. - privateKey: "" - # The GitHub base URL for API requests. Defaults to the public GitHub API, but can be set to a domain endpoint to use with GitHub Enterprise. - # Default: https://api.github.com/ - baseUrl: "" - - # The GitHub upload URL for uploading files. It is taken into account only when the BaseURL is also set. If only the BaseURL is provided then this parameter defaults to the BaseURL value. - # Default: https://uploads.github.com/ - uploadUrl: "" - - # refreshDuration defines how often we should call GitHub REST API to check repository events. - # It's the same for all configured repositories. For example, if you configure 5s refresh time, and you have 3 repositories registered, - # we will execute maximum 2160 calls which easily fits into PAT rate limits. - # You can create multiple plugins configuration with dedicated tokens to have the rate limits increased. - # - # NOTE: - # - we use conditional requests (https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#conditional-requests), so if there are no events the call doesn't count against your rate limits.\ - # - if you configure file pattern matcher for merged pull request events we execute one more additional call to check which files were changed in the context of a given pull request - # - # Rate limiting: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting - refreshDuration: 10s - - repositories: - - name: owner/repo1 - on: - pullRequests: - - types: [open, merged] # Allowed pull request types (open, closed, merged). - paths: - # Included file patterns for pull request changes. - include: ["kustomize/.*"] - # Excluded file patterns for pull request changes. - # exclude: [ '.*\.js' ] - labels: - # Included labels for pull requests. - include: ["bug"] - # Excluded labels for pull requests. - # exclude: [ 'enhancement' ] - notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " - - - name: owner/repo2 - on: - # EventsAPI watches for /events API containing events triggered by activity on GitHub. - # This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. - # source: https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events - events: - # WatchEvent for now emitted only when someone stars a repository. - # https://docs.github.com/en/webhooks-and-events/events/github-event-types#watchevent - - type: "WatchEvent" - - # IssuesEvent with json path filter - - type: "IssuesEvent" - # The JSONPath expression to filter events - jsonPath: ".action" - # The value to match in the JSONPath result - value: "opened" - notificationTemplate: - previewTpl: |- - Issue Opened - - #{{ .Issue.Number }} {{ .Issue.Title }} - State: {{ .Issue.State }} - extraButtons: - - displayName: Open - url: "{{ .Issue.HTMLURL }}" - style: primary -``` - -## Authorization - -You can use either a [personal access token](#github-personal-access-token) or a [GitHub App](#github-app) for authentication. -By using GitHub Apps, you can increase your maximum rate limits because multiple GitHub Apps are independent and do not share the rate limits. However, using multiple Personal Access Tokens (PATs) for the same account will result in sharing the same rate limit. - -### GitHub personal access token - -Follow the instructions [here](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token) to create a token. The required scope differs for public and private repositories. - -### GitHub App - -To use a GitHub App: - -1. [Create a GitHub App](https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app). No callback or webhook URL is needed. -2. Add read-only permission to the "Members" item of organization permissions. -3. [Install the app in your organization](https://docs.github.com/en/developers/apps/managing-github-apps/installing-github-apps). -4. Done! Use the following details for authentication: - - | Name | Description | - | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | GitHub App Private Key | PEM-format key generated when the app is installed. If you lost it, you can regenerate it ([docs](https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key)). | - | GitHub App ID | Found in the app's "About" page (Organization settings -> Developer settings -> Edit button on your app). | - | GitHub App Installation ID | Found in the URL your organization's app install page (Organization settings -> Github Apps -> Configure button on your app). It's the last number in the URL, ex: `https://github.com/organizations/{my-org}/settings/installations/1234567890`. | - -## Subscriptions - -The GitHub Events source plugin uses polling instead of Webhook endpoint for retrieving GitHub events. It calls two types of GitHub REST API endpoints with a configured refresh time window: - -- [`/repos/{owner}/{repo}/events`](https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events) for `on.events` configuration -- [`/repos/{owner}/{repo}/pulls`](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests) for `on.pullRequests` configuration - -By default, we use [conditional requests](https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#conditional-requests) to prevent excessive API calls. As a result, from `on.pullRequests` triggers may have up to a 60-second delay due to caching. - -### Pull requests - -For a configured `refreshDuration` we call the [`/repos/{owner}/{repo}/pulls`](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests) endpoint for all registered repositories. It's configured to fetch 100 pull requests that were recently modified. We ignore all events that were already processed. - -#### Matching criteria - -If no matching criteria are specified, all pull requests will be reported. For example: - -```yaml -repositories: - - name: owner/repo1 - on: - pullRequests: [] -``` - -To narrow down emitted events, you can specify at least one of the available criteria: - -- `types`: This is a list of pull request types for which the event should be triggered. The allowed types are: `open`, `closed`, `merged`. - -- `paths.include`: This is a list of file patterns for which the event should be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `["kustomize/.*"]`. - -- `paths.exclude`: This is a list of file patterns for which the event should not be triggered. It also supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `['.*\.js']`. This exclusion criteria takes precedence over `paths.include`. - -- `labels.include`: This is a list of label patterns for which the event should be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `["backend-.*"]`. - -- `labels.exclude`: This is a list of label patterns for which the event should not be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `['bug']`. This exclusion criteria takes precedence over `labels.include`. - -#### Templating - -You can customize the notification template with additional buttons: - -```yaml -notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " -``` - -For the `commandTpl` you can use all fields that are available on [`pullRequest`](https://github.com/google/go-github/blob/899235e0a9d750d6fecf9048a676046d50f9d4a3/github/pulls.go#L29-L85) type. - -### Events - -For a configured `refreshDuration` we call the [`/repos/{owner}/{repo}/events`](https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events) endpoint for all registered repositories. - -:::note -This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. -::: - -The Events API covers various event types. Refer to the [GitHub event types](https://docs.github.com/en/webhooks-and-events/events/github-event-types) page for more information. - -#### Matching criteria - -To retrieve relevant events, you must define at least one entry within the `events` property. For instance: - -```yaml -events: - - type: "WatchEvent" -``` - -If you provide an empty list `events: []`, no events will be emitted. For more precise filtering of events, you can optionally use JSONPath along with the event type to filter based on specific criteria within the event payload. - -#### Templating - -The available fields for templating differ based on the event type. Refer to the [google/go-github](https://github.com/google/go-github/tree/899235e0a9d750d6fecf9048a676046d50f9d4a3/github) repository for dedicated event types. - -For instance, you can add an "Open" button to an `IssuesEvent` template: - -```yaml -events: - # IssuesEvent with json path filter - - type: "IssuesEvent" - # The JSONPath expression to filter events - jsonPath: ".action" - # The regex value to match in the JSONPath result - value: "opened" - notificationTemplate: - previewTpl: |- - Issue Opened - - #{{ .Issue.Number }} {{ .Issue.Title }} - State: {{ .Issue.State }} - extraButtons: - - displayName: Open - url: "{{ .Issue.HTMLURL }}" - style: primary -``` - -Here, the `jsonPath` field specifies the JSONPath expression to filter events, and the value field defines the regex value to match within the JSONPath result. This combination helps narrow down reported events based on specific conditions within the event payload. diff --git a/versioned_docs/version-1.7/configuration/source/index.md b/versioned_docs/version-1.7/configuration/source/index.md deleted file mode 100644 index ce86807c..00000000 --- a/versioned_docs/version-1.7/configuration/source/index.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -id: source -title: Source -sidebar_position: 1 ---- - -The source configuration allows you to define multiple source configurations that can be later referred in [communication](../communication) bindings. For example, take a look at such source definition: - -```yaml -sources: - "k8s-recommendation-alerts": # This is a source configuration name, which is referred in communication bindings. - botkube/kubernetes: - # ... trimmed ... - - "prometheus-firing-alerts": # This is a source configuration name, which is referred in communication bindings. - botkube/prometheus: - # ... trimmed ... -``` - -This can be later used by the communication platforms: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - bindings: - sources: # The order is important for merging strategy. - - k8s-recommendation-events # The source configuration name - - prometheus-firing-events # The source configuration name - # ... trimmed ... -``` - -To use the Botkube source plugins, first you need to define the plugins repository under the `plugins` property: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Next, you can configure source from a given repository: - -```yaml -sources: - "plugins": - repo-name/source-name@v1.0.0: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} -``` - -For all source configuration properties, see the [**syntax**](#syntax) section. - -#### Restart Policy and Health Check Interval - -This section of the configuration allows you to configure the restart policy for the Botkube source plugins. The restart policy is used when the source 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 source plugins. The default health check interval is 10 seconds. The health check interval can be configured with the following property: - -- `healthCheckInterval` - health check interval. - -```yaml -# -- 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 - -```yaml -# Map of sources. The `sources` property name is an alias for a given configuration. -# Key name is used as a binding reference. -# -# Format: sources.{alias} -sources: - "prom": - botkube/prometheus@v1.7.0: # Plugin name syntax: /[@]. 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. - url: "http://localhost:9090" - - "k8s-recommendation-events": - # Built-in kubernetes source configuration. - botkube/kubernetes: - enabled: true - config: - # Kubernetes configuration - recommendations: - pod: - noLatestImageTag: true - # ... trimmed ... - -# 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.7.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](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.7/configuration/source/keptn.md b/versioned_docs/version-1.7/configuration/source/keptn.md deleted file mode 100644 index 88432d73..00000000 --- a/versioned_docs/version-1.7/configuration/source/keptn.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: keptn -title: Keptn -sidebar_position: 4 ---- - -The Botkube Keptn source plugin allows you to consume events from Keptn deployment and notify in configured platforms. - -The Keptn plugin is hosted by the official Botkube plugin repository. To enable the Keptn plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable Keptn plugin, add `--set 'sources.keptn.botkube/keptn.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). - -## Syntax - -```yaml -# Map of sources. The `sources` property name is an alias for a given configuration. -# Key name is used as a binding reference. -# -# Format: sources.{alias} -sources: - "keptn": - botkube/keptn: # Plugin name syntax: /[@]. 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. - project: "" # Keptn project name - url: "http://api-gateway-nginx.keptn" # Keptn API Gateway to fetch events. - token: "" # Keptn API Token to authenticate API Gateway to fetch events. -``` diff --git a/versioned_docs/version-1.7/configuration/source/kubernetes.md b/versioned_docs/version-1.7/configuration/source/kubernetes.md deleted file mode 100644 index 1fab7458..00000000 --- a/versioned_docs/version-1.7/configuration/source/kubernetes.md +++ /dev/null @@ -1,579 +0,0 @@ ---- -id: kubernetes -title: Kubernetes -sidebar_position: 2 ---- - -A `kubernetes` source plugin produces events for configured Kubernetes resources. These events can be sent to communication channels or actions. To learn how to bind sources to communication channels or actions, read the Communication and Action documents. - -## Enabling source - -To enable Kubernetes source, add `--set 'sources.{configuration-name}.botkube/kubernetes.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). - -## Event and resource constraints - -Define constraints for Kubernetes events to narrow down the events you want to receive. - -You can define both global constraints, that are applied to all resources within a given source, and also resource-specific constraints, which override global constraints. See the [Syntax](#syntax) paragraph for more details. - -There are multiple types of constraints. Each constraint type is described in the following sections. - -### Namespaces - -Include and/or exclude namespaces to watch. You can use exact values or regex expressions to specify namespaces. - -Exclude takes precedence over include. If a given namespace is excluded, it will be ignored, even if it included. - -**Examples** - -To watch all namespaces except those with `testing-` prefix, use the following constraint: - -```yaml -namespaces: - include: - - ".*" # include all... - exclude: - - "testing-.*" # ...except any namespace that has `testing-` prefix -``` - -To watch only `dev` and `prod` namespaces, use the following constraint: - -```yaml -namespaces: - include: - - "dev" - - "prod" - exclude: [] -``` - -### Labels - -Specify exact match for resource labels. The watched resources must have all the specified labels. - -**Example** - -```yaml -labels: # Match only the resources that have all the specified labels - app: "my-app" - environment: "production" -``` - -### Annotations - -Specify exact match for resource annotations. The watched resources must have all the specified annotations. - -**Example** - -```yaml -annotations: # Match only the resources that have all the specified annotations. - app: "my-app" - my-annotation: "true" -``` - -### Resource name - -Filter events based on the resource name. If not defined, all resource names are matched. -Exclude takes precedence over include. If a given resource name is excluded, it will be ignored, even if it included. - -You can use both exact values and regex expressions to specify resource names. This constraint can be set per resource only. See the [Syntax](#syntax) paragraph for more details. - -**Examples** - -To match resource names that have `testing-` prefix, use the following constraint: - -```yaml -name: - include: - - "testing-.*" # include only resource names that have `testing-` prefix - exclude: [] -``` - -To match all resources except those that have `testing-` prefix, use the following constraint: - -```yaml -name: - include: - - ".*" # include all resource names... - exclude: - - "testing-.*" # ...except those that have `testing-` prefix -``` - -### Event types - -List the event types to watch. - -Possible values: - -- `create`, -- `update`, -- `delete`, -- `error`, -- `all`, which is equal to all of the above. - -**Example** - -```yaml -event: - types: # watch for create, delete and error events - - create - - delete - - error -``` - -### Event reason - -Define exact values or regex expression to match the event reason. If not defined, all events are watched. -Exclude takes precedence over include. If a given event reason is excluded, it will be ignored, even if it included. - -**Examples** - -To match events with reason equal to `BackOff`, use the following constraint: - -```yaml -event: - reason: - include: - - "^BackOff$" # match events with reason equal to `BackOff` - exclude: [] -``` - -To match all events except those with reason equal to `BackOff`, use the following constraint: - -```yaml -event: - reason: - include: - - ".*" # match all event reasons... - exclude: - - "^BackOff$" # ...except those equal to `BackOff` -``` - -### Event message - -Define regex expression to match the event message. If not defined, all event messages are matched. - -Exclude takes precedence over include. If a given event message is excluded, it will be ignored, even if it included. - -**Example** - -To match events with message starting with `Back-off`, use the following constraint: - -```yaml -event: - message: - include: - - "^Back-off.*" # match all events with message starting with `Back-off` - exclude: [] -``` - -To match all events except those with message starting with `Back-off`, use the following constraint: - -```yaml -event: - message: - include: - - ".*" # match all event messages... - exclude: - - "^Back-off.*" # ...except those starting with `Back-off` -``` - -### Recommendations - -You can configure recommendations related to Kubernetes resources. Recommendations respect [namespaces](#namespaces) constraint regex patterns. - -Currently, Kubernetes source plugin can send recommendation about 2 resources: `Pods` and `Ingresses`. - -**Example** - -In order to send recommendation for the Pods that have containers with `latest` tag or the Pods without labels, use the following configuration. - -```yaml -recommendations: - # Recommendations for Pod Kubernetes resource. - pod: - # If true, notifies about Pod containers that use `latest` tag for images. - noLatestImageTag: true - # If true, notifies about Pod resources created without labels. - labelsSet: true -``` - -If you want to receive recommendations for Ingress that contains invalid backend service definition or TLS secret, use the following configuration. - -```yaml -recommendations: - # Recommendations for Ingress Kubernetes resource. - ingress: - # If true, notifies about Ingress resources with invalid backend service reference. - backendServiceValid: true - # If true, notifies about Ingress resources with invalid TLS secret reference. - tlsSecretValid: true -``` - -### Filters - -The filter configuration allows you to configure filters which are used for all processed Kubernetes events. - -```yaml -# Filter settings for various sources. -# Currently, all filters are globally enabled or disabled. -# You can enable or disable filters with `@Botkube filters` commands. -filters: - kubernetes: - # If true, enables support for `botkube.io/disable` resource annotations. - objectAnnotationChecker: true - # If true, filters out Node-related events that are not important. - nodeEventsChecker: true -``` - -## Syntax - -```yaml -# Map of sources. Source contains configuration for Kubernetes events and sending recommendations. -# The property name under `sources` object is an alias for a given configuration. You can define multiple sources configuration with different names. -# Key name is used as a binding reference. -# See the `values.yaml` file for full object. -# -## Format: sources.{alias} -sources: - "k8s-recommendation-events": - displayName: "Kubernetes Recommendations" - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes configuration for various recommendation insights. - recommendations: - # Recommendations for Pod Kubernetes resource. - pod: - # If true, notifies about Pod containers that use `latest` tag for images. - noLatestImageTag: true - # If true, notifies about Pod resources created without labels. - labelsSet: true - # Recommendations for Ingress Kubernetes resource. - ingress: - # If true, notifies about Ingress resources with invalid backend service reference. - backendServiceValid: true - # If true, notifies about Ingress resources with invalid TLS secret reference. - tlsSecretValid: true - - "k8s-all-events": - displayName: "Kubernetes Info" - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # -- Logging configuration - log: - # -- Log level - level: info - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: &k8s-events-namespaces - # Include contains a list of allowed Namespaces. - # It can also contain regex expressions: - # `- ".*"` - to specify all Namespaces. - include: - - ".*" - # Exclude contains a list of Namespaces to be ignored even if allowed by Include. - # It can also contain regex expressions: - # `- "test-.*"` - to specif all Namespaces with `test-` prefix. - # Exclude list is checked before the Include list. - # exclude: [] - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - create - - delete - - error - # Optional list of exact values or regex patterns to filter events by event reason. - # Skipped, if both include/exclude lists are empty. - reason: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - # Optional list of exact values or regex patterns to filter event by event message. Skipped, if both include/exclude lists are empty. - # If a given event has multiple messages, it is considered a match if any of the messages match the constraints. - message: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - - # Filters Kubernetes resources to watch by annotations. Each resource needs to have all the specified annotations. - # Regex expressions are not supported. - annotations: {} - # Filters Kubernetes resources to watch by labels. Each resource needs to have all the specified labels. - # Regex expressions are not supported. - labels: {} - - # Describes the Kubernetes resources to watch. - # Resources are identified by its type in `{group}/{version}/{kind (plural)}` format. Examples: `apps/v1/deployments`, `v1/pods`. - # Each resource can override the namespaces and event configuration by using dedicated `event` and `namespaces` field. - # Also, each resource can specify its own `annotations`, `labels` and `name` regex. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - # namespaces: # Overrides 'source'.kubernetes.namespaces - # include: - # - ".*" - # exclude: [] - # annotations: {} # Overrides 'source'.kubernetes.annotations - # labels: {} # Overrides 'source'.kubernetes.labels - # # Optional resource name constraints. - # name: - # # Include contains a list of allowed values. It can also contain regex expressions. - # include: [] - # # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # # Exclude list is checked before the Include list. - # exclude: [] - # event: - # # Overrides 'source'.kubernetes.event.reason - # reason: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.message - # message: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.types - # types: - # - create - - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/persistentvolumes - - type: v1/persistentvolumeclaims - - type: v1/configmaps - - type: rbac.authorization.k8s.io/v1/roles - - type: rbac.authorization.k8s.io/v1/rolebindings - - type: rbac.authorization.k8s.io/v1/clusterrolebindings - - type: rbac.authorization.k8s.io/v1/clusterroles - - type: apps/v1/daemonsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.numberReady - - type: batch/v1/jobs - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.conditions[*].type - - type: apps/v1/deployments - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.availableReplicas - - type: apps/v1/statefulsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.readyReplicas - ## Custom resource example - # - type: velero.io/v1/backups - # namespaces: - # include: - # - ".*" - # exclude: - # - - # event: - # types: - # - create - # - update - # - delete - # - error - # updateSetting: - # includeDiff: true - # fields: - # - status.phase - # List of available commands that can be used in actionable items under kubernetes events. - commands: - # -- Configures which verbs are available in actionable items. - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - # -- Configure which resources are available in actionable items. - resources: - [ - "deployments", - "pods", - "namespaces", - "daemonsets", - "statefulsets", - "storageclasses", - "nodes", - "configmaps", - "services", - "ingresses", - ] - # -- Filter settings for various sources. - # Currently, all filters are globally enabled or disabled. - # You can enable or disable filters with `@Botkube enable/disable filters` commands. - # @default -- See the `values.yaml` file for full object. - filters: - kubernetes: - # -- If true, enables support for `botkube.io/disable` resource annotations. - objectAnnotationChecker: true - # -- If true, filters out Node-related events that are not important. - nodeEventsChecker: true - - "k8s-err-events": - displayName: "Kubernetes Errors" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - error - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/persistentvolumes - - type: v1/persistentvolumeclaims - - type: v1/configmaps - - type: rbac.authorization.k8s.io/v1/roles - - type: rbac.authorization.k8s.io/v1/rolebindings - - type: rbac.authorization.k8s.io/v1/clusterrolebindings - - type: rbac.authorization.k8s.io/v1/clusterroles - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs - - "k8s-err-with-logs-events": - displayName: "Kubernetes Errors for resources with logs" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - error - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs - # `apps/v1/replicasets` excluded on purpose - to not show logs twice for a given higher-level resource (e.g. Deployment) - - "k8s-create-events": - displayName: "Kubernetes Resource Created Events" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - create - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/configmaps - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs - - "prometheus": - ## Prometheus source configuration - ## Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - botkube/prometheus: - # If true, enables `prometheus` source. - enabled: false - config: - # Prometheus endpoint without api version and resource. - url: "http://localhost:9090" - # If set as true, Prometheus source plugin will not send alerts that is created before plugin start time. - ignoreOldAlerts: true - # Only the alerts that have state provided in this config will be sent as notification. https://pkg.go.dev/github.com/prometheus/prometheus/rules#AlertState - alertStates: ["firing", "pending", "inactive"] - # Logging configuration - log: - # Log level - level: info -``` - -The default configuration for Helm chart can be found in [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml). diff --git a/versioned_docs/version-1.7/configuration/source/prometheus.md b/versioned_docs/version-1.7/configuration/source/prometheus.md deleted file mode 100644 index 3aed005b..00000000 --- a/versioned_docs/version-1.7/configuration/source/prometheus.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -id: prometheus -title: Prometheus -sidebar_position: 3 ---- - -The Botkube Prometheus source plugin allows you to fetch alerts from AlertManager of Prometheus deployment and notify in configured platforms. - -The Prometheus plugin is hosted by the official Botkube plugin repository. To enable the Prometheus plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.7.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable Prometheus plugin, add `--set 'sources.prometheus.botkube/prometheus.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). - -## Syntax - -```yaml -# Map of sources. The `sources` property name is an alias for a given configuration. -# Key name is used as a binding reference. -# -# Format: sources.{alias} -sources: - "prom": - botkube/prometheus: # Plugin name syntax: /[@]. 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. - url: "http://localhost:9090" # Prometheus host to fetch alerts via Prometheus HTTP API - alertStates: ["firing", "pending", "inactive"] # Provided alert states will overwrite default values. For example, Prometheus plugin will notify for only `firing` alerts if `alertStates` is `["firing"]`. - ignoreOldAlerts: true # If set to true, only the alerts that active since Botkube deployment start time. Otherwise, plugin will fetch all the alerts available in AlertManager on Botkube start. -``` - -## Merging strategy - -For all collected `prometheus` sources bindings, configuration properties are overridden based on the order of the binding list. The priority is given to the last binding specified on the list. Empty properties are omitted. - -### Example - -Consider such configuration: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - name: "random" - bindings: - sources: - - prometheus-one - - prometheus-two - - prometheus-three - -sources: - "prometheus-one": - botkube/prometheus: - enabled: true - config: - url: "http://localhost:9090" - ignoreOldAlerts: false - alertStates: ["firing"] - "prometheus-two": - botkube/prometheus: - enabled: true - config: - ignoreOldAlerts: true - "prometheus-three": - botkube/prometheus: - enabled: false - config: - url: "http://localhost:9091" - ignoreOldAlerts: true - alertStates: ["inactive"] -``` - -We can see that: - -- The `ignoreOldAlerts` is set to `true` as it's overridden by the `prometheus-two` binding - the **last one** which is both enabled and sets the `ignoreOldAlerts` property. -- The `url` and `alertStates` are set to values specified by the `prometheus-one` configuration as the `prometheus-two` don't specify them. -- The `prometheus-three` binding is disabled (`botkube/prometheus.enabled` is set to `false`), so it's not taken into account. diff --git a/versioned_docs/version-1.7/examples-and-tutorials/_category_.json b/versioned_docs/version-1.7/examples-and-tutorials/_category_.json deleted file mode 100644 index fba891b9..00000000 --- a/versioned_docs/version-1.7/examples-and-tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials and examples", - "position": 2 -} diff --git a/versioned_docs/version-1.7/examples-and-tutorials/getstarted/assets/create-new-instance.png b/versioned_docs/version-1.7/examples-and-tutorials/getstarted/assets/create-new-instance.png deleted file mode 100644 index 28217273..00000000 Binary files a/versioned_docs/version-1.7/examples-and-tutorials/getstarted/assets/create-new-instance.png and /dev/null differ diff --git a/versioned_docs/version-1.7/examples-and-tutorials/getstarted/assets/install-agent.png b/versioned_docs/version-1.7/examples-and-tutorials/getstarted/assets/install-agent.png deleted file mode 100644 index 3886713b..00000000 Binary files a/versioned_docs/version-1.7/examples-and-tutorials/getstarted/assets/install-agent.png and /dev/null differ diff --git a/versioned_docs/version-1.7/examples-and-tutorials/getstarted/index.md b/versioned_docs/version-1.7/examples-and-tutorials/getstarted/index.md deleted file mode 100644 index 26a7dbed..00000000 --- a/versioned_docs/version-1.7/examples-and-tutorials/getstarted/index.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: get started -title: Get Started -sidebar_position: 1 ---- - -# Get Started with Botkube in Minutes - -Welcome to Botkube! This guide will walk you through the process of setting up Botkube to send notifications and execute commands in your Kubernetes clusters directly from Slack and Microsoft Teams. - -[![Watch our video tutorial for a step-by-step walkthrough](http://img.youtube.com/vi/AGKJsNro4jE/0.jpg)](https://www.youtube.com/watch?v=AGKJsNro4jE&t=59s "Watch our video tutorial for a step-by-step walkthrough") - -## Overview - -Botkube is a Kubernetes Monitoring and Tool designed to optimize your K8s workflow by providing real-time alerts from and commands within your Kubernetes environment. With Botkube, you can receive alerts, execute commands, and stay informed about your cluster's health and status, all from your preferred communication platform. - -## Step 1: Sign up for Botkube - -Visit [botkube.io](http://botkube.io) and create an account. This account will enable you to access the Botkube Cloud Dashboard and manage your Botkube instances. - -## Step 2: Connect Your Kubernetes Cluster - -1. **Create a New Instance:** Log in to the Botkube Cloud Dashboard and select "create a new instance". - - ![Create New Instance](assets/create-new-instance.png) - -2. **Install Botkube Agent:** Follow the instructions provided on the dashboard to install the Botkube Agent on your Kubernetes cluster. You can choose either Helm or a CLI command for installation. - - ![Install Botkube Agent](assets/install-agent.png) - -## Step 3: Connect to Your Preferred Communication Platform - -Follow the instructions provided on the Botkube Cloud Dashboard to connect Botkube to your preferred communication platform, such as [Slack ](https://docs.botkube.io/installation/slack/cloud-slack)or [Microsoft Teams](https://docs.botkube.io/installation/teams/). - -## Step 4: Setting Up a Botkube Cloud Instance - -Once your Botkube instance is connected to your communication platform, you will start receiving alerts and notifications from your Kubernetes cluster. - -### Finalizing Your Botkube Cloud Instance - -1. **Select Channels:** From the dashboard, choose the channels you wish to use with Botkube. -2. **Configure Plugins:** Connect your preferred plugins to enhance Botkube's functionality. -3. **Set Preferences:** Review and select your preferred Botkube defaults. -4. **Apply Changes:** Finalize your setup by selecting "Apply changes." - -## Step 5: Start Receiving Alerts - -Congratulations! You're now ready to start using Botkube to streamline your Kubernetes workflow and stay informed about your cluster's status. If you encounter any issues or need further assistance, feel free to reach out to our community on [Slack](https://join.botkube.io/) or [schedule a call with one of our team](https://calendly.com/d/274-ytm-6mk/chat-with-the-botkube-team-30-minutes). Happy Monitoring! diff --git a/versioned_docs/version-1.7/examples-and-tutorials/index.mdx b/versioned_docs/version-1.7/examples-and-tutorials/index.mdx deleted file mode 100644 index 589a111f..00000000 --- a/versioned_docs/version-1.7/examples-and-tutorials/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -id: overview -title: Overview -sidebar_position: 1 ---- - -import { CardTutorial } from "@site/src/components/Card/Tutorial"; - -# Welcome to Botkube Examples & Tutorials - -
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
diff --git a/versioned_docs/version-1.7/examples-and-tutorials/integrations/index.md b/versioned_docs/version-1.7/examples-and-tutorials/integrations/index.md deleted file mode 100644 index 0228021b..00000000 --- a/versioned_docs/version-1.7/examples-and-tutorials/integrations/index.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -id: integrations -title: Integrations -sidebar_position: 4 ---- - -# 🛠 Integrations - -## Communication Platforms - -- [Microsoft Teams](https://botkube.io/integration/teams): Seamlessly manage Kubernetes and collaborate within your team using Botkube's integration with Microsoft Teams -- [Slack](https://botkube.io/integration/slack): Enhance your Kubernetes management by receiving notifications and interacting with clusters directly from Slack channels through Botkube. -- [Discord](https://botkube.io/integration/discord): Stay on top of Kubernetes events and streamline your operations by integrating Botkube with Discord. -- [Mattermost](https://botkube.io/integration/mattermost): Keep your team informed about Kubernetes events and receive alerts directly within your Mattermost instance with Botkube integration. - -## Source Plugins - -- [Kubernetes Events](https://botkube.io/learn/how-botkube-makes-monitoring-kubernetes-easy): Effortlessly monitor Kubernetes events using Botkube's built-in source plugin. -- [ArgoCD](https://botkube.io/integration/argo-cd-botkube-kubernetes-integration): Streamline your GitOps workflows and receive notifications by using Botkube's ArgoCD plugin. -- [Prometheus](https://botkube.io/integration/prometheus): Optimize your Kubernetes Monitoring process by connecting your Prometheus metrics with Botkube. -- [Keptn](https://botkube.io/integration/keptn): Automate testing, deployment, and operations in your Kubernetes environments by using Botkube's Keptn plugin. - -## Executor Plugins - -- [Kubectl](https://docs.botkube.io/usage/executor/kubectl): Easily execute Kubernetes commands in your channels with Botkube's Kubectl integration. -- [Open AI](https://botkube.io/integration/chatgpt-botkube-kubernetes-integration): Harness the power of Open AI with Botkube's Doctor plugin for intelligent interactions and enhanced automation in your Kubernetes environment. -- [Helm](https://botkube.io/integration/helm): Manage Helm deployments and releases seamlessly with Botkube's Helm plugin. -- [Flux](https://botkube.io/integration/botkube-flux-kubernetes-integration): Use Botkube for GitOps operations with the Flux plugin. -- [Exec](https://botkube.io/integration/custom-executor-plugin): Connecting your own plugin for a tailored Kubernetes workflow with Botkube's exec plugin. diff --git a/versioned_docs/version-1.7/examples-and-tutorials/tutorials/index.md b/versioned_docs/version-1.7/examples-and-tutorials/tutorials/index.md deleted file mode 100644 index 725791b7..00000000 --- a/versioned_docs/version-1.7/examples-and-tutorials/tutorials/index.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: tutorials -title: Tutorials -sidebar_position: 2 ---- - -# 🧑‍💻Tutorials - -## Best Practices - -- [Multi-cluster Kubernetes Observability](https://botkube.io/blog/empowering-your-kubernetes-multi-cluster-observability-with-intelligent-monitoring): Explore how Botkube streamlines Kubernetes multi-cluster management for optimized performance and reliability. -- [Day 2 Operations with Flux](https://botkube.io/blog/creating-the-botkube-flux-plugin-for-day-2-operations) :Discover best practices for handling Day 2 operations in Kubernetes using Botkube's Flux plugin. - -## Features - -### Communication Platforms - -- [Microsoft Teams Integration](https://botkube.io/blog/maximize-your-devops-teams-efficiency-with-botkube-and-microsoft-teams): Learn how to integrate Botkube with Microsoft Teams for seamless communication and collaboration in Kubernetes environments. -- [Slack Integration](https://botkube.io/blog/get-botkube-running-in-under-3-minutes-the-new-slack-app): Step-by-step guide on setting up Botkube integration with Slack to receive notifications and interact with Kubernetes clusters directly. -- [Discord Integration](https://botkube.io/integration/discord): Implement Botkube integration with Discord for efficient Kubernetes operations and event management. -- [Mattermost Integration](https://botkube.io/integration/mattermost): Configure Botkube integration with Mattermost to stay updated on Kubernetes events and receive alerts within Mattermost channels. - -### Executor Plugins - -- [Kubectl Plugin Usage](https://botkube.io/learn/kubectl-cheat-sheet): Utilize Botkube's integration with Kubectl for executing Kubernetes commands conveniently. -- [Open AI Integration](https://botkube.io/blog/doctor-plug-in-tutorial): Integrate Open AI with Botkube for intelligent automation and enhanced interactions within Kubernetes environments. -- [Helm Plugin Setup](https://botkube.io/learn/helm-charts): Seamlessly manage Helm deployments and releases with Botkube's Helm integration. -- [Flux Plugin Configuration](https://botkube.io/blog/streamlining-gitops-with-the-botkube-flux-plugin): Set up and configure Botkube's Flux plugin for automated deployment and synchronization of Kubernetes resources. -- [Custom Executor Plugin Development](https://botkube.io/integration/custom-executor-plugin): Develop and integrate custom executor plugins with Botkube for tailored Kubernetes operations. - -### Source Plugins - -- [Kubernetes Events Monitoring](https://botkube.io/blog/five-essential-kubernetes-tasks): Monitor Kubernetes events effortlessly with Botkube's built-in source plugin. -- [ArgoCD Integration](https://botkube.io/blog/getting-started-with-botkube-and-argocd): Integrate Botkube with ArgoCD for streamlined continuous delivery workflows and notifications. -- [Prometheus Integration](https://botkube.io/integration/prometheus): Monitor Kubernetes clusters effectively by integrating Prometheus metrics with Botkube. -- [Keptn Integration](https://botkube.io/blog/implementing-your-own-botkube-plugin-a-real-life-use-case): Automate testing, deployment, and operations in Kubernetes environments by integrating Botkube with Keptn. diff --git a/versioned_docs/version-1.7/examples-and-tutorials/usecases/index.md b/versioned_docs/version-1.7/examples-and-tutorials/usecases/index.md deleted file mode 100644 index fa077853..00000000 --- a/versioned_docs/version-1.7/examples-and-tutorials/usecases/index.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: use cases -title: Use Cases -sidebar_position: 3 ---- - -# 🛠Use Cases - -## GitOps Integrations - -- [Flux Plugin for Day 2 Operations](https://botkube.io/blog/creating-the-botkube-flux-plugin-for-day-2-operations): Discover how Botkube's Flux plugin simplifies Day 2 operations and provides tailored solutions for various K8s management needs. -- [ArgoCD Plugin for Optimizing Collaboration & Notifications](https://botkube.io/blog/optimizing-collaboration-and-notifications-with-the-botkube-argocd-plugin): Learn about how Botkube's engineering team using the ArgoCD plugin to optimize their deployment experience. -- [Enhancing GitOps Workflows with Botkube](https://botkube.io/blog/enhancing-gitops-workflows-with-botkube): Explore Botkube's capabilities in optimizing GitOps workflows. - -## Automating the K8s Troubleshooting workflow - -- [Using Keptn as a Source](https://botkube.io/blog/implementing-your-own-botkube-plugin-a-real-life-use-case): Discover how to leverage Keptn as a source to adapt to various troubleshooting scenarios. -- [Streamlining Helm Deployments](https://botkube.io/case-studies/civo): Learn how one of Botkube's users utilizes the Botkube Helm plugin to streamline their Helm deployments and updates. -- [GitHub Issue Reporter for Failing K8s Apps](https://botkube.io/blog/build-a-github-issues-reporter-for-failing-kubernetes-apps-with-botkube-plugins): Automate the reporting of issues with your Kubernetes applications on GitHub directly from your Slack channel. -- [5 Essential DevOps tasks to Automate](https://botkube.io/blog/botkube-5-essential-devopstasks-to-automate): Discover how to automate essential DevOps tasks like resource scaling and log management with Botkube. - -## Smart Monitoring - -- [ChatGPT Plugin](https://botkube.io/blog/building-a-chatgpt-plugin-from-ideation-to-implementation): Explore Botkube's AIOps capabilities and dive into the realm of intelligent Kubernetes monitoring with the OpenAI plugin. diff --git a/versioned_docs/version-1.7/examples-and-tutorials/videos/index.md b/versioned_docs/version-1.7/examples-and-tutorials/videos/index.md deleted file mode 100644 index 6ec967d7..00000000 --- a/versioned_docs/version-1.7/examples-and-tutorials/videos/index.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: videos -title: Videos -sidebar_position: 5 ---- - -# 🎥️ Videos - -## Office Hours - -- [Developer Self-Service](https://www.youtube.com/watch?v=74qMbqWBxms&list=PL2Vye-us8_x8-IErakx_KggCC7EPWJuby&index=2) -- [Troubleshooting Kubernetes in Microsoft Teams](https://youtu.be/HaHaa9ju8Wg) -- [GitOps Practices with Flux](https://www.youtube.com/watch?v=WxkDWLqVghw&list=PL2Vye-us8_x8-IErakx_KggCC7EPWJuby) -- [Developer Productivity with Oketeo](https://www.youtube.com/watch?v=506Tc1Grj_o) -- [Botkube goes GitOps](https://www.youtube.com/watch?v=WxkDWLqVghw) -- [Kubernetes Multi-Cluster Management](https://www.youtube.com/watch?v=ZeaUfboNKfc) -- [5 Essential Kubernetes Tasks to Automate](https://www.youtube.com/watch?v=CzlSHMM_Ypc) -- [ArgoCD Workflows](https://youtu.be/1i59PN-65SY) -- [Zapier for Kubernetes](https://www.youtube.com/watch?v=VJzSRTQpHhs) - -## Community Calls - -- [Open Source Friday - ChatOps for Kubernetes](https://www.youtube.com/watch?v=tdyPuMA2mww) -- [CNCF Webinar - Unlocking the Power of Kubernetes Collaborative Troubleshooting](https://youtu.be/6VTEOOfIbIk) -- [Tailwarden - ChatOps for Kubernetes](https://youtu.be/UOURPb03mxU) -- [Kubefirst - Monitor & Act on Your Kubernetes Cluster](https://www.youtube.com/watch?v=RLmU472lync) -- [CNCF Islamabad - Unlocking K8s Troubleshooting Best Practices](https://www.youtube.com/watch?v=Ry_UijS1ZNk) -- [Cloud Lunch and Learn - K8s Troubleshooting Best Practices in Azure](https://www.youtube.com/watch?v=x0TBA6TpfqU) -- [Kunal Kushwaha - Collaborative Troubleshooting and Monitoring in K8s With Botkube](https://youtu.be/coDSM9LiOB4) - -## Botkube User Contributions - -- [Kubernetes Cluster ChatOps - Engineering with Morris](https://youtu.be/wI6nJL4dtHY) -- [Botkube (Real-Time Kubernetes Monitoring and Alerting) - Kubernetes Bangalore](https://youtu.be/Xylb7w0yZhQ) -- [Como utilizar Slack e BotKube pra se comunicar com o seu cluster Kubernetes - Fabricio Veronez](https://www.youtube.com/watch?v=FEUOnE4z2Ac) -- [Monitoring & Debugging Kubernetes Applications with BotKube - Collabnix](https://youtu.be/mZHxJjYNmKA) - -## Conference Talks - -- [GitOps Con EU - Empowering Developer Productivity with ArgoCD](https://www.youtube.com/watch?v=k4L5_zKorZ8&list=PL2Vye-us8_x_5eqYQTBq7ZywupscaW5yA) -- [Civo Navigate - Love is Blind, but Your K8s Troubleshooting Doesn’t Have to Be](https://youtu.be/nFpTXrkz3cQ) diff --git a/versioned_docs/version-1.7/installation/assets/cloud_install.png b/versioned_docs/version-1.7/installation/assets/cloud_install.png deleted file mode 100644 index 954d6cfe..00000000 Binary files a/versioned_docs/version-1.7/installation/assets/cloud_install.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/assets/cloud_instance_delete.png b/versioned_docs/version-1.7/installation/assets/cloud_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.7/installation/assets/cloud_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/assets/cloud_new_instance.png b/versioned_docs/version-1.7/installation/assets/cloud_new_instance.png deleted file mode 100644 index 80cdd33f..00000000 Binary files a/versioned_docs/version-1.7/installation/assets/cloud_new_instance.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_add_bot.png b/versioned_docs/version-1.7/installation/discord/assets/discord_add_bot.png deleted file mode 100644 index f03ecdc8..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_add_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_add_plugins.png b/versioned_docs/version-1.7/installation/discord/assets/discord_add_plugins.png deleted file mode 100644 index 8fbf3941..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_applications_portal.png b/versioned_docs/version-1.7/installation/discord/assets/discord_applications_portal.png deleted file mode 100644 index 278b7b5d..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_applications_portal.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_bot_auth.png b/versioned_docs/version-1.7/installation/discord/assets/discord_bot_auth.png deleted file mode 100644 index 45ef0970..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_bot_auth.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_bot_auth_2.png b/versioned_docs/version-1.7/installation/discord/assets/discord_bot_auth_2.png deleted file mode 100644 index 7de140dd..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_bot_auth_2.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_bot_created.png b/versioned_docs/version-1.7/installation/discord/assets/discord_bot_created.png deleted file mode 100644 index 2f7da954..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_bot_created.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_bot_id_form.png b/versioned_docs/version-1.7/installation/discord/assets/discord_bot_id_form.png deleted file mode 100644 index 5a932a4c..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_bot_id_form.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_bot_scope.png b/versioned_docs/version-1.7/installation/discord/assets/discord_bot_scope.png deleted file mode 100644 index 487f0dd1..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_bot_scope.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_channel_id_form.png b/versioned_docs/version-1.7/installation/discord/assets/discord_channel_id_form.png deleted file mode 100644 index abf2aa77..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_channel_id_form.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_copy_application_id.png b/versioned_docs/version-1.7/installation/discord/assets/discord_copy_application_id.png deleted file mode 100644 index 259021f1..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_copy_application_id.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_copy_channel_id.png b/versioned_docs/version-1.7/installation/discord/assets/discord_copy_channel_id.png deleted file mode 100644 index 2ecf8d18..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_copy_channel_id.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_create.png b/versioned_docs/version-1.7/installation/discord/assets/discord_create.png deleted file mode 100644 index cf28566d..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_create.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_create_new.png b/versioned_docs/version-1.7/installation/discord/assets/discord_create_new.png deleted file mode 100644 index bc88d336..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_create_new.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_developer_mode.png b/versioned_docs/version-1.7/installation/discord/assets/discord_developer_mode.png deleted file mode 100644 index d0f1c270..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_developer_mode.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_instance_delete.png b/versioned_docs/version-1.7/installation/discord/assets/discord_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_instance_display_name.png b/versioned_docs/version-1.7/installation/discord/assets/discord_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_platform_select.png b/versioned_docs/version-1.7/installation/discord/assets/discord_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_summary.png b/versioned_docs/version-1.7/installation/discord/assets/discord_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/assets/discord_token_form.png b/versioned_docs/version-1.7/installation/discord/assets/discord_token_form.png deleted file mode 100644 index 7a998f8c..00000000 Binary files a/versioned_docs/version-1.7/installation/discord/assets/discord_token_form.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/discord/cloud.md b/versioned_docs/version-1.7/installation/discord/cloud.md deleted file mode 100644 index 8435cd39..00000000 --- a/versioned_docs/version-1.7/installation/discord/cloud.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -id: discord-cloud -slug: cloud -title: Discord for Botkube Cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Discord - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/discord_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Discord` option. - ![Select Platform](assets/discord_platform_select.png "Select platform") - -4. Create Botkube app at your Discord Server - - Reach https://discordapp.com/developers/applications. - - ![discord_applications_portal](assets/discord_applications_portal.png) - -5. Create a "New Application" named Botkube and add a bot named **Botkube** into the Application. - - ![discord_create_new](assets/discord_create_new.png) - -6. Copy the Application **APPLICATION ID** - - ![discord_copy_client_id](assets/discord_copy_application_id.png) - - and paste it in the `BotID` field in the form. - - ![bot_id_form](assets/discord_bot_id_form.png) - -7. Add a description - `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - Set the Botkube icon (Botkube icon can be downloaded from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-color-192x192.png)). - - Click on Save Changes to update the Bot. - -8. Now, reach the **Bot** page and Click **Add Bot** to add a Discord Bot to your application. - - ![discord_add_bot](assets/discord_add_bot.png) - -9. After Bot creation, now you can see a bot is added to your application. Click on the **Reset Token** button. - - ![discord_bot_created](assets/discord_bot_created.png) - -10. Copy the Token and paste it in `Token` field the form. - - ![discord_token_form](assets/discord_token_form.png) - -11. Go to the **OAuth2** page. Generate the URL with suitable permissions using the **OAuth2 URL Generator** available under the OAuth2 section to add bot to your Discord server. - -![discord_bot_scope](assets/discord_bot_scope.png) - -the generated URL contains **YOUR_CLIENT_ID**, Scope and permission details. - -``` -https://discord.com/api/oauth2/authorize?client_id={YOUR_CLIENT_ID}&permissions={SET_OF_PERMISSIONS}&scope=bot -``` - -12. Copy and Paste the generated URL in a new tab, select the discord server to which you want to add the bot, click Continue and Authorize Bot addition. - -![discord_bot_auth](assets/discord_bot_auth.png) - -![discord_bot_auth_2](assets/discord_bot_auth_2.png) - -13. Switch to the Discord app. Navigate to **User settings** and select **Advanced** tab. - - Enable the **Developer Mode**. - - ![discord_developer_mode](assets/discord_developer_mode.png) - -14. Create a new channel or select an existing one and copy the **CHANNEL ID**. - - To get the channel ID, right-click on a channel you want to receive notification in and click on **Copy ID**. - - ![discord_copy_channel_id.png](assets/discord_copy_channel_id.png) - - Copy the channel ID and create it in `Channel ID` field in the form. - - ![discord_channel_id_form](assets/discord_channel_id_form.png) - -15. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/discord_add_plugins.png "Plugins") - -16. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/discord_create.png "Create") - -17. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/discord_summary.png "Summary") - -## Clean up - -### Remove Botkube from Discord Server - -- Go to Discord Developers Portal [Applications](https://discord.com/developers/applications) page, -- Click on "Botkube" and click on "Delete App" button. - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/discord_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.7/installation/discord/index.md b/versioned_docs/version-1.7/installation/discord/index.md deleted file mode 100644 index 0f3cfb03..00000000 --- a/versioned_docs/version-1.7/installation/discord/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: discord -title: Discord -sidebar_position: 4 ---- - -You can use Discord app to connect Botkube to your Discord Server. Learn how to create and configure Discord app for Botkube installation for: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.7/installation/discord/self-hosted.md b/versioned_docs/version-1.7/installation/discord/self-hosted.md deleted file mode 100644 index dd57d522..00000000 --- a/versioned_docs/version-1.7/installation/discord/self-hosted.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -id: discord-self-hosted -slug: self-hosted -title: Discord for self-hosted Botkube -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Discord server account - -## Install Botkube to the Discord Server - -Follow the steps below to install Botkube Discord app to your Discord server. - -### Create Botkube app at your Discord Server - -1. Reach https://discordapp.com/developers/applications. - - ![discord_applications_portal](assets/discord_applications_portal.png) - -2. Create a "New Application" named Botkube and add a bot named **Botkube** into the Application. - - ![discord_create_new](assets/discord_create_new.png) - -3. Copy the Application **APPLICATION ID** and export it as the `DISCORD_BOT_ID` environment variable. - - ``` - export DISCORD_BOT_ID={APPLICATION_ID} - ``` - - ![discord_copy_client_id](assets/discord_copy_application_id.png) - -4. Add a description - `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - Set the Botkube icon (Botkube icon can be downloaded from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-color-192x192.png)). - - Click on Save Changes to update the Bot. - -5. Now, reach the **Bot** page and Click **Add Bot** to add a Discord Bot to your application. - - ![discord_add_bot](assets/discord_add_bot.png) - -6. After Bot creation, now you can see a bot is added to your application. Click on the **Reset Token** button. - - ![discord_bot_created](assets/discord_bot_created.png) - -7. Copy the Token and export it as the `DISCORD_TOKEN` environment variable. - - ``` - export DISCORD_TOKEN={TOKEN} - ``` - -8. Go to the **OAuth2** page. Generate the URL with suitable permissions using the **OAuth2 URL Generator** available under the OAuth2 section to add bot to your Discord server. - - ![discord_bot_scope](assets/discord_bot_scope.png) - - the generated URL contains **YOUR_CLIENT_ID**, Scope and permission details. - - ``` - https://discord.com/api/oauth2/authorize?client_id={YOUR_CLIENT_ID}&permissions={SET_OF_PERMISSIONS}&scope=bot - ``` - -9. Copy and Paste the generated URL in a new tab, select the discord server to which you want to add the bot, click Continue and Authorize Bot addition. - - ![discord_bot_auth](assets/discord_bot_auth.png) - - ![discord_bot_auth_2](assets/discord_bot_auth_2.png) - -10. Switch to the Discord app. Navigate to **User settings** and select **Advanced** tab. - - Enable the **Developer Mode**. - - ![discord_developer_mode](assets/discord_developer_mode.png) - -11. Create a new channel or select an existing one and copy the **CHANNEL ID**. - - To get the channel ID, right-click on a channel you want to receive notification in and click on **Copy ID**. - - ![discord_copy_channel_id.png](assets/discord_copy_channel_id.png) - - Copy the channel ID and export it as the `DISCORD_CHANNEL_ID` environment variable. - - ``` - export DISCORD_CHANNEL_ID={ID} - ``` - -12. Now, go ahead and install the Botkube backend on your Kubernetes cluster. - -:::note -Follow the first 4 mins of this [Video Tutorial](https://youtu.be/8o25pRbXdFw) to understand the process visually. -::: - -### Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} -export ALLOW_HELM={allow_helm} - -botkube install --version v1.7.0 \ ---set communications.default-group.discord.enabled=true \ ---set communications.default-group.discord.channels.default.id=${DISCORD_CHANNEL_ID} \ ---set communications.default-group.discord.botID=${DISCORD_BOT_ID} \ ---set communications.default-group.discord.token=${DISCORD_TOKEN} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} \ ---set 'executors.k8s-default-tools.botkube/helm.enabled'=${ALLOW_HELM} -``` - -where: - -- **DISCORD_CHANNEL_ID** is the channel name where @Botkube needs to send notifications, -- **DISCORD_BOT_ID** is the Botkube Application Client ID, -- **DISCORD_TOKEN** is the Token you received after adding Botkube bot to your Discord Application, -- **CLUSTER_NAME** is the cluster name set in the incoming messages, -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster, -- **ALLOW_HELM** set true to allow `helm` command execution by Botkube on the cluster, - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -### Remove Botkube from Discord Server - -- Go to Discord Developers Portal [Applications](https://discord.com/developers/applications) page, -- Click on "Botkube" and click on "Delete App" button. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_add_plugins.png b/versioned_docs/version-1.7/installation/elasticsearch/assets/els_add_plugins.png deleted file mode 100644 index 8306a743..00000000 Binary files a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_create.png b/versioned_docs/version-1.7/installation/elasticsearch/assets/els_create.png deleted file mode 100644 index 9ffaf353..00000000 Binary files a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_create.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_form.png b/versioned_docs/version-1.7/installation/elasticsearch/assets/els_form.png deleted file mode 100644 index db744494..00000000 Binary files a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_form.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_instance_delete.png b/versioned_docs/version-1.7/installation/elasticsearch/assets/els_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_instance_display_name.png b/versioned_docs/version-1.7/installation/elasticsearch/assets/els_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_platform_select.png b/versioned_docs/version-1.7/installation/elasticsearch/assets/els_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_summary.png b/versioned_docs/version-1.7/installation/elasticsearch/assets/els_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.7/installation/elasticsearch/assets/els_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/elasticsearch/cloud.md b/versioned_docs/version-1.7/installation/elasticsearch/cloud.md deleted file mode 100644 index 4a37750c..00000000 --- a/versioned_docs/version-1.7/installation/elasticsearch/cloud.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: elasticsearch-cloud -title: Elasticsearch for Botkube Cloud -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Elasticsearch - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/els_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Elasticsearch` option. - - ![Select Platform](assets/els_platform_select.png "Select platform") - -4. Fill in all required data in the form - - ![Form](assets/els_form.png "Form") - -5. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/els_add_plugins.png "Plugins") - -6. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/els_create.png "Create") - - :::note - If you don't include other platforms which use `Executor` plugins we recommend `default aliases` and `default actions` options unchecked - ::: - -7. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/els_summary.png "Summary") - -## Clean up - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/els_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.7/installation/elasticsearch/index.md b/versioned_docs/version-1.7/installation/elasticsearch/index.md deleted file mode 100644 index cfd7af21..00000000 --- a/versioned_docs/version-1.7/installation/elasticsearch/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: elasticsearch -title: "Elasticsearch" -sidebar_position: 6 ---- - -You can use Botkube to populate your Elasticsearch with events. Learn how to configure Botkube to work with Elasticsearch: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.7/installation/elasticsearch/self-hosted.md b/versioned_docs/version-1.7/installation/elasticsearch/self-hosted.md deleted file mode 100644 index 3496898d..00000000 --- a/versioned_docs/version-1.7/installation/elasticsearch/self-hosted.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -id: elasticsearch-self-hosted -title: "Elasticsearch for self-hosted Botkube" -slug: self-hosted -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Elasticsearch server - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ELASTICSEARCH_ADDRESS={elasticsearch_address} -export ELASTICSEARCH_USERNAME={elasticsearch_username} -export ELASTICSEARCH_PASSWORD={elasticsearch_password} -export ELASTICSEARCH_INDEX_NAME={elasticsearch_index_name} - -botkube install --version v1.7.0 \ ---set communications.default-group.elasticsearch.enabled=true \ ---set communications.default-group.elasticsearch.server=${ELASTICSEARCH_ADDRESS} \ ---set communications.default-group.elasticsearch.username=${ELASTICSEARCH_USERNAME} \ ---set communications.default-group.elasticsearch.password=${ELASTICSEARCH_PASSWORD} \ ---set communications.default-group.elasticsearch.indices.default.name=${ELASTICSEARCH_INDEX_NAME} \ ---set settings.clusterName=${CLUSTER_NAME} -``` - -where: - -- **ELASTICSEARCH_ADDRESS** is an address on which Elasticsearch server is reachable e.g https://example.com:9243, -- **ELASTICSEARCH_USERNAME** is the username for authentication to Els server, -- **ELASTICSEARCH_PASSWORD** is a password for the username to authenticate with Els server, -- **ELASTICSEARCH_INDEX_NAME** _(optional)_ is an index name on which Botkube events will be stored _(default: botkube)_. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.7/installation/index.mdx b/versioned_docs/version-1.7/installation/index.mdx deleted file mode 100644 index eff29cd5..00000000 --- a/versioned_docs/version-1.7/installation/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -id: installation -title: Installation -sidebar_position: 1 -slug: / ---- - -import { IntegrationList } from "@site/src/components/IntegrationList"; - -Botkube has two components that need to be installed. - -1. Botkube App Integration in your Slack/Mattermost/Microsoft Teams/Discord -2. Botkube agent in your Kubernetes cluster - -## Feature map - -Learn about Botkube features and their availability in different integrations. - -### Bots - -Compare our bidirectional integrations: - -| Feature | Cloud Slack | Slack | Microsoft Teams | Discord | Mattermost | -| ---------------------------------------------------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| Source plugins support (e.g. `kubernetes`, `prometheus`, etc.) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Executor plugins support (e.g. `kubectl`, `helm`, etc.) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Multi-cluster support | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Enhanced per-channel plugin configuration including RBAC policy. | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Interactive messages | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | -| Actionable notifications | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | -| Emoji reactions | :heavy_check_mark: | :x: | :x: | :x: | :x: | - -### Sinks - -Compare our unidirectional integrations: - -| Feature | Elasticsearch | Webhook | -| -------------------------------------------------------------- | ------------------ | ------------------ | -| Source plugins support (e.g. `kubernetes`, `prometheus`, etc.) | :heavy_check_mark: | :heavy_check_mark: | -| Multi-cluster support | :heavy_check_mark: | :heavy_check_mark: | - -## Integrations - - - -:::tip -You can use a single Botkube agent to serve all the interfaces - Slack, Mattermost, Microsoft Teams, Elasticsearch and Webhook.
-You just need to enable required mediums through the settings and add a necessary configuration.
-_see the [configuration](../configuration/index.mdx) section for more information_ -::: diff --git a/versioned_docs/version-1.7/installation/mattermost/assets/invite.png b/versioned_docs/version-1.7/installation/mattermost/assets/invite.png deleted file mode 100644 index af62c87a..00000000 Binary files a/versioned_docs/version-1.7/installation/mattermost/assets/invite.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/mattermost/assets/mattermost_instance_display_name.png b/versioned_docs/version-1.7/installation/mattermost/assets/mattermost_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.7/installation/mattermost/assets/mattermost_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/mattermost/assets/mm_add_plugins.png b/versioned_docs/version-1.7/installation/mattermost/assets/mm_add_plugins.png deleted file mode 100644 index 6a6ba82f..00000000 Binary files a/versioned_docs/version-1.7/installation/mattermost/assets/mm_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/mattermost/assets/mm_channels_form.png b/versioned_docs/version-1.7/installation/mattermost/assets/mm_channels_form.png deleted file mode 100644 index 9d1ac4a0..00000000 Binary files a/versioned_docs/version-1.7/installation/mattermost/assets/mm_channels_form.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/mattermost/assets/mm_create.png b/versioned_docs/version-1.7/installation/mattermost/assets/mm_create.png deleted file mode 100644 index b56ea252..00000000 Binary files a/versioned_docs/version-1.7/installation/mattermost/assets/mm_create.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/mattermost/assets/mm_form_bot_name.png b/versioned_docs/version-1.7/installation/mattermost/assets/mm_form_bot_name.png deleted file mode 100644 index c0f323bc..00000000 Binary files a/versioned_docs/version-1.7/installation/mattermost/assets/mm_form_bot_name.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/mattermost/assets/mm_instance_delete.png b/versioned_docs/version-1.7/installation/mattermost/assets/mm_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.7/installation/mattermost/assets/mm_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/mattermost/assets/mm_personal_token_form.png b/versioned_docs/version-1.7/installation/mattermost/assets/mm_personal_token_form.png deleted file mode 100644 index cf9cc05d..00000000 Binary files a/versioned_docs/version-1.7/installation/mattermost/assets/mm_personal_token_form.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/mattermost/assets/mm_platform_select.png b/versioned_docs/version-1.7/installation/mattermost/assets/mm_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.7/installation/mattermost/assets/mm_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/mattermost/assets/mm_summary.png b/versioned_docs/version-1.7/installation/mattermost/assets/mm_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.7/installation/mattermost/assets/mm_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/mattermost/cloud.md b/versioned_docs/version-1.7/installation/mattermost/cloud.md deleted file mode 100644 index 63d46bc8..00000000 --- a/versioned_docs/version-1.7/installation/mattermost/cloud.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -id: mattermost-cloud -title: Mattermost for Botkube Cloud -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Mattermost - -Follow the steps below to install Botkube in your Mattermost instance. - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/mattermost_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Mattermost` option. - ![Mattermost Platform Select](assets/mm_platform_select.png "Select mattermost platform") - -4. Follow the [Mattermost instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/) for creating a bot account. When creating the bot account, use the following details: - - - Username — `Botkube` - - :::note - You can also use a custom username for your bot. Just remember that you'll need to provide this username during a later step of the Botkube installation. - ::: - - - Description — `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - - Icon — You can download the Botkube icon from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-black-192x192.png). - -5. Paste the bot name in the form - - ![Bot Name in the form](assets/mm_form_bot_name.png "Bot Name in the form") - -6. Past the token in the form - - ![Personal Token in the form](assets/mm_personal_token_form.png "Personal Token in the form") - -7. Add Botkube to a channel - - Make sure that the newly created bot account is added to your Mattermost team by following [these instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/#bot-account-creation). - - ![Invite Bot Account](./assets/invite.png) - - Add Botkube user created to the channel you want to receive notifications in. - - ![Channels in the form](assets/mm_channels_form.png "Channels in the form") - -8. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/mm_add_plugins.png "Plugins") - -9. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/mm_create.png "Create") - -10. Follow the instructions in the summary page to deploy Botkube into your environment. - -![Summary](assets/mm_summary.png "Summary") - -## Clean up - -### Remove Botkube from Mattermost Team - -- Deactivate or remove Botkube user from Mattermost Team. Login as System Admin, in the Menu proceed to System console -> Users -> botkube -> Deactivate. -- Archive Channel created for Botkube communication if required. - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/mm_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.7/installation/mattermost/index.md b/versioned_docs/version-1.7/installation/mattermost/index.md deleted file mode 100644 index cb1d242a..00000000 --- a/versioned_docs/version-1.7/installation/mattermost/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: mattermost -title: Mattermost -sidebar_position: 3 ---- - -You can use Mattermost Bot to connect Botkube to your Mattermost Server. Learn how to create and configure Mattermost Bot for Botkube installation for: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.7/installation/mattermost/self-hosted.md b/versioned_docs/version-1.7/installation/mattermost/self-hosted.md deleted file mode 100644 index ee3efe09..00000000 --- a/versioned_docs/version-1.7/installation/mattermost/self-hosted.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -id: mattermost-self-hosted -title: Mattermost for self-hosted Botkube -slug: self-hosted -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster - -## Install Botkube to the Mattermost - -Follow the steps below to install Botkube in your Mattermost instance. - -### Create the Botkube bot account - -1. Follow the [Mattermost instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/) for creating a bot account. When creating the bot account, use the following details: - - - Username — `Botkube` - - :::note - You can also use a custom username for your bot. Just remember that you'll need to provide this username during a later step of the Botkube installation. - ::: - - - Description — `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - - Icon — You can download the Botkube icon from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-black-192x192.png). - -2. Export the bot name as an environment variable: - - ```bash - export MATTERMOST_BOT_NAME="{bot_name}" - ``` - -3. Also, export the bot's token as an environment variable: - - ```bash - export MATTERMOST_TOKEN="{token}" - ``` - -### Add Botkube to a channel - -Make sure that the newly created bot account is added to your Mattermost team by following [these instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/#bot-account-creation). - -![Invite Bot Account](./assets/invite.png) - -Next, invite the Botkube bot into the specific channel where you want to receive notifications. Export the channel name as an environment variable: - -```bash -export MATTERMOST_CHANNEL="{channel_name}" -``` - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export MATTERMOST_SERVER_URL={mattermost_server_url} -export MATTERMOST_TEAM={mattermost_team_name} -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} -export ALLOW_HELM={allow_helm} - -botkube install --version v1.7.0 \ ---set communications.default-group.mattermost.enabled=true \ ---set communications.default-group.mattermost.url=${MATTERMOST_SERVER_URL} \ ---set communications.default-group.mattermost.token=${MATTERMOST_TOKEN} \ ---set communications.default-group.mattermost.team=${MATTERMOST_TEAM} \ ---set communications.default-group.mattermost.channels.default.name=${MATTERMOST_CHANNEL} \ ---set communications.default-group.mattermost.botName=${MATTERMOST_BOT_NAME} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} \ ---set 'executors.k8s-default-tools.botkube/helm.enabled'=${ALLOW_HELM} -``` - -where: - -- **MATTERMOST_SERVER_URL** is the URL (including http/https schema) where Mattermost is running, -- **MATTERMOST_TOKEN** is the Token received by creating Personal Access Token for Botkube bot, -- **MATTERMOST_TEAM** is the Team name where Botkube is added, -- **MATTERMOST_CHANNEL** is the Channel name where Botkube is added and used for communication, -- **MATTERMOST_BOT_NAME** is the Mattermost bot username (usually it is `Botkube`), -- **CLUSTER_NAME** is the cluster name set in the incoming messages, -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster, -- **ALLOW_HELM** set true to allow `helm` command execution by Botkube on the cluster, - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -## Remove Botkube from Mattermost Team - -- Deactivate or remove Botkube bot from Mattermost Team. -- Archive Channel created for Botkube communication if required. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` - -## Troubleshooting - -### Botkube doesn't start - -**Symptoms** - -The Botkube Pod is restarting and the Botkube logs show the following error: - -```json -{ - "level": "fatal", - "msg": "while running application: while waiting for goroutines to finish gracefully: 1 error occurred:\n\t* while creating Mattermost bot: while getting team details: team \"Botkube\" not found", - "time": "2023-08-25T14:52:30+02:00" -} -``` - -**Solution** - -You need to ensure that the configuration used by Botkube is valid. - -1. Get and decode the communication Secret details: - ```bash - kubectl get secret botkube-communication-secret -n botkube --template='{{index .data "comm_config.yaml" | base64decode }}' - ``` -2. Verify the following: - - - Ensure that the value of `communications.default-group.mattermost.team` in the configuration matches the actual team name in your Mattermost UI. - - - Confirm that the bot specified in `communications.default-group.mattermost.botName` has been invited to the relevant team and all specified channels. - - - Check the validity of the token provided in `communications.default-group.mattermost.token`. If you're unsure, navigate to the Bot Accounts section in Mattermost and generate a new one. - -3. Additional Steps: - - If you continue to experience issues with Botkube restarts, you can perform further troubleshooting by following the instructions provided by Mattermost on [testing bot connections](https://developers.mattermost.com/integrate/reference/bot-accounts/#how-can-i-quickly-test-if-my-bot-account-is-working). diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_add_plugins.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_add_plugins.png deleted file mode 100644 index 6d0df836..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_add_to_slack.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_add_to_slack.png deleted file mode 100644 index 508b8d64..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_add_to_slack.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_all_clusters.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_all_clusters.png deleted file mode 100644 index f0629ad8..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_all_clusters.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_help.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_help.png deleted file mode 100644 index a141f676..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_help.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_list_instances.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_list_instances.png deleted file mode 100644 index ff0f1375..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_list_instances.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_set_default.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_set_default.png deleted file mode 100644 index cf489aed..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_command_set_default.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_create.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_create.png deleted file mode 100644 index deb72f65..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_create.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_credentials.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_credentials.png deleted file mode 100644 index a6c60dbc..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_credentials.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_grant.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_grant.png deleted file mode 100644 index 55858e31..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_grant.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_install.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_install.png deleted file mode 100644 index 954d6cfe..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_install.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_instance_delete.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_instance_list_manage.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_instance_list_manage.png deleted file mode 100644 index 3dd8d34e..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_instance_list_manage.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_new_instance.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_new_instance.png deleted file mode 100644 index 80cdd33f..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_new_instance.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_select_slack.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_select_slack.png deleted file mode 100644 index 544f59a2..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_select_slack.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_workspace_details.png b/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_workspace_details.png deleted file mode 100644 index a5feeb96..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/cloud_slack_workspace_details.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/slack_add_app.png b/versioned_docs/version-1.7/installation/slack/assets/slack_add_app.png deleted file mode 100644 index 378e0b9a..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/slack_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/slack_generate_app_token.png b/versioned_docs/version-1.7/installation/slack/assets/slack_generate_app_token.png deleted file mode 100644 index 0864aae1..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/slack_generate_app_token.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/slack_install_app.png b/versioned_docs/version-1.7/installation/slack/assets/slack_install_app.png deleted file mode 100644 index cee7293e..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/slack_install_app.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/slack_retrieve_app_token.png b/versioned_docs/version-1.7/installation/slack/assets/slack_retrieve_app_token.png deleted file mode 100644 index 5644a174..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/slack_retrieve_app_token.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/slack_retrieve_bot_token.png b/versioned_docs/version-1.7/installation/slack/assets/slack_retrieve_bot_token.png deleted file mode 100644 index e3954a91..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/slack_retrieve_bot_token.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/assets/slack_select_workspace.png b/versioned_docs/version-1.7/installation/slack/assets/slack_select_workspace.png deleted file mode 100644 index 897e5b31..00000000 Binary files a/versioned_docs/version-1.7/installation/slack/assets/slack_select_workspace.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/slack/cloud-slack.mdx b/versioned_docs/version-1.7/installation/slack/cloud-slack.mdx deleted file mode 100644 index 5cacdea9..00000000 --- a/versioned_docs/version-1.7/installation/slack/cloud-slack.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -id: cloud-slack -title: Botkube Cloud App for Slack -sidebar_position: 1 ---- - -The Botkube Cloud App for Slack uses Botkube Cloud services to manage channels and route executor commands. This allows multi-cluster support without a need to create a dedicated Slack application for each cluster. Events and alerts are sent directly from your cluster to your Slack workspace for reliable, fast notifications. - -## Prerequisites - -- A Botkube Cloud account. - - You can try out the Botkube Cloud App for Slack for free by creating an account in the [Botkube Cloud app](https://app.botkube.io). - -## Create a Botkube Cloud Instance with Cloud Slack - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and click on `New Instance` button. - - ![New Instance](assets/cloud_slack_new_instance.png "Create new instance") - -2. Install Botkube Agent on your Kubernetes cluster by following the instructions on the page. - - ![Install Agent](assets/cloud_slack_install.png "Install Agent") - -3. Click `Add platform` dropdown, and select `Slack` option. - - ![Slack Platform Select](assets/cloud_slack_select_slack.png "Select slack platform") - -4. Click `Add to Slack` button to add Cloud Slack integration to your Slack workspace. - - ![Add to Slack](assets/cloud_slack_add_to_slack.png "Add to Slack") - -5. Click `Allow` to grant permission for Botkube app to access your Slack workspace. - - ![Cloud Slack Grant](assets/cloud_slack_grant.png "Cloud Slack grant") - -6. Provide the Slack app details as described follows and click `Next` button. - - - **Connected Slack Workspace:** Slack workspace that you granted permission in the previous step. - - **Display Name:** Display name of the Cloud Slack configuration. - - **Channels:** Slack channes where you can execute Botkube commands and receive notification. - - ![Cloud Slack Workspace](assets/cloud_slack_workspace_details.png "Cloud Slack workspace") - -7. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Cloud Slack Plugins](assets/cloud_slack_add_plugins.png "Cloud Slack plugins") - -8. Include optional default command aliases and actions and click `Apply Changes` button to update Botkube Cloud instance. - - ![Cloud Slack Create](assets/cloud_slack_create.png "Cloud Slack create") - -## Using Botkube Cloud App for Slack - -You can start using Botkube Cloud App for Slack by typing `@Botkube cloud help` in the Slack channel you configured in one of the previous steps. - -![Cloud Slack Command Help](assets/cloud_slack_command_help.png "Cloud Slack command help") - -### Listing Cloud Instances - -You can list all the Botkube Cloud instances by typing `@Botkube cloud list instances` in the Slack channel, or click the button `List connected instances` in the help command response. -Besides the instance `name`, `ID`, and `status` in the list response, you can also click the `Get details` button to go to instance details on Botkube Cloud Dashboard. - -![Cloud Slack List Instances](assets/cloud_slack_command_list_instances.png "Cloud Slack list instances") - -### Setting Default Instances - -Once a Botkube command is executed, it will be handled on target Kubernetes cluster specified with `--cluster-name` flag. This is an optional flag, -where if you have not specified it, Botkube Cloud will select the first instance. However, you can also achieve setting default instance with command `@Botkube cloud set default-instance {instance-id}`. - -![Cloud Slack Set Default Instances](assets/cloud_slack_command_set_default.png "Cloud Slack set default instance") - -After this point, all of your commands will be executed on the default instance. Moreover, if you want to execute a command on all the target clusters, you can use `--all-clusters` flag. - -![Cloud Slack All Clusters](assets/cloud_slack_command_all_clusters.png "Cloud Slack all clusters") - -### Setting Public Alias for Private Channels - -In order to maintain your confidentiality while using Botkube's plugins, you need to create a public alias for your private Slack channels. This alias will only be visible to Botkube Cloud administrators. - -#### During the Botkube Invitation to Private Channels - -When you invite Botkube to a private channel, a prompt will appear to guide you through the process of creating a public alias. - -#### For Existing Private Channels - -To update an existing alias for a private channel, or if Botkube is already integrated, simply use this command: - -``` -@Botkube cloud set channel-alias -``` - -## Cleanup - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - - ![Cloud Slack Instance Manage](assets/cloud_slack_instance_list_manage.png "Cloud Slack instances manage") - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Cloud Slack Instance Delete](assets/cloud_slack_instance_delete.png "Cloud Slack instances delete") diff --git a/versioned_docs/version-1.7/installation/slack/index.md b/versioned_docs/version-1.7/installation/slack/index.md deleted file mode 100644 index 75a0e837..00000000 --- a/versioned_docs/version-1.7/installation/slack/index.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: slack -title: Slack -sidebar_position: 1 ---- - -## Botkube Slack App Versions - -In order to connect with Slack, Botkube requires a Slack application. There are two versions of the Botkube Slack App available: - -### Botkube Cloud App for Slack - -The Botkube Cloud App for Slack offers several advanced features: - -- One-click installation into your Slack workspace -- Multi-cluster executor support with a single Slack App -- Manage Slack channels directly from the Botkube web app and ensure the Botkube bot is invited to the correct channels - -The Botkube Cloud App for Slack uses Botkube's cloud services to manage channels and route executor commands. Events and alerts are sent directly from your cluster to your Slack workspace for reliable, fast notifications. - -You can directly try Botkube Cloud App for Slack for free by creating an account in the [Botkube Web App](https://app.botkube.io). Follow the [Cloud Slack app tutorial](cloud-slack.mdx) to learn more. - -### Botkube Socket Slack App - -The Socket-mode app works with the open-source Botkube Agent. The Botkube Socket-mode Slack App has the following caveats: - -- Must be installed manually into your Slack workspace using the provided configuration -- Slack channels must be managed manually, and you need to ensure the Botkube bot is invited to any channel you want to use with Botkube -- When using executor plugins (e.g. kubectl, helm) in a multi-cluster environment, each cluster needs to have a dedicated Botkube Slack bot in order to route commands to the correct cluster. - -Follow the [instruction](socket-slack.md) for more details. diff --git a/versioned_docs/version-1.7/installation/slack/socket-slack.md b/versioned_docs/version-1.7/installation/slack/socket-slack.md deleted file mode 100644 index 026a446e..00000000 --- a/versioned_docs/version-1.7/installation/slack/socket-slack.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -id: socket-slack -title: Socket Slack App -sidebar_position: 2 ---- - -The Socket-mode app works with the open-source Botkube Agent and does not require an account or subscription. - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Slack Workspace admin access - -## Install Socket Slack App in Your Slack workspace - -Botkube uses interactive messaging to provide better experience. Interactive messaging needs a Slack App with Socket Mode enabled and currently this is not suitable for Slack App Directory listing. For this reason, you need to create a Slack App in your own Slack workspace and use it for Botkube deployment. - -:::warning -**Multi-cluster caveat:** The architecture of socket-based Slack apps has a limitation on the routing of executor commands. If you would like to use [Botkube executors](../../configuration/executor/index.md) (e.g. kubectl commands) and have multiple Kubernetes clusters, you need to create and install a Botkube Slack app for each cluster. This is required so that the Slack to Botkube connections go to the right place. We recommend you set the name of each app to reflect the cluster it will connect to in the next steps. - -To learn more about the Slack Socket API limitation, see the [comment](https://github.com/slackapi/bolt-js/issues/1263#issuecomment-1006372826) in the official Slack bot framework repository. - -The [Botkube Cloud App for Slack](./cloud-slack.mdx) does not have this limitation. -::: - -Follow the steps below to create and install Botkube Slack app to your Slack workspace. - -### Create Slack app - -1. Go to [Slack App console](https://api.slack.com/apps) to create an application. -1. Click **Create New App** and select **From an app manifest** in the popup to create application from manifest. - - ![Create App from Manifest](assets/slack_add_app.png "Slack add app") - -1. Select a workspace where you want to create application and click **Next**. - - ![Select Workspace](assets/slack_select_workspace.png "Slack select workspace") - -1. Select **YAML** tab, copy & paste one of the following manifests, and click **Next**, and then **Create**. - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -
- - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - channels:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - groups:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - channels:read - - groups:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - -
- -### Install Botkube to the Slack workspace - -Once the application is created, you will be redirected to application details page. Press the **Install your app** button, select the workspace and click **Allow to finish installation**. - -![Install Slack App](assets/slack_install_app.png "Slack install app") - -### Obtain Bot Token - -Follow the steps to obtain the Bot Token: - -1. Select **OAuth & Permissions** section on the left sidebar. On this page you can copy the bot token which starts with `xoxb...`. - - ![Retrieve Slack Bot Token](assets/slack_retrieve_bot_token.png "Slack Bot Token") - -1. Export Slack Bot Token as follows: - - ```shell - export SLACK_API_BOT_TOKEN="{botToken}" - ``` - -### Generate and obtain App-Level Token - -Slack App with Socket Mode requires an App-Level Token for the websocket connection. - -Follow the steps to generate an App-Level Token: - -1. Select **Basic Information** link from the left sidebar and scroll down to section **App-Level Token**. Click on the **Generate Token and Scopes** button. -1. Enter a **Name**, select `connections:write` scope, and click **Generate**. - - ![Generate App-Level Token](assets/slack_generate_app_token.png "Slack App Token") - - ![Retrieve App-Level Token](assets/slack_retrieve_app_token.png "Slack Retrieve App Token") - -1. Copy **App-Level Token** and export it as follows: - - ```shell - export SLACK_API_APP_TOKEN="${appToken}" - ``` - -### Add Botkube user to a Slack channel - -After installing Botkube app to your Slack workspace, you could see a new bot user with the name "Botkube" added in your workspace. Add that bot to a Slack channel you want to receive notification in. You can add it by inviting `@Botkube` in a channel. - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} -export ALLOW_HELM={allow_helm} -export SLACK_CHANNEL_NAME={channel_name} - -botkube install --version v1.7.0 \ ---set communications.default-group.socketSlack.enabled=true \ ---set communications.default-group.socketSlack.channels.default.name=${SLACK_CHANNEL_NAME} \ ---set communications.default-group.socketSlack.appToken=${SLACK_API_APP_TOKEN} \ ---set communications.default-group.socketSlack.botToken=${SLACK_API_BOT_TOKEN} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} \ ---set 'executors.k8s-default-tools.botkube/helm.enabled'=${ALLOW_HELM} -``` - -where: - -- **SLACK_CHANNEL_NAME** is the channel name where @Botkube is added -- **SLACK_API_BOT_TOKEN** is the Token you received after installing Botkube app to your Slack workspace -- **SLACK_API_APP_TOKEN** is the Token you received after installing Botkube app to your Slack workspace and generate in App-Level Token section -- **CLUSTER_NAME** is the cluster name set in the incoming messages -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster, -- **ALLOW_HELM** set true to allow `helm` command execution by Botkube on the cluster, - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -### Delete Botkube from Slack workspace - -- Go to the [Slack apps](https://api.slack.com/apps) page, -- Click on "Botkube", scroll to bottom, and click on "Delete App" button. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.7/installation/socketslack.mdx b/versioned_docs/version-1.7/installation/socketslack.mdx deleted file mode 100644 index 314744a2..00000000 --- a/versioned_docs/version-1.7/installation/socketslack.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -id: socketslack -title: "Slack" -sidebar_position: -1 -sidebar_class_name: hidden ---- - -Redirecting to the new location of Slack installation... If you are not redirected in a few seconds, please click [here](./slack/index.md). - -import { RelativeRedirect } from "@site/src/components/RelativeRedirect"; - - diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_add_app.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_add_app.png deleted file mode 100644 index de175417..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_add_plugins.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_add_plugins.png deleted file mode 100644 index 7217b81b..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_admin_center.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_admin_center.png deleted file mode 100644 index 46a149eb..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_admin_center.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_botkube_app_add.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_botkube_app_add.png deleted file mode 100644 index 4f8cbe63..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_botkube_app_add.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_command_all_clusters.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_command_all_clusters.png deleted file mode 100644 index bba0111b..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_command_all_clusters.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_command_help.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_command_help.png deleted file mode 100644 index ccb04a47..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_command_help.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_command_set_default.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_command_set_default.png deleted file mode 100644 index 1f89e9ec..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_command_set_default.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_config.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_config.png deleted file mode 100644 index 99aee80e..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_config.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_create.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_create.png deleted file mode 100644 index 246b25e2..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_create.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_download_app.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_download_app.png deleted file mode 100644 index ccb6608d..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_download_app.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_instance_list_manage.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_instance_list_manage.png deleted file mode 100644 index c7842590..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_instance_list_manage.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_list_instances.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_list_instances.png deleted file mode 100644 index 097ca812..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_list_instances.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_permissions_accept.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_permissions_accept.png deleted file mode 100644 index aa624edc..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_permissions_accept.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_permissions_select_account.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_permissions_select_account.png deleted file mode 100644 index 13a4bf33..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_permissions_select_account.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_permissions_success.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_permissions_success.png deleted file mode 100644 index e35fc720..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_permissions_success.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_select_platform.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_select_platform.png deleted file mode 100644 index 9659eccd..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_select_platform.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_select_team.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_select_team.png deleted file mode 100644 index dc020de3..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_select_team.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_team_connect.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_team_connect.png deleted file mode 100644 index 9473896a..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_team_connect.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_team_connect_success.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_team_connect_success.png deleted file mode 100644 index 53bb3ec3..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_team_connect_success.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_welcome_msg.png b/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_welcome_msg.png deleted file mode 100644 index 76dee224..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/cloud_teams_welcome_msg.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/teams_add_app.png b/versioned_docs/version-1.7/installation/teams/assets/teams_add_app.png deleted file mode 100644 index 43b22d05..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/teams_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/teams_add_app_info.png b/versioned_docs/version-1.7/installation/teams/assets/teams_add_app_info.png deleted file mode 100644 index 448ae69c..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/teams_add_app_info.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/teams_add_bot.png b/versioned_docs/version-1.7/installation/teams/assets/teams_add_bot.png deleted file mode 100644 index 3f386f4f..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/teams_add_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/teams_add_bot_endpoint.png b/versioned_docs/version-1.7/installation/teams/assets/teams_add_bot_endpoint.png deleted file mode 100644 index 3d4c9ede..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/teams_add_bot_endpoint.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/teams_add_bot_feature.png b/versioned_docs/version-1.7/installation/teams/assets/teams_add_bot_feature.png deleted file mode 100644 index a6594094..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/teams_add_bot_feature.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/teams_add_to_team.png b/versioned_docs/version-1.7/installation/teams/assets/teams_add_to_team.png deleted file mode 100644 index 94ff2cd2..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/teams_add_to_team.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/teams_ping.png b/versioned_docs/version-1.7/installation/teams/assets/teams_ping.png deleted file mode 100644 index d0cdfb2d..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/teams_ping.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/teams_publish_app.png b/versioned_docs/version-1.7/installation/teams/assets/teams_publish_app.png deleted file mode 100644 index f311389a..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/teams_publish_app.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/assets/teams_select_existing_bot.png b/versioned_docs/version-1.7/installation/teams/assets/teams_select_existing_bot.png deleted file mode 100644 index 383d5386..00000000 Binary files a/versioned_docs/version-1.7/installation/teams/assets/teams_select_existing_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/teams/index.md b/versioned_docs/version-1.7/installation/teams/index.md deleted file mode 100644 index 598f0fce..00000000 --- a/versioned_docs/version-1.7/installation/teams/index.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -id: teams -title: "Microsoft Teams" -sidebar_position: 5 ---- - -## Botkube app for Microsoft Teams - -The Botkube app for Microsoft Teams offers several advanced features: - -- Simplified installation into your Microsoft Teams workspace -- Multi-cluster executor support with a single Microsoft Teams app -- Manage Teams channels directly from the Botkube web app and ensure the Botkube bot is invited to the correct channels - -The Botkube app for Microsoft Teams uses Botkube's cloud services to manage channels and route source events and executor commands. Currently, it requires a manual side-loading of the app, but we are working on getting it listed in Microsoft AppSource. - -You can directly try Botkube app for Microsoft Teams for free by creating an account in the [Botkube Web App](https://app.botkube.io). Follow the steps below to install the app. - -## Prerequisites - -- A Botkube Cloud account. - - You can try out the Botkube app for Microsoft Teams for free by creating an account in the [Botkube Cloud app](https://app.botkube.io). - -## Create a Botkube Cloud Instance with Microsoft Teams - -### Connect Botkube Cloud to your Kubernetes cluster - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and click on `New Instance` button. - - ![New Instance](../assets/cloud_new_instance.png "Create new instance") - -1. Install Botkube Agent on your Kubernetes cluster by following the instructions on the page. - - ![Install Agent](../assets/cloud_install.png "Install Agent") - -1. Click `Add platform` dropdown, and select `Teams` option. - - ![Teams Platform Select](assets/cloud_teams_select_platform.png "Select Teams platform") - -Proceed with the next section. - -### Install Botkube app to your team - -1. Install Botkube app for Microsoft Teams from the official app catalog by clicking the `Install Botkube App for Teams` button. - - ![Install Botkube App for Microsoft Teams](assets/cloud_teams_download_app.png "Install Botkube App for Microsoft Teams") - - Alternatively, you can search for the "Botkube" app in the Microsoft Teams app catalog and click the **Add** button. - - ![Add Botkube App](assets/cloud_teams_add_app.png "Add Botkube App") - -1. Add the Botkube app to your team. - - 1. Click the **Add to a team** button. - - ![Add app to team](assets/cloud_teams_botkube_app_add.png "Add app to team") - - 1. Select the team and default channel, where you'll get the welcome message. - - ![Select a team](assets/cloud_teams_select_team.png "Select a team") - - 1. Click the **Set up a bot** button. - -Once the Botkube app is added to your team, you'll receive a welcome message. - -![Botkube Cloud Microsoft Teams Welcome Message](assets/cloud_teams_welcome_msg.png "Botkube Cloud Microsoft Teams welcome message") - -Proceed with the next section. - -### Grant permissions for Botkube app - -:::info -This step requires administrator permissions on your Microsoft Teams organization. Granting permissions is needed only once for the whole organization. -::: - -1. Click on the **Grant access** button. -1. Select your Microsoft account. - - ![Select account](assets/cloud_teams_permissions_select_account.png "Select account") - -1. Click the **Accept** button. - - ![Grant access](assets/cloud_teams_permissions_accept.png "Grant access") - -1. You will be redirected to the confirmation page. - - ![Confirmation page](assets/cloud_teams_permissions_success.png "Confirmation page") - -Close the page and proceed with the next section. - -### Connect your team to Botkube Cloud - -Go back to the Microsoft Teams app channel, where you received the welcome message. - -1. Click the **Connect to Botkube Cloud** button in the welcome message. -1. Log in to Botkube Cloud, if you haven't already. Ensure that you selected the correct organization, where you want to connect your team. -1. Click the **Connect** button. - - ![Connect to Botkube Cloud](assets/cloud_teams_team_connect.png "Connect to Botkube Cloud") - -1. You will see a confirmation page. - - ![Confirmation page](assets/cloud_teams_team_connect_success.png "Confirmation page") - -Close the page and proceed with the next section. - -### Finalize Botkube Cloud instance configuration - -Go back to the Botkube Cloud instance creation. - -1. In step 2, select your connected team and provide other details. - - - **Connected Microsoft Teams team:** Teams team that you connected in the previous section. - - **Display Name:** Display name of the Microsoft Teams team configuration. - - **Channels:** Teams channels where you can execute Botkube commands and receive notification. - - ![Botkube Cloud Instance Configuration](assets/cloud_teams_config.png "Botkube Cloud Instance Configuration") - -2. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Microsoft Teams Plugins](assets/cloud_teams_add_plugins.png "Microsoft Teams plugins") - -3. Include optional default command aliases and actions and click `Apply Changes` button to update Botkube Cloud instance. - - ![Microsoft Teams Create](assets/cloud_teams_create.png "Microsoft Teams create") - -## Using Botkube app for Microsoft Teams - -You can start using Botkube Cloud Microsoft Teams by typing `@Botkube cloud help` in one of the channels in the team you configured in one of the previous steps. - -![Botkube Cloud Microsoft Teams Command Help](assets/cloud_teams_command_help.png "Botkube Cloud Microsoft Teams command help") - -### Listing Cloud Instances - -You can list all your Botkube Cloud instances by typing `@Botkube cloud list` in the Microsoft Teams channel, or click the button `List connected instances` in the help command response. Besides the instance `name`, `ID`, and `status` in the list response, you can also click the `Get details` button to go to instance details on Botkube Cloud Dashboard. - -![Botkube Cloud Microsoft Teams List Instances](assets/cloud_teams_list_instances.png "Botkube Cloud Microsoft Teams list instances") - -### Setting Default Instance - -Once a Botkube command is executed, it will be handled on target Kubernetes cluster specified with `--cluster-name` flag. This is an optional flag, -where if you have not specified it, Botkube Cloud will select the first instance. However, you can also achieve setting default instance with command `@Botkube cloud set default-instance`. - -![Cloud Microsoft Teams Set Default Instances](assets/cloud_teams_command_set_default.png "Cloud Microsoft Teams set default instance") - -After this point, all of your commands will be executed on the default instance. Moreover, if you want to execute a command on all the target clusters, you can use `--all-clusters` flag. - -![Cloud Microsoft Teams All Clusters](assets/cloud_teams_command_all_clusters.png "Cloud Microsoft Teams all clusters") - -## Cleanup - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - - ![Cloud Teams Instance Manage](assets/cloud_teams_instance_list_manage.png "Cloud Microsoft Teams instances manage") - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Cloud Teams Instance Delete](../assets/cloud_instance_delete.png "Cloud Microsoft Teams instances delete") - -## Caveats - -### RBAC `ChannelName` mapping - -Same as other communication platforms, Botkube app for Microsoft Teams supports RBAC along with [all mappings](../../configuration/rbac.md#mapping-types). -However, because of the Microsoft Teams API limitation, for the default team channel the `ChannelName` is always `General`, regardless of the actual localized channel name. - -## Limitations - -Botkube app for Microsoft Teams currently doesn't support the following features yet: - -- Processing states from selected dropdowns, e.g., used for the `kubectl` command builder. In a result, the command builder is not available. -- Adding 👀 and ✅ reactions to messages indicating process status. - - This seems to be a limitation of the Microsoft Teams platform, however we'll investigate if there is a workaround. - -- Sending messages visible only to specific users. -- Replacing messages with new content, e.g., used for pagination. Currently, a new card is sent as a new message. -- User mentions in messages. Instead, Botkube app uses plaintext mentions with first and last name. diff --git a/versioned_docs/version-1.7/installation/webhook/assets/webhook_add_plugins.png b/versioned_docs/version-1.7/installation/webhook/assets/webhook_add_plugins.png deleted file mode 100644 index c4c4d54b..00000000 Binary files a/versioned_docs/version-1.7/installation/webhook/assets/webhook_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/webhook/assets/webhook_create.png b/versioned_docs/version-1.7/installation/webhook/assets/webhook_create.png deleted file mode 100644 index 1ec031e0..00000000 Binary files a/versioned_docs/version-1.7/installation/webhook/assets/webhook_create.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/webhook/assets/webhook_form.png b/versioned_docs/version-1.7/installation/webhook/assets/webhook_form.png deleted file mode 100644 index dd2d98cc..00000000 Binary files a/versioned_docs/version-1.7/installation/webhook/assets/webhook_form.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/webhook/assets/webhook_instance_delete.png b/versioned_docs/version-1.7/installation/webhook/assets/webhook_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.7/installation/webhook/assets/webhook_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/webhook/assets/webhook_instance_display_name.png b/versioned_docs/version-1.7/installation/webhook/assets/webhook_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.7/installation/webhook/assets/webhook_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/webhook/assets/webhook_platform_select.png b/versioned_docs/version-1.7/installation/webhook/assets/webhook_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.7/installation/webhook/assets/webhook_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/webhook/assets/webhook_summary.png b/versioned_docs/version-1.7/installation/webhook/assets/webhook_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.7/installation/webhook/assets/webhook_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.7/installation/webhook/cloud.md b/versioned_docs/version-1.7/installation/webhook/cloud.md deleted file mode 100644 index 59926126..00000000 --- a/versioned_docs/version-1.7/installation/webhook/cloud.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: webhook-cloud -title: "Outgoing webhook for Botkube Cloud" -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Webhook - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/webhook_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Webhook` option. - - ![Select Platform](assets/webhook_platform_select.png "Select platform") - -4. Fill in all required data in the form - - ![Form](assets/webhook_form.png "Form") - -5. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/webhook_add_plugins.png "Plugins") - -6. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/webhook_create.png "Create") - - :::note - If you don't include other platforms which use `Executor` plugins we recommend `default aliases` and `default actions` options unchecked - ::: - -7. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/webhook_summary.png "Summary") - -## Clean up - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/webhook_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.7/installation/webhook/index.md b/versioned_docs/version-1.7/installation/webhook/index.md deleted file mode 100644 index be2a3aa3..00000000 --- a/versioned_docs/version-1.7/installation/webhook/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: webhook -title: "Outgoing webhook" -sidebar_position: 7 ---- - -You can use Botkube to trigger your Webhook and send events. Learn how to configure Botkube to work with Webhook: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.7/installation/webhook/self-hosted.md b/versioned_docs/version-1.7/installation/webhook/self-hosted.md deleted file mode 100644 index 797111f8..00000000 --- a/versioned_docs/version-1.7/installation/webhook/self-hosted.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: webhook-self-hosted -title: "Outgoing webhook for self-hosted Botkube" -slug: self-hosted -sidebar_position: 1 ---- - -## Install Botkube in Kubernetes cluster - -Botkube can be integrated with external apps via Webhooks. A webhook is essentially a POST request sent to a callback URL. So you can configure Botkube to send events on specified URL. - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export WEBHOOK_URL={url} - -botkube install --version v1.7.0 \ ---set communications.default-group.webhook.enabled=true \ ---set communications.default-group.webhook.url=${WEBHOOK_URL} \ ---set settings.clusterName=${CLUSTER_NAME} -``` - -where: - -- **WEBHOOK_URL** is an outgoing webhook URL to which Botkube will POST the events, -- **CLUSTER_NAME** is the cluster name set in the incoming messages. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.7/operation/_category_.json b/versioned_docs/version-1.7/operation/_category_.json deleted file mode 100644 index 7ae2cbda..00000000 --- a/versioned_docs/version-1.7/operation/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Operations", - "position": 9 -} diff --git a/versioned_docs/version-1.7/operation/common-problems.md b/versioned_docs/version-1.7/operation/common-problems.md deleted file mode 100644 index 0c927060..00000000 --- a/versioned_docs/version-1.7/operation/common-problems.md +++ /dev/null @@ -1,119 +0,0 @@ -# Common problems - -This document describes how to identify and resolve common Botkube problems that might occur. - -## Incompatible plugin API version - -**Symptoms** - -- Botkube agent Pod is restarting -- In [Botkube agent logs](diagnostics.mdx#agent-logs), you see such entry: - - ```text - while running application: while waiting for goroutines to finish gracefully: 1 error occurred: - * while starting plugins manager: while creating executor plugins: Incompatible API version with plugin. Plugin version: 2, Client versions: [1] - ``` - -**Debugging steps** - -- [Check Botkube agent version](diagnostics.mdx#agent-version). - -- [Check plugin repository version](diagnostics.mdx#check-configured-plugin-repositories). - -**Solution** - -In order to fix the problem, you need to make sure that the agent version is the same as the plugin repository version. For example, for agent image `ghcr.io/kubeshop/botkube:v1.5.0` you need to configure official plugin repository in version `v1.5.0`: `https://github.com/kubeshop/botkube/releases/download/v1.5.0/plugins-index.yaml`. -To change the repository URL, run: - -```bash -helm upgrade botkube botkube/botkube -n botkube --reuse-values --set plugins.repositories.botkube.url="https://github.com/kubeshop/botkube/releases/download/v1.5.0/plugins-index.yaml" -``` - -## Helm chart loading error - -**Symptoms** - -- You encounter the following errors when running the `botkube install` command: - - ```text - Error: while loading Helm chart: Chart.yaml file is missing - ``` - - or - - ```text - Error: while loading Helm chart: file 'botkube' does not appear to be a gzipped archive; got 'application/octet-stream' - ``` - -**Solution** - -If you're experiencing these errors, it means that there is a conflict with a file or directory named `botkube` in the location where you executed the `botkube install` command. To resolve this issue, follow these steps: - -1. **rename or remove 'botkube':** You cannot have a file or directory named `botkube` in the same location where you are trying to install Botkube. You should either rename or remove the conflicting `botkube` file or directory. - -2. **Change Directory:** Alternatively, you can navigate to a different directory in your command line interface before executing the `botkube install` command. Ensure that the directory where you run the command does not contain any conflicting `botkube` files or directories. - -## Network connections - -Botkube can work in private clusters where inbound connections are limited. However, you need to allow outgoing connections to all configured plugin repositories and API endpoints, depending on the communication platform you intend to use. - -### Botkube official plugins - -The official Botkube plugin index and binaries are hosted on [GitHub releases](https://github.com/kubeshop/botkube/releases). For instance, for the version `v1.5.0` the following URLs are used: - -- Plugin index URL: https://github.com/kubeshop/botkube/releases/download/v1.5.0/plugins-index.yaml -- Helm plugin binary for `linux/amd64`: https://github.com/kubeshop/botkube/releases/download/v1.5.0/executor_helm_linux_amd64.tar.gz - -As a result, you need to allow outbound connections for Botkube to successfully download GitHub assets. - -Additionally, each plugin may define additional dependencies that the [plugin manager](../architecture/index.md#plugin-manager) downloads on startup. For example, the Helm plugin for `linux/amd64` requires `https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz`. -To learn more about all URLs that need to be accessible, you can download a plugin index and check all plugin definitions that you want to enable. - -### Socket Slack - -For the Slack communication platform, we use the [Socket mode](https://api.slack.com/apis/connections/socket) approach. -In order to make this integration work, you need to allow all Slack API URLs defined under https://my.slack.com/help/urls, especially: - -- api.slack.com -- upload.slack.com -- universal-upload-edge.slack.com -- global-upload-edge.slack.com -- wss://wss-backup.slack.com -- wss://wss-mobile.slack.com -- wss://wss-primary.slack.com - -Visit [Slack official guide](https://slack.com/help/articles/360001603387-Manage-Slack-connection-issues#network-settings) for troubleshooting your Slack connection. - -### Cloud Slack - -Cloud Slack integration communicates via gRPC with the Botkube control-plane. In order to make this integration work, you need to allow access to `api.botkube.io`. - -## Plugin's permissions - -If you experience problems while configuring RBAC (Role-Based Access Control) for plugins, you can refer to the [troubleshooting](../configuration/rbac.md#troubleshooting) guide for assistance. - -## I can't see my Slack private channels in Cloud Dashboard - -To comply with Slack's privacy policy, private channels won't be visible until you create a public alias for the respective channel. Refer to the provided instructions for guidance on completing this process: [Setting Public Alias for Private Channels](../installation/slack/cloud-slack#setting-public-alias-for-private-channels) - -## Air-Gap installation - -**Please note that we do not support air-gap installations.** However, here are some suggestions that you may find helpful: - -- Mirror Botkube images to your private registry: - - - [`ghcr.io/kubeshop/botkube:{botkube_version}`](https://github.com/kubeshop/botkube/pkgs/container/botkube), e.g., `ghcr.io/kubeshop/botkube:v1.5.0` - - [`ghcr.io/kubeshop/k8s-sidecar:in-cluster-config`](https://github.com/orgs/kubeshop/packages/container/package/k8s-sidecar) - -- During startup, Botkube downloads repository indexes and all enabled plugins. All of them are stored under the `/tmp` folder. To ensure that the [plugin manager](../architecture/index.md#plugin-manager) does not make external calls, all required plugins must be present. You can achieve this by mounting a Persistent Volume Claim (PVC) at this path. By default, we use [`emptyDir`](https://github.com/kubeshop/botkube/blob/9d0627794078d519987309271b64c94047cd65d9/helm/botkube/templates/deployment.yaml#L176-L177). Later, you can mount your Persistent Volume (PV) with cached plugins in your air-gapped environment. - -- Select a communication platform that can be installed in the air-gapped environment, such as [Mattermost](../installation/mattermost/index.md). - -## Others - -Having trouble finding a solution to your problem? No problem at all! We will help you to get your Botkube up and running. First, follow these steps: - -1. [Export the Botkube agent configuration](diagnostics.mdx#agent-configuration) -2. [Export the Botkube agent logs](diagnostics.mdx#agent-logs) - -After that, come join our Slack community workspace at https://join.botkube.io. Head over to the [`#helping-hands`](https://slack.com/app_redirect?team=TG7TTBLJ0&channel=helping-hands) channel and share the assets you exported along with a description of your issue. Our team is ready to assist you! diff --git a/versioned_docs/version-1.7/operation/diagnostics.mdx b/versioned_docs/version-1.7/operation/diagnostics.mdx deleted file mode 100644 index 33810004..00000000 --- a/versioned_docs/version-1.7/operation/diagnostics.mdx +++ /dev/null @@ -1,157 +0,0 @@ -# Basic diagnostics - -Here you can find the list of basic diagnostic actions that may help you look for bug causes. - -In order to run the suggested commands, make sure that you have installed: - -- [`helm`](https://helm.sh/docs/intro/install/) -- [`kubectl`](https://kubernetes.io/docs/tasks/tools/) - -## Agent - -This section describes [Botkube agent](../architecture/index.md) related diagnostic. - -### Agent version - -The easiest way to check the Agent version is to get the Docker image: - -```bash -kubectl get deploy botkube -n botkube -o=jsonpath="{'Used images\n'}{range .spec.template.spec.containers[*]}{.name}{':\t'}{.image}{'\n'}{end}" -``` - -You should get an output similar to this: - -```bash -Used images -botkube: ghcr.io/kubeshop/botkube:v1.5.0 -cfg-watcher: ghcr.io/kubeshop/k8s-sidecar:in-cluster-config -``` - -The `botkube` is the agent image. The container image tag (`v1.5.0`) is the version in which it was deployed on the cluster. - -### Agent health - -To check if the Agent Pods are in the `Running` state, run: - -```bash -kubectl get pod -n botkube -l app=botkube -``` - -All the containers from Pods should be in the `Running` status. Restarts' number higher than one may also indicate problems, e.g. not enough resource, lack of permissions, network timeouts, etc. - -### Agent logs - -If the Botkube Agent is [healthy](#agent-health), you should be able to track any bug by checking the logs. To check the logs, run: - -```bash -kubectl logs -n botkube -l app=botkube -c botkube -``` - -To get all logs specify `--tail=-1`, otherwise only 10 last lines are displayed. - -To check the logs since a given time, use the `--since-time` or `--since` flag, for example: - -```bash ---since-time=2020-03-30T10:02:08Z -``` - -```bash ---since=3h -``` - -### Agent configuration - -Select a tab to use a tool of your choice for getting Botkube configuration: - - - - -:::note -The `botkube config get` command is available from the `v1.4.0` version. -::: - -Install [Botkube CLI](../cli/getting-started.mdx#installation) and run: - -```bash -botkube config get > /tmp/bk-config.yaml -``` - - - - - -1. Download export-config-job-tpl definition into `/tmp/export-config-job-tpl`. -2. Make sure that the previous job is deleted: - ```bash - kubectl delete job botkube-migration -n botkube - ``` -3. Run a new export config Job based on the configuration from installed Botkube deployment: - ```bash - kubectl get deploy botkube -n botkube -o=go-template-file=/tmp/export-config-job-tpl | kubectl create -f - - ``` -4. Get configuration data: - ```bash - kubectl get cm botkube-config-exporter -ojsonpath='{ .data.config\.yaml }' - ``` - - - - - -### Agent restart - -When Pods are unhealthy, or if the operation processing is stuck, you can restart the Pod using this command: - -``` -kubectl delete po -n botkube -l app=botkube -``` - -### Agent debug logging - -In order to change the logging level to `debug`, run: - -```bash -helm upgrade botkube botkube/botkube -n botkube --set settings.log.level="debug" --reuse-values -``` - -If the Botkube agent Pod isn't restarted automatically, [restart it manually](#agent-restart). - -### Check configured plugin repositories - -Select a tab to use a tool of your choice for checking plugin repository configuration: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -Install [`yq`](https://github.com/mikefarah/yq) and run: - -```bash -helm get values botkube --all -oyaml | yq '.plugins' -``` - - - - - -Install [`jq`](https://stedolan.github.io/jq/download/) and run: - -```bash -helm get values botkube --all -ojson | jq '{ plugins }' -``` - - - - - -```bash -helm get values botkube --all -oyaml | grep -A 10 'plugins:' -``` - -The output may contain more occurrence of a plugin section, so you need to fine the one that has the `repositories` defined. - - - - diff --git a/versioned_docs/version-1.7/plugin/assets/btns-desc.png b/versioned_docs/version-1.7/plugin/assets/btns-desc.png deleted file mode 100644 index 214135f4..00000000 Binary files a/versioned_docs/version-1.7/plugin/assets/btns-desc.png and /dev/null differ diff --git a/versioned_docs/version-1.7/plugin/assets/btns-inline.png b/versioned_docs/version-1.7/plugin/assets/btns-inline.png deleted file mode 100644 index caf54e14..00000000 Binary files a/versioned_docs/version-1.7/plugin/assets/btns-inline.png and /dev/null differ diff --git a/versioned_docs/version-1.7/plugin/assets/demo-msg.gif b/versioned_docs/version-1.7/plugin/assets/demo-msg.gif deleted file mode 100644 index c6aeaf31..00000000 Binary files a/versioned_docs/version-1.7/plugin/assets/demo-msg.gif and /dev/null differ diff --git a/versioned_docs/version-1.7/plugin/assets/echo-demo.gif b/versioned_docs/version-1.7/plugin/assets/echo-demo.gif deleted file mode 100644 index d8accb06..00000000 Binary files a/versioned_docs/version-1.7/plugin/assets/echo-demo.gif and /dev/null differ diff --git a/versioned_docs/version-1.7/plugin/assets/ticker-demo.gif b/versioned_docs/version-1.7/plugin/assets/ticker-demo.gif deleted file mode 100644 index c4ba4b84..00000000 Binary files a/versioned_docs/version-1.7/plugin/assets/ticker-demo.gif and /dev/null differ diff --git a/versioned_docs/version-1.7/plugin/assets/use-tpl.png b/versioned_docs/version-1.7/plugin/assets/use-tpl.png deleted file mode 100644 index 7d64b5fa..00000000 Binary files a/versioned_docs/version-1.7/plugin/assets/use-tpl.png and /dev/null differ diff --git a/versioned_docs/version-1.7/plugin/custom-executor.md b/versioned_docs/version-1.7/plugin/custom-executor.md deleted file mode 100644 index 75289b8a..00000000 --- a/versioned_docs/version-1.7/plugin/custom-executor.md +++ /dev/null @@ -1,260 +0,0 @@ ---- -id: custom-executor -title: "Custom executor" -sidebar_position: 2 ---- - -You can extend Botkube functionality by writing custom executor plugin. An executor allows you to run a given command directly in the chat window of each communication platform. For example, running `kubectl` or `helm` commands. - -Plugin executor is a binary that implements the [executor](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) Protocol Buffers contract. - -## Goal - -This tutorial shows you how to build a custom `echo` executor that responds with a command that was specified by the user in a chat window. - -![echo-demo](./assets/echo-demo.gif) - -For a final implementation, see the [Botkube template repository](./quick-start.md). - -## Prerequisites - -- Basic understanding of the Go language. -- [Go](https://golang.org/doc/install) at least 1.18. - - See [go.mod](https://github.com/kubeshop/botkube/blob/main/go.mod#L1) for the recommended version used by Botkube team. -- [GoReleaser](https://goreleaser.com/) at least 1.13. - -### Develop plugin business logic - -1. Create an executor plugin directory: - - ```bash - mkdir botkube-plugins && cd botkube-plugins - ``` - -2. Initialize the Go module: - - ```bash - go mod init botkube-plugins - ``` - -3. Create the `main.go` file for the `echo` executor with the following template: - - ```go - cat << EOF > main.go - package main - - import ( - "context" - "fmt" - - "github.com/MakeNowJust/heredoc" - "github.com/hashicorp/go-plugin" - "github.com/kubeshop/botkube/pkg/api" - "github.com/kubeshop/botkube/pkg/api/executor" - ) - - // EchoExecutor implements the Botkube executor plugin interface. - type EchoExecutor struct{} - - func main() { - executor.Serve(map[string]plugin.Plugin{ - "echo": &executor.Plugin{ - Executor: &EchoExecutor{}, - }, - }) - } - EOF - ``` - - This template code imports required packages and registers `EchoExecutor` as the gRPC plugin. At this stage, the `EchoExecutor` service doesn't implement the required [Protocol Buffers](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) contract. We will add the required methods in the next steps. - -4. Download imported dependencies: - - ```bash - go mod tidy - ``` - -5. Add the required `Metadata` method: - - ```go - // Metadata returns details about the Echo plugin. - func (*EchoExecutor) Metadata(context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - Version: "1.0.0", - Description: "Echo sends back the command that was specified.", - JSONSchema: api.JSONSchema{ - Value: heredoc.Doc(`{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "echo", - "description": "Example echo plugin", - "type": "object", - "properties": { - "formatOptions": { - "description": "Options to format echoed string", - "type": "array", - "items": { - "type": "string", - "enum": [ "bold", "italic" ] - } - } - }, - "additionalProperties": false - }`), - }, - }, nil - } - ``` - - The `Metadata` method returns basic information about your plugin. This data is used when the plugin index is generated in an automated way. You will learn more about that in the next steps. - - Ąs a part of the `Metadata` method, you can define the plugin dependencies. To learn more about them, see the [Dependencies](./dependencies.md) document. - -6. Add the required `Execute` method: - - ```go - // Execute returns a given command as a response. - func (*EchoExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - return executor.ExecuteOutput{ - Message: api.NewCodeBlockMessage(response, true), - }, nil - } - ``` - - The `Execute` method is the heart of your executor plugin. This method runs your business logic and returns the execution output. Next, the Botkube core sends back the response to a given communication platform. - If the communication platform supports interactivity, you can construct and return interactive messages containing buttons, dropdowns, input text, and more complex formatting. To learn more about it, see the [Interactive Messages](./interactivity.md) guide. - - For each `Execute` method call, Botkube attaches the list of associated configurations. You will learn more about that in the [**Passing configuration to your plugin**](#passing-configuration-to-your-plugin) section. - -7. Add the required `Help` method: - - ```go - // Help returns help message - func (EchoExecutor) Help(context.Context) (api.Message, error) { - btnBuilder := api.NewMessageButtonBuilder() - return api.Message{ - Sections: []api.Section{ - { - Base: api.Base{ - Header: "Run `echo` commands", - Description: description, - }, - Buttons: []api.Button{ - btnBuilder.ForCommandWithDescCmd("Run", "echo 'hello world'"), - }, - }, - }, - }, nil - } - ``` - - You can use `api.NewCodeBlockMessage` or `api.NewPlaintextMessage` helper functions, or construct your own message. - -## Build plugin binaries - -Now 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 your needs. - -:::note -Instead of GoReleaser, you can use another tool of your choice. -::: - -1. Create the GoReleaser configuration file: - - ```yaml - cat << EOF > .goreleaser.yaml - project_name: botkube-plugins - before: - hooks: - - go mod download - - builds: - - id: echo - binary: executor_echo_{{ .Os }}_{{ .Arch }} - - no_unique_dist_dir: true - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - goarch: - - amd64 - - arm64 - goarm: - - 7 - - snapshot: - name_template: 'v{{ .Version }}' - EOF - ``` - -2. Build the binaries: - - ```bash - goreleaser build --rm-dist --snapshot - ``` - -Congrats! You just created your first Botkube executor plugin! :tada: - -Now it's time to [test it locally with Botkube](local-testing.md). Once you're done testing, see how to [distribute it](repository.md). - -## Passing configuration to your plugin - -Sometimes your executor plugin requires a configuration specified by the end-user. Botkube supports such requirement and provides an option to specify plugin configuration under `config`. An example Botkube configuration looks like this: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - name: "all-teams" - bindings: - executors: - - echo-team-a - - echo-team-b - -executors: - "echo-team-a": # executor configuration group name - botkube/echo: - enabled: true - config: - formatOptions: ["italic"] - "echo-team-b": # executor configuration group name - botkube/echo: - enabled: true - config: - formatOptions: ["bold"] -``` - -This means that two different `botkube/echo` plugin configurations were bound to the `all-teams` Slack channel. Under `executor.ExecuteInput{}.Configs`, you will find the list of configurations in the YAML format as specified under the `config` property for each bound and enabled executor. The order of the configuration is the same as specified under the `bindings.executors` property. It's up to the plugin author to merge the passed configurations. You can use our helper function from the plugin extension package (`pluginx`). - -```go -import ( - "context" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -// Config holds the executor configuration. -type Config struct { - FormatOptions []string `yaml:"options,omitempty"` -} - -func (EchoExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - var cfg Config - err := pluginx.MergeExecutorConfigs(in.Configs, &cfg) - if err != nil { - return executor.ExecuteOutput{}, err - } - // rest logic -} -``` - -:::caution -Botkube starts only one process of a given executor plugin, and the list of configuration YAMLs can be different per gRPC call, so you shouldn't cache the merged configuration. -::: - -## Notes - -- Streaming command response is not supported. As a result, commands like `helm install --wait` doesn't work well, as the response won't be sent until the command finishes. It's recommended to return the response as soon as possible. -- The interactive message is not yet supported. diff --git a/versioned_docs/version-1.7/plugin/custom-source.md b/versioned_docs/version-1.7/plugin/custom-source.md deleted file mode 100644 index 9107a8d0..00000000 --- a/versioned_docs/version-1.7/plugin/custom-source.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -id: custom-source -title: "Custom source" -sidebar_position: 3 ---- - -You can extend Botkube functionality by writing custom source plugin. A source allows you to get asynchronous streaming of domain-specific events. For example, streaming Kubernetes or Prometheus events . - -Source is a binary that implements the [source](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) Protocol Buffers contract. - -## Goal - -This tutorial shows you how to build a custom `ticker` source that emits an event at a specified interval. - -![ticker-demo](./assets/ticker-demo.gif) - -For a final implementation, see the [Botkube template repository](./quick-start.md). - -## Prerequisites - -- Basic understanding of the Go language. -- [Go](https://golang.org/doc/install) at least 1.18. - - See [go.mod](https://github.com/kubeshop/botkube/blob/main/go.mod#L1) for the recommended version used by Botkube team. -- [GoReleaser](https://goreleaser.com/) at least 1.13. - -### Develop plugin business logic - -1. Create a source plugin directory: - - ```bash - mkdir botkube-plugins && cd botkube-plugins - ``` - -2. Initialize the Go module: - - ```bash - go mod init botkube-plugins - ``` - -3. Create the `main.go` file for the `ticker` source with the following template: - - ```go - cat << EOF > main.go - package main - - import ( - "context" - "fmt" - "time" - - "github.com/hashicorp/go-plugin" - "github.com/kubeshop/botkube/pkg/api" - "github.com/kubeshop/botkube/pkg/api/source" - "gopkg.in/yaml.v3" - ) - - // Config holds source configuration. - type Config struct { - Interval time.Duration - } - - // Ticker implements the Botkube source plugin interface. - type Ticker struct{} - - func main() { - source.Serve(map[string]plugin.Plugin{ - "ticker": &source.Plugin{ - Source: &Ticker{}, - }, - }) - } - EOF - ``` - - This template code imports required packages and registers `Ticker` as the gRPC plugin. At this stage, the `Ticker` service doesn't implement the required [Protocol Buffers](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) contract. We will add the required methods in the next steps. - -4. Download imported dependencies: - - ```bash - go mod tidy - ``` - -5. Add the required `Metadata` method: - - ```go - // Metadata returns details about the Ticker plugin. - func (Ticker) Metadata(_ context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - Version: "0.1.0", - Description: "Emits an event at a specified interval.", - }, nil - } - ``` - - The `Metadata` method returns basic information about your plugin. This data is used when the plugin index is generated in an automated way. You will learn more about that in the next steps. - - Ąs a part of the `Metadata` method, you can define the plugin dependencies. To learn more about them, see the [Dependencies](./dependencies.md) document. - -6. Add the required `Stream` method: - - ```go - // Stream sends an event after configured time duration. - func (Ticker) Stream(ctx context.Context, in source.StreamInput) (source.StreamOutput, error) { - cfg, err := mergeConfigs(in.Configs) - if err != nil { - return source.StreamOutput{}, err - } - - ticker := time.NewTicker(cfg.Interval) - out := source.StreamOutput{ - Event: make(chan source.Event), - } - - go func() { - for { - select { - case <-ctx.Done(): - ticker.Stop() - case <-ticker.C: - out.Event <- source.Event{ - Message: api.NewPlaintextMessage("Ticker Event", true), - } - } - } - }() - - return out, nil - } - - // mergeConfigs merges all input configuration. In our case we don't have complex merge strategy, - // the last one that was specified wins :) - func mergeConfigs(configs []*source.Config) (Config, error) { - // default config - finalCfg := Config{ - Interval: time.Minute, - } - - for _, inputCfg := range configs { - var cfg Config - err := yaml.Unmarshal(inputCfg.RawYAML, &cfg) - if err != nil { - return Config{}, fmt.Errorf("while unmarshalling YAML config: %w", err) - } - - if cfg.Interval != 0 { - finalCfg.Interval = cfg.Interval - } - } - - return finalCfg, nil - } - ``` - - The `Stream` method is the heart of your source plugin. This method runs your business logic and push events into the `out.Output` channel. Next, the Botkube core sends the event to a given communication platform. - - The `Stream` method is called only once. Botkube attaches the list of associated configurations. You will learn more about that in the [**Passing configuration to your plugin**](#passing-configuration-to-your-plugin) section. - -7. Implement `HandleExternalRequest` method: - - Plugins can handle external requests from Botkube incoming webhook. Any external system can call the webhook and trigger a given source plugin. By default, the path of the incoming webhook is `http://botkube.botkube.svc.cluster.local:2115/sources/v1/{sourceName}` and it supports POST requests in JSON payload format. - - - If you don't want to handle external events from incoming webhook, simply nest the `source.HandleExternalRequestUnimplemented` under your struct: - - ```go - // Ticker implements the Botkube executor plugin interface. - type Ticker struct { - // specify that the source doesn't handle external requests - source.HandleExternalRequestUnimplemented - } - ``` - - - To handle such requests, you need to implement the `HandleExternalRequest` method. In this case, the `message` property from payload is outputted to the bound communication platforms: - - ```go - // HandleExternalRequest handles incoming payload and returns an event based on it. - func (Forwarder) HandleExternalRequest(_ context.Context, in source.ExternalRequestInput) (source.ExternalRequestOutput, error) { - var p payload - err := json.Unmarshal(in.Payload, &p) - if err != nil { - return source.ExternalRequestOutput{}, fmt.Errorf("while unmarshaling payload: %w", err) - } - - if p.Message == "" { - return source.ExternalRequestOutput{}, fmt.Errorf("message cannot be empty") - } - - msg := fmt.Sprintf("*Incoming webhook event:* %s", p.Message) - return source.ExternalRequestOutput{ - Event: source.Event{ - Message: api.NewPlaintextMessage(msg, true), - }, - }, nil - } - ``` - -## Build plugin binaries - -Now it's time to build your plugin. For that purpose we will use GoReleaser. It simplifies building Go binaries for different architectures. - -:::note -Instead of GoReleaser, you can use another tool of your choice. The important thing is to produce the binaries for the architecture of the host platform where Botkube is running. -::: - -1. Create the GoReleaser configuration file: - - ```yaml - cat << EOF > .goreleaser.yaml - project_name: botkube-plugins - before: - hooks: - - go mod download - - builds: - - id: ticker - binary: source_ticker_{{ .Os }}_{{ .Arch }} - - no_unique_dist_dir: true - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - goarch: - - amd64 - - arm64 - goarm: - - 7 - - snapshot: - name_template: 'v{{ .Version }}' - EOF - ``` - -2. Build the binaries: - - ```bash - goreleaser build --rm-dist --snapshot - ``` - -Congrats! You just created your first Botkube source plugin! :tada: - -Now it's time to [test it locally with Botkube](local-testing.md). Once you're done testing, see how to [distribute it](repository.md). - -## Passing configuration to your plugin - -Sometimes your source plugin requires a configuration specified by the end-user. Botkube supports such requirement and provides an option to specify plugin configuration under `config`. An example Botkube configuration looks like this: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - name: "all-teams" - bindings: - sources: - - ticker-team-a - - ticker-team-b - -sources: - "ticker-team-a": - botkube/ticker: - enabled: true - config: - interval: 1s - "ticker-team-b": - botkube/ticker: - enabled: true - config: - interval: 2m -``` - -This means that two different `botkube/ticker` plugin configurations were bound to the `all-teams` Slack channel. For each bound configuration [Botkube source dispatcher](../architecture/index.md#plugin-source-bridge) calls `Stream` method with the configuration specified under the `bindings.sources` property. diff --git a/versioned_docs/version-1.7/plugin/debug.md b/versioned_docs/version-1.7/plugin/debug.md deleted file mode 100644 index 1f2a8de0..00000000 --- a/versioned_docs/version-1.7/plugin/debug.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: debugging -title: "Debugging" -sidebar_position: 10 ---- - -Embedded logging allows you to access more information about the runtime operations of Botkube plugins. - -By default: - -- the gRPC client log level is set to `info`, -- the standard error ([`stderr`]()) of a plugin binary is logged at `error` level, -- the standard output ([`stdout`]()) of a plugin binary is ignored. - -To change the default log level, export a dedicated environment variable following this pattern `LOG_LEVEL_{pluginType}_{pluginRepo}_{pluginName}`, e.g., `LOG_LEVEL_EXECUTOR_BOTKUBE_KUBECTL`. The possible log level values are: - -- `trace` -- `debug` -- `info` -- `warning` -- `error` -- `fatal` -- `panic` - -The plugin standard output is logged only if `debug` level is set. - -:::info -The plugin name is normalized and all characters different from letters, digits, and the underscore (`_`) are replaced with underscore (`_`). -::: - -To change the log level for a given plugin directly in the Botkube deployment, specify `extraEnv` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. For example: - -```yaml -extraEnv: - - name: LOG_LEVEL_EXECUTOR_BOTKUBE_HELM - value: "debug" -``` diff --git a/versioned_docs/version-1.7/plugin/dependencies.md b/versioned_docs/version-1.7/plugin/dependencies.md deleted file mode 100644 index f60c50e1..00000000 --- a/versioned_docs/version-1.7/plugin/dependencies.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -id: dependencies -title: "Dependencies" -sidebar_position: 6 ---- - -Plugins can depend on other binaries, which are then downloaded by Botkube along with a given plugin. This is supported for both executor and source plugins. - -## Define dependencies for plugin index generation - -As a part of the `Metadata` method, define the `Dependencies` property. The key is the name of the dependency, and the value is a structure with links to binaries for each platform. - -:::info -For downloading plugins and theirs dependencies, Botkube uses `go-getter` library. It supports multiple URL formats (such as HTTP, Git repositories or S3), and is able to unpack archives and extract binaries from them. For more details, see the documentation on the [`go-getter`](https://github.com/hashicorp/go-getter) GitHub repository. -::: - -```go -// Metadata returns details about Helm plugin. -func (e *Executor) Metadata(context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - // ... - Dependencies: map[string]api.Dependency{ - "helm": { - // Links source: https://github.com/helm/helm/releases/tag/v3.6.3 - // Using go-getter syntax to unwrap the underlying directory structure. - // Read more on https://github.com/hashicorp/go-getter#subdirectories - URLs: map[string]string{ - "darwin/amd64": "https://get.helm.sh/helm-v3.6.3-darwin-amd64.tar.gz//darwin-amd64", - "darwin/arm64": "https://get.helm.sh/helm-v3.6.3-darwin-arm64.tar.gz//darwin-arm64", - "linux/amd64": "https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz//linux-amd64", - "linux/arm": "https://get.helm.sh/helm-v3.6.3-linux-arm.tar.gz//linux-arm", - "linux/arm64": "https://get.helm.sh/helm-v3.6.3-linux-arm64.tar.gz//linux-arm64", - "linux/386": "https://get.helm.sh/helm-v3.6.3-linux-386.tar.gz//linux-386", - "linux/ppc64le": "https://get.helm.sh/helm-v3.6.3-linux-ppc64le.tar.gz//linux-ppc64le", - "linux/s390x": "https://get.helm.sh/helm-v3.6.3-linux-s390x.tar.gz//linux-s390x", - "windows/amd64": "https://get.helm.sh/helm-v3.6.3-windows-amd64.zip//windows-amd64", - } - }, - }, - }, nil -} -``` - -Such a definition will result in the following `dependencies` section in the plugin index: - -```yaml -- name: helm - # ... - urls: - - url: "..." # URL to darwin/amd64 plugin binary - platform: - os: darwin - architecture: amd64 - dependencies: - helm: - url: https://get.helm.sh/helm-v3.6.3-darwin-amd64.tar.gz//darwin-amd64 - - url: "..." # URL to darwin/amd64 plugin binary - platform: - os: darwin - architecture: arm64 - dependencies: - helm: - url: https://get.helm.sh/helm-v3.6.3-darwin-arm64.tar.gz//darwin-arm64 - - url: "..." # URL to linux/amd64 plugin binary - platform: - os: linux - architecture: amd64 - dependencies: - helm: - url: https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz//linux-amd64 - - url: "..." # URL to linux/arm64 plugin binary - platform: - os: linux - architecture: arm64 - dependencies: - helm: - url: https://get.helm.sh/helm-v3.6.3-linux-arm64.tar.gz//linux-arm64 -``` - -Read how to use the plugin index in the [Repository](./repository.md) document. - -## Using dependencies - -During Botkube startup, Botkube plugin manager fetches the plugin binaries along with all dependencies. Each dependency binary is named exactly as specified in the [plugin index](#define-dependencies-for-plugin-index-generation). The dependency is fetched to a directory specified in the `PLUGIN_DEPENDENCY_DIR` environment variable passed to the plugin. - -For example, in case of Helm executor, to run the Helm binary fetched by Botkube plugin manager, the plugin uses the following code: - -```go - commandName := "helm" // name of the binary specified in Dependencies - // Check if PLUGIN_DEPENDENCY_DIR environment variable is set; if not, Go will try to lookup for `helm` binary - depDir, found := os.LookupEnv("PLUGIN_DEPENDENCY_DIR") - if found { - // Use exactly the binary from the $PLUGIN_DEPENDENCY_DIR directory - commandName = fmt.Sprintf("%s/%s", depDir, commandName) - } - - // Execute the command and return output - cmd := exec.CommandContext(ctx, commandName, args...) - out, err := cmd.CombinedOutput() -``` - -## Example - -To get familiar with the full example, see the [Helm plugin](https://github.com/kubeshop/botkube/tree/main/cmd/executor/helm) in the Botkube repository. The Helm plugin depends on the official [Helm CLI](https://helm.sh) binary, which is defined as a part of the `Metadata` method. diff --git a/versioned_docs/version-1.7/plugin/index.md b/versioned_docs/version-1.7/plugin/index.md deleted file mode 100644 index 4cb341bd..00000000 --- a/versioned_docs/version-1.7/plugin/index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -id: plugin -title: "Plugin Development" -sidebar_position: 6 ---- - -The Botkube plugin system allows you to extend the Botkube core with custom logic. For example, call or receive events from third-party services. - -To learn more about the Botkube plugin system, follow the recommended steps: - -- Get familiar with the Botkube [architecture](../architecture). -- Enable and configure the [Helm](../configuration/executor/helm.md) executor. -- Use the [template repository](./quick-start.md). -- Learn how to develop a custom [executor](custom-executor.md) or [source](custom-source.md) plugin. -- [Distribute the plugins](repository.md) that you built. - -Share feedback with us via [Slack](https://join.botkube.io/) or [GitHub](https://github.com/kubeshop/botkube/issues)! diff --git a/versioned_docs/version-1.7/plugin/interactivity.md b/versioned_docs/version-1.7/plugin/interactivity.md deleted file mode 100644 index 8b2bd964..00000000 --- a/versioned_docs/version-1.7/plugin/interactivity.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -id: interactive-messages -title: "Interactive messages" -sidebar_position: 5 ---- - -Some of our communication platforms support interactive messages. If interactivity is supported the `IsInteractivitySupported` property under source or execution context is set to **true**. - -In this guide, we describe how interactivity applies to messages, and show you how to build ones. - -:::tip -For an example implementation, see the [`msg` executor source-code](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/msg/main.go). -::: - -![demo](./assets/demo-msg.gif) - -## Primitives - -You can construct and return interactive messages containing buttons, dropdowns, input text, and more complex formatting. For that reason, we introduced a generic `api.Messages` model. - -- [Buttons](#buttons) -- [Dropdowns](#dropdowns) -- [Input text](#input-text-fields) - -For all primitives you need to attach the proper command that will be executed by Botkube. The pattern is: - -```go -import "github.com/kubeshop/botkube/pkg/api" - -command := api.MessageBotNamePlaceholder + " " + " " -``` - -The `api.MessageBotNamePlaceholder` constant, is our cross-platform placeholder that is replaced by Botkube core with a proper bot name. It's mandatory, otherwise Botkube core will ignore a given command, e.g. a button click. - -The `` and `` should be replaced based on your needs. You replace `` with your own plugin name, or other plugin name, like `kubectl`, `helm`, etc. However, if you use other plugin name, a given command won't work if plugin is not enabled. - -### Buttons - -You can define a list of buttons under `Section` object. To construct a given button you can use our helper `api.NewMessageButtonBuilder` builder. For example: - -```go -const pluginName = "msg" - -btnBuilder := api.NewMessageButtonBuilder() - -msg := api.Message{ - Sections: []api.Section{ - { - Buttons: []api.Button{ - btnBuilder.ForCommandWithDescCmd("Run act1", fmt.Sprintf("%s buttons act1", pluginName)), - btnBuilder.ForCommandWithDescCmd("Run act2", fmt.Sprintf("%s buttons act2", pluginName), api.ButtonStylePrimary), - btnBuilder.ForCommandWithDescCmd("Run act3", fmt.Sprintf("%s buttons act3", pluginName), api.ButtonStyleDanger), - }, - }, - }, -} -``` - -When a button is clicked, Botkube runs an associated command. For **Run act1** it's `msg buttons act1`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -If you use only `ForCommandWithoutDesc`, all buttons are render in the same line. -![btns-desc](./assets/btns-desc.png) - -Otherwise, each button is rendered in new line with the description on the left side and button on the right side. -![btns-inline](./assets/btns-inline.png) - -### Dropdowns - -You can define dropdowns under `Section` object. You can split options into groups. Optionally, you can define the initial option. It must be included also under `OptionsGroups`. - -```go -cmdPrefix := func(cmd string) string { - return fmt.Sprintf("%s %s %s", api.MessageBotNamePlaceholder, pluginName, cmd) -} - -msg := api.Message{ - Sections: []api.Section{ - { - Selects: api.Selects{ - ID: "select-id", - Items: []api.Select{ - { - Name: "two-groups", - Command: cmdPrefix("selects two-groups"), - OptionGroups: []api.OptionGroup{ - { - Name: cmdPrefix("selects two-groups/1"), - Options: []api.OptionItem{ - {Name: "BAR", Value: "BAR"}, - {Name: "BAZ", Value: "BAZ"}, - {Name: "XYZ", Value: "XYZ"}, - }, - }, - { - Name: cmdPrefix("selects two-groups/2"), - Options: []api.OptionItem{ - {Name: "123", Value: "123"}, - {Name: "456", Value: "456"}, - {Name: "789", Value: "789"}, - }, - }, - }, - // MUST be defined also under OptionGroups.Options slice. - InitialOption: &api.OptionItem{ - Name: "789", Value: "789", - }, - }, - }, - }, - }, - }, -} -``` - -When user select a given option, Botkube runs an associated command and appends selected option at the end. For **BAR** it's `msg selects two-gropus BAR`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -### Input text fields - -```go -msg := api.Message{ - PlaintextInputs: []api.LabelInput{ - { - Command: fmt.Sprintf("%s %s input-text", api.MessageBotNamePlaceholder, pluginName), - DispatchedAction: api.DispatchInputActionOnEnter, - Placeholder: "String pattern to filter by", - Text: "Filter output", - }, - }, -} -``` - -When user types an input string and clicks enter, Botkube runs an associated command and appends input text in quotes. For example, for input **"text"** it's `msg input-text "test"`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -## Message visibility - -If the interactivity is enabled, you can change the default message visibility options: - -- The `OnlyVisibleForYou` property allows you to display the message only to the user who clicked a given button or dropdown. It's taken into account only if respond to the interactive message. It cannot be used initial messages that are automatically sent to a given channel. -- The `ReplaceOriginalMessage` property allows you to replace the message which triggered interactive command. You cannot change `OnlyVisibleForYou` as the message retains its initial visibility. diff --git a/versioned_docs/version-1.7/plugin/local-testing.md b/versioned_docs/version-1.7/plugin/local-testing.md deleted file mode 100644 index 0d21a40a..00000000 --- a/versioned_docs/version-1.7/plugin/local-testing.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -id: local-testing -title: "Local testing" -sidebar_position: 7 ---- - -This document describes steps for running Botkube core locally together with a local file server for serving your plugins during development phase. - -**Prerequisite** - -- [Node.js](https://nodejs.org/en/download/), to use `npx` - -**Steps** - -1. Follow steps from [`CONTRIBUTING.md`](https://github.com/kubeshop/botkube/blob/main/CONTRIBUTING.md#build-and-run-locally) about running Botkube locally. - -2. Create a file with your plugins' repository, plugin configuration and bindings for enabled communication platform: - - ```yaml - plugins: - repositories: - local-repo: - url: http://localhost:8080/plugins-index.yaml - - executors: - "plugins": - local-repo/executor-name: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. - sources: - "plugins": - local-repo/source-name: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. - - communications: - # Enable a given communication platform and define bindings to a given executor and source plugins. - ``` - - For example, for Slack and example `echo` and `ticker` plugins, provide `appToken` and `botToken` and run the script: - -
- Create /tmp/config-values.yaml - - ```yaml - cat << EOF > /tmp/config-values.yaml - plugins: - repositories: - local-repo: - url: http://localhost:8080/plugins-index.yaml - - executors: - "plugins": - local-repo/echo: - enabled: true - config: - transformResponseToUpperCase: true - sources: - "plugins": - local-repo/ticker: - enabled: true - config: - interval: 5s - communications: - default-group: - socketSlack: - enabled: true - channels: - default: - name: random - bindings: - executors: - - 'plugins' - sources: - - 'plugins' - appToken: "" # provide your token starting with xapp-1- - botToken: "" # provide your token starting with xoxb- - settings: - clusterName: local-dev - EOF - ``` - -
- -3. In your plugin project directory, start a static plugin server: - - ```bash - # Use https://github.com/vercel/serve - npx serve --listen 8080 - ``` - - :::note - If Botkube runs on external Kubernetes cluster, you can use the tunneling software, for example [`ngrok`](https://ngrok.com/). It creates an externally addressable URL for a port you open locally on your machine. - ::: - -4. In your plugin project directory open a new terminal window. -5. Export Botkube plugins cache directory: - - ```bash - export BOTKUBE_PLUGINS_CACHE__DIR="/tmp/plugins" - ``` - -6. Export Botkube repository path cloned in the first step: - - ```bash - export BOTKUBE_REPO_PATH={botkube_repo_path} - ``` - -7. Export configuration files: - - ```bash - export BOTKUBE_CONFIG_PATHS="${BOTKUBE_REPO_PATH}/helm/botkube/values.yaml,/tmp/config-values.yaml" - ``` - -8. Build plugins and start Botkube: - - :::note - Each time you change a plugin source code, re-run the above command. - ::: - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -
- - - -1. Download index builder: - -```bash -go get github.com/kubeshop/botkube/hack -``` - -2. Build plugins and run Botkube: - -```bash -# rebuild plugins only for current GOOS and GOARCH -goreleaser build --rm-dist --snapshot --single-target && -# regenerate index -go run github.com/kubeshop/botkube/hack -binaries-path "./dist" -url-base-path "http://localhost:8080/dist" -use-archive=false && -# remove cached plugins -rm -rf $BOTKUBE_PLUGINS_CACHE__DIR && -# start Botkube -${BOTKUBE_REPO_PATH}/botkube -``` - - - - -```bash -# rebuild plugins only for current GOOS and GOARCH -make build-plugins-single && -# regenerate index -env PLUGIN_DOWNLOAD_URL_BASE_PATH="http://localhost:8080/dist" make gen-plugin-index && -# remove cached plugins -rm -rf $BOTKUBE_PLUGINS_CACHE__DIR && -# start Botkube -${BOTKUBE_REPO_PATH}/botkube -``` - - - -
diff --git a/versioned_docs/version-1.7/plugin/quick-start.md b/versioned_docs/version-1.7/plugin/quick-start.md deleted file mode 100644 index e4abb5f5..00000000 --- a/versioned_docs/version-1.7/plugin/quick-start.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: quick-start -title: "Quick start" -sidebar_position: 1 ---- - -Botkube provides a quick start repository to start developing Botkube [source](../architecture/index.md#source) and [executor](../architecture/index.md#executor) plugins in Go. It has all batteries included; example plugins: - -- The [`echo`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/echo/main.go) executor that sends back the command that was specified, -- The [`ticker`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/ticker/main.go) source that emits an event each time the configured time duration elapses, -- The [`forwarder`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/forwarder/main.go) source that echos the message sent as an incoming webhook request. - -and two example release jobs: - -- [GitHub releases](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/release.yml) -- [GitHub Pages](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/pages-release.yml) - -## Use template - -1. Navigate to [`botkube-plugins-template`](https://github.com/kubeshop/botkube-plugins-template). - -2. Click **"Use this template"**, next **"Create a new repository"** - - ![Create Repo](./assets/use-tpl.png) - - This creates your own plugin repository with a single commit. - -3. After a few seconds, the `.github/workflows/setup.yml` job will create a new commit. This job removes Kubeshop related files, such as: - - - `CONTRIBUTING.md` - - `CODE_OF_CONDUCT.md` - - `LICENSE` - - `SECURITY.md` - - `.github/CODEOWNERS` - - Additionally, it updates links in README.md to point to your own repository instead of Kubeshop's one. In case of job failure, you need to make and commit those changes manually. - - This job runs only once, later you can remove it or disable it. - -4. Decide which release job you prefer, the GitHub releases, or GitHub pages. Once decided, remove one the above workflow in your new repository: - - - GitHub releases, defined at `.github/workflows/release.yml` in your GitHub repository. - - GitHub Pages, defined at `.github/workflows/pages-release.yml` in your GitHub repository. - - If you pick the GitHub Pages, a further configuration is needed: - - 1. In project settings, enable [publishing GitHub Pages via GitHub Action](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow). - 2. Adjust the `github-pages` deployment environment. You can either: - - remove the deployment environment if you don't need any protection rules - - add an environment protection rule so that you can deploy pages on each new tag. If you use tagging like `vX.Y.Z`, you can add the `v*` rule. As an alternative, can select **All branches** from the dropdown. - -5. Add LICENSE file and update the README.md file to describe the plugins that you created. diff --git a/versioned_docs/version-1.7/plugin/repository.md b/versioned_docs/version-1.7/plugin/repository.md deleted file mode 100644 index 52635cc2..00000000 --- a/versioned_docs/version-1.7/plugin/repository.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -id: repo -title: "Repository" -sidebar_position: 8 ---- - -A plugin repository is a place where you store your plugin binaries. This repository must be publicly available and supports downloading assets via HTTP(s). This document explains how to create Botkube plugin repositories by providing examples based on GitHub functionality. However, any static file server can be used, for instance: `s3`, `gcs`, etc. - -This document describes how to set up such repository. If you use or plan to use GitHub you can adapt the [template repository](quick-start.md) that has batteries included to start developing and hosting Botkube plugins right away. - -## Index file - -Your plugin repository must contain at least one index file and one plugin binary. Depending on your needs and preferences, you can create one or more index files to categorize your plugins. You can host both the executor and source plugins in a single repository. You can also include them in the same index file. - -In the index file, provide an entry for every plugin from your plugin repository. The index file must have the following syntax: - -```yaml -entries: - - name: { plugin_name } - type: { plugin_type } # executor or source - description: { plugin_description } - version: { plugin_version } - urls: - - url: { url_to_plugin_binary } - platform: - os: { plugin_operating_system } # darwin or linux - architecture: { plugin_architecture } # amd64 or arm64 - dependencies: # optional dependencies - { dependency_name }: - url: { url_to_dependency_binary } -``` - -It is not required to host a plugin or dependency binary on the same server as the index file. - -### Generate index file - -You can create the index file by yourself our use our tool to generate it automatically based on the directory with plugins binaries. The binaries must be named according to the following pattern: - -- For executors, `executor_{plugin_name}_{os}_{arch}`; for example, `executor_kubectl_darwin_amd64`. -- For sources, `source_{plugin_name}_{os}_{arch}`; for example, `source_kubernetes_darwin_amd64`. - -**Steps** - -1. In your plugin repository, add `tools.go`: - - ```go - cat << EOF > tools.go - //go:build tools - - package tools - - import ( - _ "github.com/kubeshop/botkube/hack" - ) - EOF - ``` - - :::note - We use the `tools.go` file, which is the [recommended way of tracking tool dependencies](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module). - ::: - -2. Refresh dependencies: - - ```bash - go mod tidy - ``` - -3. Build all your plugins. See [**Build plugin binaries**](custom-executor.md). - -4. Generate an index file: - - ```bash - go run github.com/kubeshop/botkube/hack -binaries-path "./dist" -url-base-path "https://example.com" - ``` - - :::info - Replace the `-url-base-path` flag with the base path of your HTTP server. See [Hosting plugins](#host-plugins) for some examples. - ::: - -## Host plugins - -This section describes example ways for serving Botkube plugins. - -### GitHub releases - -A GitHub release allows you to upload additional assets that are later accessible with a predictable URL. When you generate the index file, specify the `-url-base-path` flag as `https://github.com/{owner}/{repo}/releases/download/{release_tag}`, for example, `https://github.com/kubeshop/botkube/releases/download/v1.0.0`. - -Once the plugin binaries are built and the index file is generated, you can create a GitHub release using [GitHub CLI](https://cli.github.com/). For example: - -```bash -gh release create v1.0.0 \ - ./dist/source_* \ - ./dist/executor_* \ - ./plugins-index.yaml -``` - -#### Automation - -You can use [GitHub Actions](https://docs.github.com/en/actions) to publish Botkube plugins automatically each time a new tag is pushed. See the [`release` workflow](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/release.yml) on the `botkube-plugins-template` repository for the out-of-the-box solution, which you can use and modify if needed. - -### GitHub pages - -GitHub allows you to serve static pages via GitHub Pages. When you generate the index file, specify the `-url-base-path` flag as `https://{user}.github.io/{repository}`, for example, `https://kubeshop.github.io/botkube-plugins`. - -**Initial setup** - -1. Navigate to the Git repository with your plugins. - -2. Create the `gh-pages` branch: - - ```bash - git switch --orphan gh-pages - git commit --allow-empty -m "Initialization commit" - git push -u origin gh-pages - ``` - -3. Follow [this](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch) guide to make sure your `gh-pages` branch is set as the source for GitHub Pages. - -**Publishing steps** - -1. Clone `gh-pages` into `/tmp/botkube-plugins`: - - ```bash - git clone -b gh-pages "https://github.com/{owner}/{repo}.git" /tmp/botkube-plugins - ``` - -2. Move built binaries and generated index file: - - ```bash - mv dist/executor_* /tmp/botkube-plugins/ - mv dist/source_* /tmp/botkube-plugins/ - mv plugins-index.yaml /tmp/botkube-plugins - ``` - -3. Commit and push copied files: - - ```bash - cd /tmp/botkube-plugins - git add -A - git commit -m "Release Botkube plugins" - git push - ``` - -4. Remove cloned `gh-pages`: - - ```bash - cd - - rm -rf /tmp/botkube-charts - ``` - -In such setup, you can use your default branch to store your plugins code, and the `gh-pages` branch as a plugin repository. - -#### Automation - -You can use [GitHub Actions](https://docs.github.com/en/actions) to publish Botkube plugins automatically each time a new tag is pushed. See the [`pages-release` workflow](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/pages-release.yml) on the `botkube-plugins-template` repository for the out-of-the-box solution, which you can use and modify if needed. - -### Use hosted plugins - -To use the plugins that you published, add your repository under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file for a given Botkube deployment. For example: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Once the plugin repository is added, you can refer to it in the `executor` or `sources` section. - -```yaml -executors: - "plugins": - repo-name/executor-name@v1.0.0: # Plugin name syntax: {repo}/{plugin}[@{version}]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. -sources: - "plugins": - repo-name/source-name@v1.0.0: # Plugin name syntax: {repo}/{plugin}[@{version}]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. -``` diff --git a/versioned_docs/version-1.7/plugin/troubleshooting.md b/versioned_docs/version-1.7/plugin/troubleshooting.md deleted file mode 100644 index 5cfa36ef..00000000 --- a/versioned_docs/version-1.7/plugin/troubleshooting.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -id: troubleshooting.md -title: "Troubleshooting" -sidebar_position: 9 ---- - -This document describes how to identify and resolve issues that might occur. - -### Missing source events - -**Symptoms** - -You don't get event message on a given communication platform even though the event occurred in your 3rd party service. - -**Debugging steps** - -- [Enable debugging mode for a given plugin](debug.md). - Once enabled, check the Botkube logs. You can filter them by your plugin name. You should see information about downloading and starting your source. For example: - - ```bash - INFO[2023-01-09T21:21:24+01:00] Starting Plugin Manager for all enabled plugins component="Plugin Manager" enabledSources=botkube/cm-watcher - INFO[2023-01-09T21:21:24+01:00] Downloading plugin. binPath=/tmp/plugins/botkube/source_v0.13.0_cm-watcher component="Plugin Manager" url="http://host.k3d.internal:3000/static/source_cm-watcher_darwin_amd64" - INFO[2023-01-09T21:21:24+01:00] source plugin registered successfully. binPath=/tmp/plugins/botkube/source_v0.13.0_cm-watcher component="Plugin Manager" plugin=botkube/cm-watcher version=v0.13.0 - INFO[2023-01-09T21:21:25+01:00] Start source streaming... pluginName=botkube/cm-watcher sources="[plugin-based]" - ``` - - If you don't see any of the above log messages: - - - Make sure that `source.{group_name}.{plugin_name}.enabled` property is set to `true` - - Make sure that a given source configuration (`sources.{group_name}`) is bind to a given communication platform (`bindings.sources: [{group_name}]`) - - If the source is not bound to any communication platform Botkube will not download and start such plugin. Even if it's enabled. - -- [Make sure that your plugin didn't crash](#plugin-process-exited). - -### Missing executor response - -**Symptoms** - -You run a given executor command in a chat window, but you don't get any response. - -**Debugging steps** - -- [Enable debugging mode for a given plugin](debug.md). - Once enabled, run a given executor command once again, and check the Botkube logs. You can filter them by your plugin name. You should see information about downloading and registering your executor. For example: - - ```bash - INFO[2023-01-09T21:21:24+01:00] Starting Plugin Manager for all enabled plugins component="Plugin Manager" enabledExecutors=botkube/echo - INFO[2023-01-09T21:21:24+01:00] Downloading plugin. binPath=/tmp/plugins/botkube/executor_v0.13.0_echo component="Plugin Manager" url="http://host.k3d.internal:3000/static/executor_echo_darwin_amd64" - INFO[2023-01-09T21:21:24+01:00] executor plugin registered successfully. binPath=/tmp/plugins/botkube/executor_v0.13.0_echo component="Plugin Manager" plugin=botkube/echo version=v0.13.0 - ``` - - If you don't see any of the above log messages: - - - Make sure that `executors.{group_name}.{plugin_name}.enabled` property is set to `true` - - Make sure that a given executor configuration (`executors.{group_name}`) is bind to a given communication platform (`bindings.executors: [{group_name}]`) - - If the executor is not bound to any communication platform Botkube will not download and start such plugin. Even if it's enabled. - -- [Make sure that your plugin didn't crash](#plugin-process-exited). - -### Plugin process exited - -**Symptoms** - -In Botkube logs, you see an error similar to: - -```bash -ERRO[2023-01-09T21:21:25+01:00] plugin process exited error="exit status 1" path=/tmp/plugins/botkube/executor_v0.13.0_echo pid=71127 plugin=botkube/echo -``` - -**Solution** - -It means that your plugin exited once it was started by Botkube [plugin manager](../architecture/index.md#plugin-manager). To start your plugin again, you need to restart the Botkube core process, as crashed plugins aren't restarted automatically. This issue is tracked in [botkube#878](https://github.com/kubeshop/botkube/issues/878). You need to make sure that our plugin doesn't exit once it's started. You should return each error on Botkube plugin interface, instead of crashing your application. To see your plugin standard output [set the `debug` for a given plugin](debug.md). - -### Plugin not found error - -**Symptoms** - -In Botkube logs, you see an error similar to: - -```bash -2023/01/09 21:37:04 while starting plugins manager: not found source plugin called "cm-test" in "botkube" repository -``` - -**Debugging steps** - -- Make sure that a given repository is defined under `plugins.repository`. -- Check that a given entry is defined in a given repository index file. You should find under `entries` a plugin with a given name, version and type (source or executor). - -### Botkube is killed by readiness probe while downloading plugins - -**Symptoms** - -In environments with low internet bandwidth Botkube might get killed by the readiness probe before it finishes downloading all plugins. -The solution to this problem is to increase the wait time of the readiness probe. - -**Solution** - -To increase the wait time of the readiness probe, you need to set the `initialDelaySeconds` property in -[values.yaml](https://github.com/kubeshop/botkube/blob/9e450fb63666b03118ee51fcf9b7eb6c3b74cbcf/helm/botkube/values.yaml#L794-L821) -to a higher value. For example: - -``` ---set deployment.readinessProbe.initialDelaySeconds=180 -``` diff --git a/versioned_docs/version-1.7/plugin/using-kubeconfig.md b/versioned_docs/version-1.7/plugin/using-kubeconfig.md deleted file mode 100644 index e958119b..00000000 --- a/versioned_docs/version-1.7/plugin/using-kubeconfig.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -id: using-kubeconfig -title: Using kubeconfig -sidebar_position: 4 ---- - -You can request Botkube to generate and pass kubeconfig file to your plugin by adding RBAC section -to your plugin configuration. The following example requests a kubeconfig that impersonates -user **User.rbac.authorization.k8s.io** `read-only-user`. For more information refer to the -[RBAC section](../configuration/rbac.md). The example is for executor plugins, source plugins -can access kubeconfig in their `Stream()` function in `source.StreamInput`. - -RBAC config for an example plugin: - -```yaml -executors: - "reader-team-a": - kube-reader: - enabled: true - context: - user: - type: Static - static: - value: read-only-user -``` - -The kubeconfig is available in `executor.ExecuteInput` as a slice of bytes. -There are two options to instantiate a Kubernetes Go client with this config. - -1. From bytes - -```go -import ( - "context" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/kubernetes" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -func (ReaderExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - config, err := clientcmd.RESTConfigFromKubeConfig(in.Context.KubeConfig) - if err != nil { - return executor.ExecuteOutput{}, err - } - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return executor.ExecuteOutput{}, err - } - ... -} -``` - -2. From file - -```go -import ( - "context" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/kubernetes" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -func (ReaderExecutor) Execute(ctx context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - kubeConfigPath, deleteFn, err := pluginx.PersistKubeConfig(ctx, in.Context.KubeConfig) - if err != nil { - return executor.ExecuteOutput{}, fmt.Errorf("while writing kubeconfig file: %w", err) - } - defer func() { - if deleteErr := deleteFn(ctx); deleteErr != nil { - fmt.Fprintf(os.Stderr, "failed to delete kubeconfig file %s: %v", kubeConfigPath, deleteErr) - } - }() - config, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath) - if err != nil { - return executor.ExecuteOutput{}, err - } - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return executor.ExecuteOutput{}, err - } - ... -} -``` diff --git a/versioned_docs/version-1.7/usage/assets/actionable-notifications.png b/versioned_docs/version-1.7/usage/assets/actionable-notifications.png deleted file mode 100644 index dd7f7656..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/actionable-notifications.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/disable-action.png b/versioned_docs/version-1.7/usage/assets/disable-action.png deleted file mode 100644 index ffb1c33d..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/disable-action.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/enable-action.png b/versioned_docs/version-1.7/usage/assets/enable-action.png deleted file mode 100644 index 6fcc249a..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/enable-action.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/flag_filter_kubectl_get_nodes.png b/versioned_docs/version-1.7/usage/assets/flag_filter_kubectl_get_nodes.png deleted file mode 100644 index 96deecce..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/flag_filter_kubectl_get_nodes.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/flag_filter_kubectl_logs.png b/versioned_docs/version-1.7/usage/assets/flag_filter_kubectl_logs.png deleted file mode 100644 index b2a8106e..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/flag_filter_kubectl_logs.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/list-actions.png b/versioned_docs/version-1.7/usage/assets/list-actions.png deleted file mode 100644 index 5bb5238f..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/list-actions.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/long-notification.png b/versioned_docs/version-1.7/usage/assets/long-notification.png deleted file mode 100644 index 68569f3e..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/long-notification.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/mm_notifier_start.png b/versioned_docs/version-1.7/usage/assets/mm_notifier_start.png deleted file mode 100644 index 63e8837d..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/mm_notifier_start.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/output-filtering-filter-response.png b/versioned_docs/version-1.7/usage/assets/output-filtering-filter-response.png deleted file mode 100644 index e34474b6..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/output-filtering-filter-response.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/output-filtering-get-pods-metrics.png b/versioned_docs/version-1.7/usage/assets/output-filtering-get-pods-metrics.png deleted file mode 100644 index 48a30c39..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/output-filtering-get-pods-metrics.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/output-filtering-get-pods.png b/versioned_docs/version-1.7/usage/assets/output-filtering-get-pods.png deleted file mode 100644 index 08793408..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/output-filtering-get-pods.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/output-filtering-logs-response.png b/versioned_docs/version-1.7/usage/assets/output-filtering-logs-response.png deleted file mode 100644 index 576dabf5..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/output-filtering-logs-response.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/output-filtering-metrics-logs-filter.png b/versioned_docs/version-1.7/usage/assets/output-filtering-metrics-logs-filter.png deleted file mode 100644 index d1fd07d3..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/output-filtering-metrics-logs-filter.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/output-filtering-metrics-logs.png b/versioned_docs/version-1.7/usage/assets/output-filtering-metrics-logs.png deleted file mode 100644 index 643d0334..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/output-filtering-metrics-logs.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/assets/short-notification.png b/versioned_docs/version-1.7/usage/assets/short-notification.png deleted file mode 100644 index 3234ac3e..00000000 Binary files a/versioned_docs/version-1.7/usage/assets/short-notification.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/automated-actions.md b/versioned_docs/version-1.7/usage/automated-actions.md deleted file mode 100644 index d6f1a7fa..00000000 --- a/versioned_docs/version-1.7/usage/automated-actions.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -id: automated-actions -title: "Automated actions" -sidebar_position: 3 ---- - -# Automated actions - -Actions allow you to automate your workflows by executing custom commands based on specific events. To read how to configure actions, see the [Action](../configuration/action.md) configuration document. - -## Manage actions - -Botkube allows you to manage actions using `@Botkube` commands. - -### List available actions - -Run `@Botkube list actions` to get list of configured actions and their running status: - -![List available actions](./assets/list-actions.png) - -### Disable action - -Run `@Botkube disable action {action-name}` to disable an action named `{action-name}`. The action settings are persisted across Botkube app restarts. - -![Disable action](./assets/disable-action.png) - -When you disable an action, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. - -### Enable action - -Run `@Botkube enable action {action-name}` to enable an action named `{action-name}`. The action settings are persisted across Botkube app restarts. - -![Enable action](./assets/enable-action.png) - -When you enable an action, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. diff --git a/versioned_docs/version-1.7/usage/event-notifications.md b/versioned_docs/version-1.7/usage/event-notifications.md deleted file mode 100644 index 941b21e8..00000000 --- a/versioned_docs/version-1.7/usage/event-notifications.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: event-notifications -title: "Event notifications" -sidebar_position: 1 ---- - -# Event notifications - -Botkube sends notifications according to the [sources](../configuration/source/index.md) configuration. - -## Actionable notifications - -If you have [`kubectl` executor enabled](../configuration/executor/kubectl.md) for a given channel, you can run commands related to a resource from the notification itself. Use the dropdown on the left to select and run a given command: - -![Actionable notifications](./assets/actionable-notifications.png) - -The command dropdown is disabled for resource deletion events. It uses executor bindings to determine which commands are available for a given resource. - -:::info -Actionable notifications are only available for the [Slack integration](../installation/slack/index.md) that supports interactive messages. Currently, only a selected list of commands are supported, such as `describe`, `get`, or `logs`. -::: - -## Managing notifications - -Depending upon your configuration, you will receive notifications about Kubernetes resources lifecycle events and their health. -Botkube bot allows you to enable/disable notifications on each configured channel separately. Run `@Botkube help`, the bot will reply with the help message about the supported message formats. - -### View Botkube configuration - -Run `@Botkube show config` message from the configured channel where Botkube is added. The bot will reply to you with the configuration with which the controller is running. - -To see how to update the configuration, see the [Updating the configuration](../configuration/index.mdx#updating-the-configuration) section in the Configuration document. - -### Change notification sources - -To change the notification sources, you can either run the `helm upgrade` command as described in [**View Botkube configuration**](#view-botkube-configuration) or run `@Botkube edit SourceBindings`. - -When you save the new notification sources, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. - -### Disable notifications - -If you want to stop receiving notifications from Botkube, run `@Botkube disable notifications` from the configured channel where Botkube is added. You will no longer receive notifications from the Botkube in a given communication platform. - -The notification settings are persisted across Botkube app restarts. - -### Enable notifications - -If you want to receive Botkube notifications again, run `@Botkube enable notifications` from the configured channel where Botkube is added. - -The notification settings are persisted across Botkube app restarts. - -:::note -For MS Teams integration notifications are disabled by default. You need to turn them on manually using this command. -::: - -### Check notifications status - -Run `@Botkube status notifications` to check if notifications are enabled for a given communication platform. diff --git a/versioned_docs/version-1.7/usage/executor/assets/demo-x.gif b/versioned_docs/version-1.7/usage/executor/assets/demo-x.gif deleted file mode 100644 index 572a0fd7..00000000 Binary files a/versioned_docs/version-1.7/usage/executor/assets/demo-x.gif and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/executor/assets/flux-diff.gif b/versioned_docs/version-1.7/usage/executor/assets/flux-diff.gif deleted file mode 100644 index 6ffc20bd..00000000 Binary files a/versioned_docs/version-1.7/usage/executor/assets/flux-diff.gif and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/executor/assets/flux-interactivity.gif b/versioned_docs/version-1.7/usage/executor/assets/flux-interactivity.gif deleted file mode 100644 index 083a6bff..00000000 Binary files a/versioned_docs/version-1.7/usage/executor/assets/flux-interactivity.gif and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/executor/assets/helm-install-filter.png b/versioned_docs/version-1.7/usage/executor/assets/helm-install-filter.png deleted file mode 100644 index 9502e61e..00000000 Binary files a/versioned_docs/version-1.7/usage/executor/assets/helm-install-filter.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/executor/assets/kc-cmd-builder.gif b/versioned_docs/version-1.7/usage/executor/assets/kc-cmd-builder.gif deleted file mode 100644 index 63f672b5..00000000 Binary files a/versioned_docs/version-1.7/usage/executor/assets/kc-cmd-builder.gif and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/executor/assets/parsed-space-table.png b/versioned_docs/version-1.7/usage/executor/assets/parsed-space-table.png deleted file mode 100644 index 9d523779..00000000 Binary files a/versioned_docs/version-1.7/usage/executor/assets/parsed-space-table.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/executor/assets/x-quickstart.png b/versioned_docs/version-1.7/usage/executor/assets/x-quickstart.png deleted file mode 100644 index a5b7d60a..00000000 Binary files a/versioned_docs/version-1.7/usage/executor/assets/x-quickstart.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/executor/doctor.md b/versioned_docs/version-1.7/usage/executor/doctor.md deleted file mode 100644 index b2a43520..00000000 --- a/versioned_docs/version-1.7/usage/executor/doctor.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -id: doctor -title: "Doctor" -sidebar_position: 4 ---- - -Botkube allows you to execute `doctor` commands on your Kubernetes cluster. By default, `doctor` command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/doctor.md#enabling-plugin) section from the `doctor` configuration documentation. - -To execute the `doctor` commands, send message in following formats in the channel where Botkube is already added: - -- Kubernetes native prompt: - ``` - @Botkube doctor --namespace=[namespace] --resource=[resource] --error=[error] - ``` -- Free-form question: - ``` - @Botkube doctor "[free-form question]" - ``` - -By default, `chatgpt` is configured as alias for the `doctor` command. You can use them on par with the `doctor` command. To read more about aliases configuration, see the [Alias](../../configuration/alias.md) section. - -This command needs to be executed from configured channel. diff --git a/versioned_docs/version-1.7/usage/executor/exec.mdx b/versioned_docs/version-1.7/usage/executor/exec.mdx deleted file mode 100644 index c6812e4e..00000000 --- a/versioned_docs/version-1.7/usage/executor/exec.mdx +++ /dev/null @@ -1,210 +0,0 @@ ---- -id: exec -title: "Exec" -sidebar_position: 3 ---- - -The `exec` executor plugin allows you to install and run CLI applications directly from chat (e.g., Slack, Discord, or Mattermost) without any hassle. - -It supports interactivity in the form of buttons and dropdowns. You can easily use all your favorite tools without typing, even from your mobile phone! - -![x-demo](./assets/demo-x.gif) - -:::note -To shorten the command, the `x` alias is used in all examples. Make sure you have it configured for your Botkube installation according to [Alias configuration](../../configuration/alias) document. - -```yaml -aliases: - x: - command: exec - displayName: "Exec alias" -``` - -In this context, the `x` stands for `extension` or `execution`. -::: - -# Usage - -## Install CLI - -To install a given CLI binary directly from a chat window, run: - -``` -@Botkube x install {source} -``` - -For downloading binaries, the `eget` library is used. It supports multiple URL formats and is able to unpack archives and extract binaries from them. For more details, see the documentation on the [`eget`](https://github.com/zyedidia/eget) GitHub repository. - -### Examples - -- `@Botkube x install https://get.helm.sh/helm-v3.10.3-linux-amd64.tar.gz --file helm` -- `@Botkube x install github.com/fluxcd/flux2` -- `@Botkube x install https://github.com/rikatz/kubepug --asset kubepug_darwin_amd64.tar.gz` - -## Execute CLI - -To execute a CLI command, run: - -``` -@Botkube x run {command} -``` - -### Examples - -- `@Botkube x run helm list -A` -- `@Botkube x run flux get sources git` - -:::tip -For convenience, you can configure a Botkube alias to simplify running `flux` commands: - -```yaml -aliases: - flux: - command: x run flux - displayName: "Flux CLI alias" -``` - -Later, you can simply type `@Botkube flux get sources git`. -::: - -# Templates - -The `exec` plugin supports defining templates for executed commands. As a result, you can specify how to process the CLI output or define your own message response. - -```yaml -# An array of templates that define how to convert the command output into an interactive message. -templates: - - trigger: - command: - # Specifies the prefix of the command that triggers the template and the parser used to parse the output. - # If specified, it has higher priority than the regex field. - prefix: "helm list" - # Specifies the regex that should match a given command - # If specified, it has lower priority than the prefix field. - regex: "regex: '^helm list(?:\s+(-A|-a))*\s?$'" - # Specifies the message template type. - type: "" - # Message template depending on the selected type. - message: { } -``` - -Supported template types: - -- [`parser:table:space`](#table-parser) -- [`wrapper`](#wrapper) -- [`tutorial`](#tutorial) - -Navigate to the [`exec`](https://github.com/kubeshop/botkube/tree/main/cmd/executor/x/templates) plugin directory to see official examples. - -## Table parser - -The `parser:table:space` template knows how to convert space-separated tables into an interactive message. This allows you to select a single item from a dropdown and perform additional actions in the context of the selected item without typing anything. - -For example, such a table: - -```shell -NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION -psql default 1 2023-04-27 19:30:48.042056 +0200 CEST deployed postgresql-12.2.7 15.2.0 -traefik kube-system 1 2023-04-19 20:58:57.709052559 +0000 UTC deployed traefik-10.19.300 2.6.2 -traefik-crd kube-system 1 2023-04-19 20:58:56.564578223 +0000 UTC deployed traefik-crd-10.19.300 -``` - -is displayed as: - -![](./assets/parsed-space-table.png) - -The table output is parsed with the following rules: - -- All headers are normalized using the [`Title`](https://pkg.go.dev/golang.org/x/text/cases#Title) function. For example: - - - `APP VERSION` is `AppVersion` - - `NAME` is `Name` - - `namespace` is `Namespace` - -- Empty cells are allowed, and they are printed as an empty string. - -By default, the first row is selected and displayed in the message. The `actions` and `preview` properties are rendered in the context of the selected row. - -### Syntax - -Here is an example syntax that converts the `helm list -A` command into an interactive message: - -```yaml -type: "parser:table:space" -message: - # Creates a dropdown menu with a given name, where the items are generated using the `keyTpl` parameter. - selects: - - name: "Release" - keyTpl: "{{ .Namespace }}/{{ .Name }}" - - # Defines additional actions that can be performed in the context of the selected item. In this example, the user can view notes, values, or delete the selected release. - # optional - actions: - notes: "helm get notes {{ .Name }} -n {{ .Namespace }}" - values: "helm get values {{ .Name }} -n {{ .Namespace }}" - delete: "helm delete {{ .Name }} -n {{ .Namespace }}" - - # Displays a preview of the selected item. Fields `Name`, `Namespace`, `Status`, and `Chart` are generated using the output of the command. It's useful to display only important context. - # optional - preview: | - Name: {{ .Name }} - Namespace: {{ .Namespace }} - Status: {{ .Status }} - Chart: {{ .Chart }} -``` - -## Wrapper - -The wrapper template allows adding extra buttons to the CLI output without modifying the output itself. It's useful to attach some pre-defined commands. - -### Syntax - -Here is an example syntax to add two predefined buttons to a given output message: - -```yaml -type: "wrapper" -message: - buttons: - - # Button name - name: "Get Help" - # URL to open on click. - url: "https://example.com/help" - - # Button name - name: "Initialize" - # Button command to run. Use `{{BotName}}` placeholder for commands that should be executed by Botkube - command: "{{BotName}} x run flux install" - # Button style, supported values: primary, danger - style: "primary" -``` - -## Tutorial - -The tutorial template allows you to define a custom response for a given command. For example, when the trigger command is set to `trigger.comand.prefix: "quickstart helm"` and a user types `@Botkube x run quickstart helm`, the command itself is not executed. Instead, a defined tutorial message is returned. - -![quickstart](./assets/x-quickstart.png) - -### Syntax - -Here is an example syntax to return tutorial with two predefined buttons: - -```yaml -type: "tutorial" -message: - # Pagination rules - paginate: - # Maximum number of rendered buttons per page - page: 5 - # Message header - header: "Helm Quick Start tutorial" - # Tutorial steps that are rendered in a given order. - buttons: - - # Button name - name: "Global Help" - # Button description to display on the left side of the button. - description: "{{BotName}} helm help" - # Button command to run. Use `{{BotName}}` placeholder for commands that should be executed by Botkube - command: "{{BotName}} x run helm help" - - name: "Version" - description: "{{BotName}} helm version" - command: "{{BotName}} x run helm version" -``` diff --git a/versioned_docs/version-1.7/usage/executor/flux.md b/versioned_docs/version-1.7/usage/executor/flux.md deleted file mode 100644 index 9a7ce276..00000000 --- a/versioned_docs/version-1.7/usage/executor/flux.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -id: flux -title: "Flux" -sidebar_position: 5 ---- - -Botkube offers seamless execution of Flux CLI commands within your Kubernetes cluster. By default, Flux command execution is disabled. To enable it, refer to the [Enabling plugin](../../configuration/executor/flux.md#enabling-plugin) section. - -To execute the `flux` CLI commands, send a message in the channel where Botkube is present. For example: - -``` -@Botkube flux tutorial -``` - -## Interactive Usage - -We have also incorporated interactivity (tables, etc.) to simplify running Flux CLI commands e.g. from mobile devices. - -![flux-interactivity](./assets/flux-interactivity.gif) - -## Simplified Kustomization Diffing Flow - -With the Botkube Flux executor, you can execute a single command to perform a diff between a specific pull request and the cluster state. For instance: - -``` -@Botkube flux diff kustomization podinfo --path ./kustomize --github-ref [PR Number| URL | Branch] -``` - -![flux-diff](./assets/flux-diff.gif) - -This command automates several tasks: - -- Automatically discovering the associated GitHub repository for the given kustomization. -- Cloning the repository. -- Checking out a given pull request. -- Comparing pull request changes with the current cluster state. -- Sharing the diff report. - -The diff results are posted on the Slack channel, making it easy for team members to review and discuss the changes. Additionally, the returned message provides additional contextual actions: - -- Posting the diff report as a GitHub comment on the corresponding pull request. -- Approving the pull request. -- Viewing the pull request. - -### GitHub automation - -To enhance your workflow's efficiency, you can use the [GitHub Events](../../configuration/source/github-events.md) source for automatic notification of pull request events, complete with an integrated `flux diff` button. - -```yaml -sources: - github-events: - displayName: "GitHub Events" - botkube/github-events: - enabled: true - config: - github: - auth: - accessToken: "ghp_" # GitHub PAT - - repositories: - - name: { owner }/{name} - on: - pullRequests: - - types: [ "open" ] - paths: - # Patterns for included file changes in pull requests. - include: [ 'kustomize/.*' ] - notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " -``` - -Don't forget to incorporate the `github-events` source into your communication platform bindings. For instance: - -```yaml -communications: - default-group: - socketSlack: - enabled: true - channels: - default: - name: random - bindings: - sources: - - github-events - executors: - - flux -``` diff --git a/versioned_docs/version-1.7/usage/executor/helm.md b/versioned_docs/version-1.7/usage/executor/helm.md deleted file mode 100644 index 4b156750..00000000 --- a/versioned_docs/version-1.7/usage/executor/helm.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -id: helm -title: "Helm" -sidebar_position: 3 ---- - -Botkube allows you to execute `helm` commands on your Kubernetes cluster. By default, `helm` command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/helm.md#enabling-plugin) section from the `helm` configuration documentation. - -To execute `helm` commands, send message in the following format in the channel where Botkube is already added: - -``` -@Botkube helm [command] [flags] -``` - -At least one `helm` executor needs to be enabled and bound to a given channel. - -:::caution -Using the interactive filter input field causes the Helm command to be re-executed. Be careful when using it for read-write commands. - -![Interactive Helm install filtering](./assets/helm-install-filter.png) - -This issue is tracked in [botkube#907](https://github.com/kubeshop/botkube/issues/907). -::: - -## Supported commands - -The Helm executor plugin has the exact same syntax as the Helm CLI. However, not all commands and flags are supported. If an unsupported flag is specified, you will get a dedicated error, e.g: - -``` -The "--wait" flag is not supported by the Botkube Helm plugin. Please remove it. -``` - -Additionally, the following flag syntax is not supported: - -- No whitespace between short flag name and its value. Instead of `-oyaml`, use `-o yaml`. -- Merging multiple short flags together. Instead of `-Aa`, use `-A -a`. - -### Read-only commands - -List of the read-only commands: - -- `@Botkube helm help` - shows the general Helm plugin help message. -- `@Botkube helm list` - lists all releases on cluster where Botkube is installed. - - The `--filter` flag is reserved by Botkube. As a result, to use the Helm filter functionality use `-f` instead, e.g. `helm list -f 'ara[a-z]+'`. -- `@Botkube helm status` - displays the status of the named release. -- `@Botkube helm version` - shows the version of the Helm CLI used by this Botkube plugin. - -### Read-write commands - -For the read-write commands the Botkube RBAC needs to be adjusted. For more information, see the [**Enabling plugin**](../../configuration/executor/helm.md#enabling-plugin) section. - -List of the read-write commands: - -- `@Botkube helm rollback` - rolls back a given release to a previous revision. -- `@Botkube helm test` - runs tests for a given release. -- `@Botkube helm uninstall` - uninstalls a given release. -- `@Botkube helm upgrade` - upgrades a given release. -- `@Botkube helm install` - installs a given chart to cluster where Botkube is installed. There are two different ways you to install a Helm chart: - - By absolute URL: `helm install mynginx https://example.com/charts/nginx-1.2.3.tgz` - - By chart reference and repository URL: `helm install --repo https://example.com/charts/ mynginx nginx` diff --git a/versioned_docs/version-1.7/usage/executor/index.md b/versioned_docs/version-1.7/usage/executor/index.md deleted file mode 100644 index b4f7614c..00000000 --- a/versioned_docs/version-1.7/usage/executor/index.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: executor -title: "Executor" -sidebar_position: 1 ---- - -While deploying Botkube, you can specify which [executors](../../configuration/executor) you want to enable. - -To check which executors are enabled, and get the aliases configured for them, run `@Botkube list executors`. - -## Aliases - -Alias is a shortcut for a longer command or just a part of it. It can be defined for all commands, including executor plugins and built-in Botkube commands. When you use an alias, the command is replaced with the underlying command before executing it. For example, `@Botkube k get pods` is replaced with `@Botkube kubectl get pods` before executing it. - -Once you configured aliases, you can use them interchangeably with a full command. For example: - -- `k` as `kubectl`, -- `kgp` as `kubectl get pods`, -- `kgpa` as `kubectl get pods -A`, -- `hh` as `helm history`, -- `a` as `list actions`, the built-in Botkube command, - -and so on. Your imagination is the limit! - -Aliases are defined globally for the whole Botkube installation. To see which aliases are available for current conversation, run `@Botkube list aliases`. - -To learn how to configure aliases and see the default configuration, see the [Alias](../../configuration/alias.md) section. - -## Specify cluster name - -:::warning -Multi-cluster approach is supported only for the Mattermost and Discord integrations. Slack and Microsoft Teams integrations require separate Slack or Microsoft Teams apps for each Botkube installation. -::: - -If you have installed Botkube backend on multiple clusters, you can pass `--cluster-name` flag to execute kubectl command on specific cluster. - -To get the list of all clusters configured in botkube, you can use the ping command. - -For cluster-specific response, use `--cluster-name` flag to specify the cluster's name on which command needs to be executed. -Use of this flag allows you to get response from any channel or group where Botkube is added. -The flag is ignored in notifier commands as they can be executed from the configured channel only. - -## Filtering text output - -Use the `--filter` flag to filter the output of Botkube executor commands. This returns any lines matching the flag's provided value. - -The `--filter` flag uses simple string matching. And, only works for Botkube executor commands that return text output, e.g. `kubectl` or `list executors` commands. - -### Filtering `kubectl` output - -![flag_filter_kubectl_get_nodes](../assets/flag_filter_kubectl_get_nodes.png) -![flag_filter_kubectl_logs](../assets/flag_filter_kubectl_logs.png) diff --git a/versioned_docs/version-1.7/usage/executor/kubectl.md b/versioned_docs/version-1.7/usage/executor/kubectl.md deleted file mode 100644 index 5434171e..00000000 --- a/versioned_docs/version-1.7/usage/executor/kubectl.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: kubectl -title: "Kubectl" -sidebar_position: 2 ---- - -Botkube allows you to execute `kubectl` commands on your Kubernetes cluster. By default, kubectl command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/kubectl.md#enabling-plugin) section from the `kubectl` configuration documentation. - -To execute the `kubectl` commands, send message in following format in the channel where Botkube is already added: - -``` -@Botkube kubectl [verb] [resource] [flags] -``` - -By default, `k` and `kc` are configured as aliases for the `kubectl` command. You can use them on par with the `kubectl` command. To read more about aliases configuration, see the [Alias](../../configuration/alias.md) section. - -This command needs to be executed from configured channel. - -## Interactive kubectl commands builder - -Use the interactive `kubectl` command builder to construct a `kubectl` command just by selecting items from dropdowns. This is especially useful on mobile when typing the command is harder. - -The builder includes a resource name dropdown list. This is pre-populated with all the relevant resource names. It's great for discovering resources with the option to select them. E.g. Just grab a Pod name without needing to type or copy-and-paste. - -To start the interactive `kubectl` command builder, run `@Botkube kubectl` from the configured channel where Botkube is added. -You can also use any of the [configured aliases](../../configuration/alias.md) - for example, the default `k` one, as illustrated below: - -![kubectl command builder](./assets/kc-cmd-builder.gif) - -### Limitations - -Keep in mind that the interactive command builder may not support all the commands that you can run just by typing them directly in a chat window. The following policies are applied: - -- Under verbs' dropdown, we display verbs that are defined under the `interactiveBuilder.allowed.verbs` configuration. - :::tip - The default verbs for the `kubectl` plugin found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - If you ServiceAccount allow running other actions such as `delete`, you can add them directly under [`interactiveBuilder.allowed.verbs`](../../configuration/executor/kubectl.md#syntax). - ::: - -- Under resources' dropdown, we display resources that are defined under the `interactiveBuilder.allowed.resources` configuration and are allowed for already selected verb. For example, for the `logs` verb we display only `pods`, `statefulsets`, `deployments`, and `daemonsets`. - :::tip - The default resources for the `kubectl` plugin found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - - If you ServiceAccount allow access to more resources, you can add them directly under [`interactiveBuilder.allowed.resources`](../../configuration/executor/kubectl.md#syntax). - ::: - -- For resources that are namespace-scoped, under namespaces' dropdown, we display `interactiveBuilder.allowed.namespaces` if defined. If static namespaces are not specified, plugin needs to have access to fetch all Namespaces, otherwise Namespace dropdown won't be visible at all. - -- The `kubectl` command preview is displayed only if the command that you built is valid, and you have permission to run it. diff --git a/versioned_docs/version-1.7/usage/index.md b/versioned_docs/version-1.7/usage/index.md deleted file mode 100644 index d226cf77..00000000 --- a/versioned_docs/version-1.7/usage/index.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -id: usage -title: "Usage" -sidebar_position: 4 ---- - -# Usage - -Botkube allows you to monitor your Kubernetes cluster, as well as debug and troubleshoot your workloads. - -## See all available commands - -Run `@Botkube help` to find information about the supported commands. - -## Check Botkube status - -Run `@Botkube ping` to the channel where Botkube is added. The Botkube will respond you with the **pong** message from all the configured clusters. - -For [multi-cluster configuration](./executor/index.md#specify-cluster-name), use the `--cluster-name` flag to get response from the cluster mentioned in the flag. Else check the deployment in Kubernetes cluster in the **botkube** namespace. diff --git a/versioned_docs/version-1.7/usage/interactive-output-filtering.md b/versioned_docs/version-1.7/usage/interactive-output-filtering.md deleted file mode 100644 index ba96ae2f..00000000 --- a/versioned_docs/version-1.7/usage/interactive-output-filtering.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -id: interactive-output-filtering -title: "Interactive output filtering" -sidebar_position: 4 ---- - -:::info -Interactive output filtering is only available for the [Slack integration](../installation/slack/index.md) that supports interactive messages. -::: - -:::caution -Using the interactive filter input field causes the command to be re-executed. Be careful when using it for read-write commands. -This issue is tracked in [botkube#907](https://github.com/kubeshop/botkube/issues/907). -::: - -Sometimes you can get long response from a certain command and you may want to filter that to see a subset of the actual result. -For each communication platform, you can use the `--filter` flag at the end of your command. To learn more, see the [Flags](executor/index.md#filtering-kubectl-output) section. - -If you use the [Slack integration](../installation/slack/index.md) that supports interactive messages, there is another option to handle that: interactive output filtering. -Interactivity is achieved via an input action text box where you can add your filter criteria as text and press the **Enter** button. - -### Long response filtering - -Output Filter input text box will be attached to your command response if response has more than 15 lines. Let's see an example for this situation. - -1. List pods with `@Botkube kubectl get pods -n kube-system` - ![metrics_pods](assets/output-filtering-get-pods-metrics.png) -2. Let's check the logs of `metrics-server` with `@Botkube kubectl logs -f metrics-server-7cd5fcb6b7-hzvq8 -n kube-system` - ![metrics_logs](assets/output-filtering-metrics-logs.png) -3. Notice that Filter Output is attached to response. Type `RequestHeaderAuthRequestController` to filter and press `Enter`. - ![metrics_filter_logs](assets/output-filtering-metrics-logs-filter.png) - -## Attachment response filtering - -Command response is uploaded as text file once the actual size of response message reaches the limit of messaging platform. Let's take a look how Filter Output behaves for this situation. - -1. List the pods with `@Botkube kubectlc get pods -n kube-system` - ![get_pods](assets/output-filtering-get-pods.png) -2. Let's check the logs of Traefik with command `@Botkube kubectl logs -f traefik-df4ff85d6-f2mkz -n kube-system`. Notice that, you might have different pod list, so please select a suitable one for your case. - ![pod_logs](assets/output-filtering-get-pods.png) -3. Since the response is big, it is uploaded as file and you can realize a reply thread. Please expand it to see filter output. -4. Assume we want to see log lines only containing `Configuration` word. Type `Configuration` in the Filter Output input box and click enter. You will see filtered result as a response. - ![filter_response](assets/output-filtering-filter-response.png) diff --git a/versioned_docs/version-1.7/usage/source/argocd.md b/versioned_docs/version-1.7/usage/source/argocd.md deleted file mode 100644 index c8b9786b..00000000 --- a/versioned_docs/version-1.7/usage/source/argocd.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -id: argocd -title: ArgoCD -sidebar_position: 5 ---- - -Botkube allows you to consume ArgoCD events on your Kubernetes cluster. By default, `argocd` plugin is disabled. See the [**Enabling source**](../../configuration/source/argocd#enabling-plugin) section from the `argocd` configuration documentation. - -Once it is enabled, the ArgoCD plugin will configure ArgoCD notifications so that Botkube receives them on its incoming webhook. Then, Botkube will send them to configured platforms as shown below. - -![ArgoCD events](./assets/argocd-events.png) - -## Interactive events - -For platforms that support interactivity, such as Socket Slack and Cloud Slack, Botkube sends interactive messages for ArgoCD events, that allow you to perform actions on the event. By default, the following actions are supported: - -- Run commands on the Application: - - `get` - - `describe` -- View the Application in the ArgoCD UI -- Open the source repository in the browser - -Interactive buttons and commands can be configured. See the [Configuration](../../configuration/source/argocd.md) document for more details. diff --git a/versioned_docs/version-1.7/usage/source/assets/argocd-events.png b/versioned_docs/version-1.7/usage/source/assets/argocd-events.png deleted file mode 100644 index 11447ddb..00000000 Binary files a/versioned_docs/version-1.7/usage/source/assets/argocd-events.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/source/assets/keptn-events.png b/versioned_docs/version-1.7/usage/source/assets/keptn-events.png deleted file mode 100644 index 755dbf69..00000000 Binary files a/versioned_docs/version-1.7/usage/source/assets/keptn-events.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/source/assets/pod-created.png b/versioned_docs/version-1.7/usage/source/assets/pod-created.png deleted file mode 100644 index cd8acde7..00000000 Binary files a/versioned_docs/version-1.7/usage/source/assets/pod-created.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/source/assets/prometheus-alerts.png b/versioned_docs/version-1.7/usage/source/assets/prometheus-alerts.png deleted file mode 100644 index 0fa8fef5..00000000 Binary files a/versioned_docs/version-1.7/usage/source/assets/prometheus-alerts.png and /dev/null differ diff --git a/versioned_docs/version-1.7/usage/source/index.md b/versioned_docs/version-1.7/usage/source/index.md deleted file mode 100644 index 206b1667..00000000 --- a/versioned_docs/version-1.7/usage/source/index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -id: source -title: "Source" -sidebar_position: 1 ---- - -While deploying Botkube, you can specify which [sources](../../configuration/source) you want to enable. - -To check which sources are enabled, run `@Botkube list sources` diff --git a/versioned_docs/version-1.7/usage/source/keptn.md b/versioned_docs/version-1.7/usage/source/keptn.md deleted file mode 100644 index aac65a5c..00000000 --- a/versioned_docs/version-1.7/usage/source/keptn.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -id: keptn -title: "Keptn" -sidebar_position: 4 ---- - -Botkube allows you to consume `keptn` events on your Kubernetes cluster. By default, `keptn` plugin is disabled. See the [**Enabling plugin**](../../configuration/source/keptn#enabling-plugin) section from the `keptn` configuration documentation. - -Once it is enabled, Botkube Keptn plugin will consume Keptn events and send them to configured platforms as shown below. - -![Keptn Events](./assets/keptn-events.png) diff --git a/versioned_docs/version-1.7/usage/source/kubernetes.md b/versioned_docs/version-1.7/usage/source/kubernetes.md deleted file mode 100644 index a47f9d9a..00000000 --- a/versioned_docs/version-1.7/usage/source/kubernetes.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -id: kubernetes -title: "Kubernetes" -sidebar_position: 2 ---- - -Botkube allows you to consume `kubernetes` events on your Kubernetes cluster. By default, `kubernetes` plugin is disabled. See the [**Enabling source**](../../configuration/source/kubernetes#enabling-source) section from the `kubernetes` configuration documentation. - -Once it is enabled, Botkube Kubernetes plugin will consume Kubernetes events and send them to configured platforms as shown below. - -![Pod Created](./assets/pod-created.png) diff --git a/versioned_docs/version-1.7/usage/source/prometheus.md b/versioned_docs/version-1.7/usage/source/prometheus.md deleted file mode 100644 index 27dfd7af..00000000 --- a/versioned_docs/version-1.7/usage/source/prometheus.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -id: prometheus -title: "Prometheus" -sidebar_position: 3 ---- - -Botkube allows you to consume `prometheus` alerts on your Kubernetes cluster. By default, `prometheus` plugin is disabled. See the [**Enabling plugin**](../../configuration/source/prometheus#enabling-plugin) section from the `prometheus` configuration documentation. - -Once it is enabled, Botkube Prometheus plugin will consume Prometheus alerts and send them to configured platforms as shown below. - -![Prometheus Alerts](./assets/prometheus-alerts.png) diff --git a/versioned_docs/version-1.8/architecture/assets/arch-dark.svg b/versioned_docs/version-1.8/architecture/assets/arch-dark.svg deleted file mode 100644 index e844b875..00000000 --- a/versioned_docs/version-1.8/architecture/assets/arch-dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
K8s events
K8s events
User
User
starts gRPC
streaming
starts gRPC...
Plugin Source
Bridge
Plugin Source...
Botkube core
Botkube core
interacts with
interacts with
kubectl
kubectl
helm
helm
Bot (bidirectional)
Bot (bidirectional)
Sink (unidirectional)
Sink (unidirectional)
Executors
Executors
executes gRPC
call
executes gRPC...
Plugin Executor
Bridge
Plugin Executor...
K8s events
K8s events
Prometheus
Prometheus
Sources
Sources
Communications
Communications
Downloaded plugins
Downloaded plugins
downloads and starts
plugin binaries
downloads and starts...
reads index file with 
available plugins
reads index file with...
Plugin
Manager
Plugin...
Filter Engine
Filter Engine
Plugin Index File
Plugin Index File
Plugin Index File
Plugin Index File
Plugins repository
Plugins repository
helm
helm
argo
argo
Prometheus
Prometheus
kubectl
kubectl
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.8/architecture/assets/arch-light.svg b/versioned_docs/version-1.8/architecture/assets/arch-light.svg deleted file mode 100644 index 098e469a..00000000 --- a/versioned_docs/version-1.8/architecture/assets/arch-light.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
K8s events
K8s events
User
User
starts gRPC
streaming
starts gRPC...
Plugin Source
Bridge
Plugin Source...
Botkube core
Botkube core
interacts with
interacts with
kubectl
kubectl
helm
helm
Bot (bidirectional)
Bot (bidirectional)
Sink (unidirectional)
Sink (unidirectional)
Executors
Executors
executes gRPC
call
executes gRPC...
Plugin Executor
Bridge
Plugin Executor...
K8s events
K8s events
Prometheus
Prometheus
Sources
Sources
Communications
Communications
Downloaded plugins
Downloaded plugins
downloads and starts
plugin binaries
downloads and starts...
reads index file with 
available plugins
reads index file with...
Plugin
Manager
Plugin...
Filter Engine
Filter Engine
Plugin Index File
Plugin Index File
Plugin Index File
Plugin Index File
Plugins repository
Plugins repository
helm
helm
argo
argo
Prometheus
Prometheus
kubectl
kubectl
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.8/architecture/index.md b/versioned_docs/version-1.8/architecture/index.md deleted file mode 100644 index 12a0d432..00000000 --- a/versioned_docs/version-1.8/architecture/index.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -id: architecture -title: "Architecture" -sidebar_position: 7 ---- - -This document describes high-level Botkube architecture, all components in the system and interactions between them. - -Botkube is split into two main parts: - -- Botkube agent: Botkube binary that serves as a bridge between communication platforms (e.g. Slack, Discord) and Botkube plugins (sources and executors). -- [Botkube plugins](../plugin/index.md): The executable binaries that communicate with Botkube agent over an RPC interface. Botkube supports two types of plugins, respectively called Source plugins and Executor plugins. - -## Components - -The following diagram visualizes all main components in the system. - -![Architecture](assets/arch-light.svg#gh-light-mode-only)![Architecture](assets/arch-dark.svg#gh-dark-mode-only) - -### Plugin repository - -A plugin repository is a place where plugin binaries and index file are stored. This repository must be publicly available and supports downloading assets via HTTP(s). Any static file server can be used, for instance: GitHub Pages, `s3`, `gcs`, etc. - -### Plugin manager - -Plugin manager takes care of downloading enabled and bound plugins, running a given plugin binary and maintaining the gRPC connection. Under the hood, the [`go-plugin`](https://github.com/hashicorp/go-plugin/) library is used. Plugin manager is responsible both for the executor and source plugins. - -### Plugin executor bridge - -Plugin executor bridge is resolving the received Botkube command, calling the respective plugin, and sending back the response to a given communication platform. - -### Executor - -Executor is a binary that implements the [executor](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) Protocol Buffers contract. Executor runs a given command and returns the response in a synchronous way. For example, running `kubectl` or `helm` commands. - -Streaming command response is not supported. As a result, commands like `helm install --wait` doesn't work well, as the response won't be sent until the command finishes. - -The `kubectl` is a built-in Botkube executor. It will be extracted in the future Botkube releases. - -### Plugin source bridge - -Plugin source bridge is dispatching received source events to all configured communication channels. - -### Source - -Source is a binary that implements the [source](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) Protocol Buffers contract. Source starts asynchronous streaming of domain-specific events. For example, streaming Kubernetes events. - -### Bot - -Bot represents a bidirectional communication platform. Each bot is responsible for authenticating, managing connections, and providing an interface for receiving and sending messages for a given platform like Slack, Discord, etc. Connection is mostly done via WebSocket. - -### Sink - -Sink represents a unidirectional communication platform. Each sink is responsible for authenticating, managing connections, and providing an interface for sending messages for a given platform like Elasticsearch, outgoing webhook, etc. diff --git a/versioned_docs/version-1.8/cli/_category_.json b/versioned_docs/version-1.8/cli/_category_.json deleted file mode 100644 index 3f09750c..00000000 --- a/versioned_docs/version-1.8/cli/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "CLI", - "position": 5 -} diff --git a/versioned_docs/version-1.8/cli/commands/_category_.json b/versioned_docs/version-1.8/cli/commands/_category_.json deleted file mode 100644 index 053c6e32..00000000 --- a/versioned_docs/version-1.8/cli/commands/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "Commands" -} diff --git a/versioned_docs/version-1.8/cli/commands/botkube.md b/versioned_docs/version-1.8/cli/commands/botkube.md deleted file mode 100644 index 2738598c..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: botkube ---- - -## botkube - -Botkube CLI - -### Synopsis - -botkube - Botkube CLI - -A utility that simplifies working with Botkube. - -Quick Start: - - $ botkube install # Install Botkube - $ botkube uninstall # Uninstall Botkube - -Botkube Cloud: - - $ botkube login # Login into Botkube Cloud - $ botkube migrate # Automatically migrates Open Source installation into Botkube Cloud - -``` -botkube [flags] -``` - -### Options - -``` - -h, --help help for botkube - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube config](botkube_config.md) - This command consists of multiple subcommands for working with Botkube configuration -- [botkube install](botkube_install.md) - install or upgrade Botkube in k8s cluster -- [botkube login](botkube_login.md) - Login to a Botkube Cloud -- [botkube migrate](botkube_migrate.md) - Automatically migrates Botkube installation into Botkube Cloud -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics -- [botkube uninstall](botkube_uninstall.md) - uninstall Botkube from cluster -- [botkube version](botkube_version.md) - Print the CLI version diff --git a/versioned_docs/version-1.8/cli/commands/botkube_config.md b/versioned_docs/version-1.8/cli/commands/botkube_config.md deleted file mode 100644 index 2d0e7e77..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube_config.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: botkube config ---- - -## botkube config - -This command consists of multiple subcommands for working with Botkube configuration - -### Options - -``` - -h, --help help for config -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI -- [botkube config get](botkube_config_get.md) - Displays Botkube configuration diff --git a/versioned_docs/version-1.8/cli/commands/botkube_config_get.md b/versioned_docs/version-1.8/cli/commands/botkube_config_get.md deleted file mode 100644 index 56660f62..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube_config_get.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: botkube config get ---- - -## botkube config get - -Displays Botkube configuration - -``` -botkube config get [flags] -``` - -### Examples - -``` -# Show configuration for currently installed Botkube -botkube config get - -# Show configuration in JSON format -botkube config get -ojson - -# Save configuration in file -botkube config get > config.yaml - -``` - -### Options - -``` - --cfg-exporter-image-registry string Registry for the Config Exporter job image (default "ghcr.io") - --cfg-exporter-image-repo string Repository for the Config Exporter job image (default "kubeshop/botkube-config-exporter") - --cfg-exporter-image-tag string Tag of the Config Exporter job image (default "v9.99.9-dev") - --cfg-exporter-poll-period duration Interval used to check if Config Exporter job was finished (default 1s) - --cfg-exporter-timeout duration Maximum execution time for the Config Exporter job (default 1m0s) - --cloud-env-api-key string API key environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_API_KEY") - --cloud-env-endpoint string Endpoint environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_ENDPOINT") - --cloud-env-id string Identifier environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_IDENTIFIER") - -h, --help help for get - -l, --label string Label used for identifying the Botkube pod (default "app=botkube") - -n, --namespace string Namespace of Botkube pod (default "botkube") - --omit-empty-values Omits empty keys from printed configuration (default true) - -o, --output string Output format. One of: json | yaml (default "yaml") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube config](botkube_config.md) - This command consists of multiple subcommands for working with Botkube configuration diff --git a/versioned_docs/version-1.8/cli/commands/botkube_install.md b/versioned_docs/version-1.8/cli/commands/botkube_install.md deleted file mode 100644 index 6301e659..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube_install.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: botkube install ---- - -## botkube install - -install or upgrade Botkube in k8s cluster - -### Synopsis - -Use this command to install or upgrade the Botkube agent. - -``` -botkube install [OPTIONS] [flags] -``` - -### Examples - -``` -# Install latest stable Botkube version -botkube install - -# Install Botkube 0.1.0 version -botkube install --version 0.1.0 - -# Install Botkube from local git repository. Needs to be run from the main directory. -botkube install --repo @local -``` - -### Options - -``` - --atomic If set, process rolls back changes made in case of failed install/upgrade. The --wait flag will be set automatically if --atomic is used - -y, --auto-approve Skips interactive approval when upgrade is required. - --chart-name string Botkube Helm chart name. (default "botkube") - --dependency-update Update dependencies if they are missing before installing the chart - --description string add a custom description - --disable-openapi-validation If set, it will not validate rendered templates against the Kubernetes OpenAPI Schema - --dry-run Simulate an installation - --force Force resource updates through a replacement strategy - -h, --help help for install - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - --namespace string Botkube installation namespace. (default "botkube") - --no-hooks Disable pre/post install/upgrade hooks - --release-name string Botkube Helm chart release name. (default "botkube") - --render-subchart-notes If set, render subchart notes along with the parent - --repo string Botkube Helm chart repository location. It can be relative path to current working directory or URL. Use @stable tag to select repository which holds the stable Helm chart versions. (default "https://charts.botkube.io/") - --reset-values When upgrading, reset the values to the ones built into the chart - --reuse-values When upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored - --set stringArray Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --set-file stringArray Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) - --set-json stringArray Set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2) - --set-literal stringArray Set a literal STRING value on the command line - --set-string stringArray Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --skip-crds If set, no CRDs will be installed. - --timeout duration Maximum time during which the Botkube installation is being watched, where "0" means "infinite". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default 10m0s) - -f, --values strings Specify values in a YAML file or a URL (can specify multiple) - --version string Botkube version. Possible values @latest, 1.2.0, ... (default "@latest") - -w, --watch --timeout Watches the status of the Botkube installation until it finish or the defined --timeout occurs. (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.8/cli/commands/botkube_login.md b/versioned_docs/version-1.8/cli/commands/botkube_login.md deleted file mode 100644 index 6dbc9943..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube_login.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: botkube login ---- - -## botkube login - -Login to a Botkube Cloud - -``` -botkube login [OPTIONS] [flags] -``` - -### Examples - -``` -# start interactive setup -botkube login - -``` - -### Options - -``` - --cloud-dashboard-url string Botkube Cloud URL (default "https://app.botkube.io") - -h, --help help for login - --local-server-addr string Address of a local server which is used for the login flow (default "localhost:8085") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.8/cli/commands/botkube_migrate.md b/versioned_docs/version-1.8/cli/commands/botkube_migrate.md deleted file mode 100644 index 661f5aa3..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube_migrate.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: botkube migrate ---- - -## botkube migrate - -Automatically migrates Botkube installation into Botkube Cloud - -### Synopsis - -Automatically migrates Botkube installation to Botkube Cloud. -This command will create a new Botkube Cloud instance based on your existing Botkube configuration, and upgrade your Botkube installation to use the remote configuration. - -Supported Botkube bot platforms for migration: - -- Socket Slack -- Discord -- Mattermost - -Limitations: - -- Plugins are sourced from Botkube repository - -Use label selector to choose which Botkube pod you want to migrate. By default it's set to app=botkube. - -Examples: - - $ botkube migrate --label app=botkube --instance-name botkube-slack # Creates new Botkube Cloud instance with name botkube-slack and migrates pod with label app=botkube to it - -``` -botkube migrate [OPTIONS] [flags] -``` - -### Options - -``` - -y, --auto-approve Skips interactive approval for upgrading Botkube installation. - --cfg-exporter-image-registry string Registry for the Config Exporter job image (default "ghcr.io") - --cfg-exporter-image-repo string Repository for the Config Exporter job image (default "kubeshop/botkube-config-exporter") - --cfg-exporter-image-tag string Tag of the Config Exporter job image (default "v9.99.9-dev") - --cfg-exporter-poll-period duration Interval used to check if Config Exporter job was finished (default 1s) - --cfg-exporter-timeout duration Maximum execution time for the Config Exporter job (default 1m0s) - --cloud-api-url string Botkube Cloud API URL (default "https://api.botkube.io/graphql") - --cloud-dashboard-url string Botkube Cloud URL (default "https://app.botkube.io") - --cloud-env-api-key string API key environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_API_KEY") - --cloud-env-endpoint string Endpoint environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_ENDPOINT") - --cloud-env-id string Identifier environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_IDENTIFIER") - -h, --help help for migrate - --image-tag string Botkube image tag, e.g. "latest" or "v1.7.0" - --instance-name string Botkube Cloud Instance name that will be created - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - -l, --label string Label used for identifying the Botkube pod (default "app=botkube") - -n, --namespace string Namespace of Botkube pod (default "botkube") - -q, --skip-connect Skips connecting to Botkube Cloud after migration - --skip-open-browser Skips opening web browser after migration - --timeout duration Maximum time during which the Botkube installation is being watched, where "0" means "infinite". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default 10m0s) - --token string Botkube Cloud authentication token - -w, --watch --timeout Watches the status of the Botkube installation until it finish or the defined --timeout occurs. (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.8/cli/commands/botkube_telemetry.md b/versioned_docs/version-1.8/cli/commands/botkube_telemetry.md deleted file mode 100644 index 00e22bea..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube_telemetry.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: botkube telemetry ---- - -## botkube telemetry - -Configure collection of anonymous analytics - -### Options - -``` - -h, --help help for telemetry -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI -- [botkube telemetry disable](botkube_telemetry_disable.md) - Disable Botkube telemetry -- [botkube telemetry enable](botkube_telemetry_enable.md) - Enable Botkube telemetry diff --git a/versioned_docs/version-1.8/cli/commands/botkube_telemetry_disable.md b/versioned_docs/version-1.8/cli/commands/botkube_telemetry_disable.md deleted file mode 100644 index 65da8f3d..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube_telemetry_disable.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: botkube telemetry disable ---- - -## botkube telemetry disable - -Disable Botkube telemetry - -``` -botkube telemetry disable [flags] -``` - -### Examples - -``` -# To improve the user experience, Botkube collects anonymized data. -# It does not collect any identifying information, and all analytics -# are used only as aggregated collection of data to improve Botkube -# and adjust its roadmap. -# Read our privacy policy at https://docs.botkube.io/privacy - -# The Botkube CLI tool collects anonymous usage analytics. -# This data is only available to the Botkube authors and helps us improve the tool. - -# Disable Botkube telemetry -botkube telemetry disable - - - -``` - -### Options - -``` - -h, --help help for disable -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics diff --git a/versioned_docs/version-1.8/cli/commands/botkube_telemetry_enable.md b/versioned_docs/version-1.8/cli/commands/botkube_telemetry_enable.md deleted file mode 100644 index 0f2aa6db..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube_telemetry_enable.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: botkube telemetry enable ---- - -## botkube telemetry enable - -Enable Botkube telemetry - -``` -botkube telemetry enable [flags] -``` - -### Examples - -``` -# To improve the user experience, Botkube collects anonymized data. -# It does not collect any identifying information, and all analytics -# are used only as aggregated collection of data to improve Botkube -# and adjust its roadmap. -# Read our privacy policy at https://docs.botkube.io/privacy - -# Enable Botkube telemetry -botkube telemetry enable - - - -``` - -### Options - -``` - -h, --help help for enable -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics diff --git a/versioned_docs/version-1.8/cli/commands/botkube_uninstall.md b/versioned_docs/version-1.8/cli/commands/botkube_uninstall.md deleted file mode 100644 index cfcd752d..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube_uninstall.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: botkube uninstall ---- - -## botkube uninstall - -uninstall Botkube from cluster - -### Synopsis - -Use this command to uninstall the Botkube agent. - -``` -botkube uninstall [OPTIONS] [flags] -``` - -### Examples - -``` -# Uninstall default Botkube Helm release -botkube uninstall - -# Uninstall specific Botkube Helm release -botkube uninstall --release-name botkube-dev -``` - -### Options - -``` - -y, --auto-approve Skips interactive approval for deletion. - --cascade string Must be "background", "orphan", or "foreground". Selects the deletion cascading strategy for the dependents. Defaults to background. (default "background") - --description string add a custom description - --dry-run Simulate an uninstallation - -h, --help help for uninstall - --keep-history remove all associated resources and mark the release as deleted, but retain the release history - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - --namespace string Botkube namespace. (default "botkube") - --no-hooks prevent hooks from running during uninstallation - --release-name string Botkube Helm release name. (default "botkube") - --timeout duration time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s) - --wait if set, will wait until all the resources are deleted before returning. It will wait for as long as --timeout (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.8/cli/commands/botkube_version.md b/versioned_docs/version-1.8/cli/commands/botkube_version.md deleted file mode 100644 index 4603edb5..00000000 --- a/versioned_docs/version-1.8/cli/commands/botkube_version.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: botkube version ---- - -## botkube version - -Print the CLI version - -``` -botkube version [flags] -``` - -### Examples - -``` - -botkube version -botkube version -o=json -botkube version -o=yaml -botkube version -o=short - -``` - -### Options - -``` - -h, --help help for version - -o, --output string Output format. One of: json | pretty | short | yaml (default "pretty") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.8/cli/getting-started.mdx b/versioned_docs/version-1.8/cli/getting-started.mdx deleted file mode 100644 index 53dec41a..00000000 --- a/versioned_docs/version-1.8/cli/getting-started.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -id: getting-started -title: "Getting Started" -sidebar_position: 1 ---- - -# Getting Started - -Botkube includes a command-line interface (CLI) that you can use to interact with Botkube and Botkube Cloud from your terminal, or from a script. - -## Installation - -Select tab depending on the system you use: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -Use Homebrew to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- -Alternatively, download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.8.0/botkube-darwin-arm64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -
- - - -Use Homebrew to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- -Alternatively, download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.8.0/botkube-darwin-amd64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -
- - - -Download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.8.0/botkube-linux-amd64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -:::note -You may need to use `sudo` to run the `mv` command as it moves the binary file to the `/usr/local/bin/` directory. -::: - -
- -Alternatively, if you use Homebrew, you can use it to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- - - -Use curl to download the Botkube CLI binary: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.8.0/botkube-windows-amd64.exe -``` - -Move the binary to a directory under your `%PATH%`. - - - - - -Use curl to download the Botkube CLI binary: - -```shell -export OS="" # allowed values: darwin, linux, windows -export ARCH="" # allowed values: amd64, arm64, armv7 -#export SUFFIX=".exe" # uncomment if OS is 'windows' -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.8.0/botkube-${OS}-${ARCH}${SUFFIX} -``` - -Move the binary to a directory under your `PATH`. - - - -
- -## First use - -For the commands that are nested under `cloud` command you first need to authenticate with Botkube cloud by running: - -```bash -botkube login -``` - -If credentials are valid, the output is: - -```shell -Login Succeeded -``` - -All available commands you can simply discover by running `botkube --help` or `botkube -h` to see the help output which corresponds to a given command. - -## Autocompletion - -To learn how to enable autocompletion for your shell, run: - -```bash -botkube completion --help -``` - -> **NOTE:** Be sure to **restart your shell** after installing autocompletion. - -When you start typing a `botkube` command, press the `` character to show a list of available completions. Type `-` to show available flag completions. diff --git a/versioned_docs/version-1.8/cli/migrate.md b/versioned_docs/version-1.8/cli/migrate.md deleted file mode 100644 index 6b434328..00000000 --- a/versioned_docs/version-1.8/cli/migrate.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: migrating-installation-to-botkube-cloud -title: "Migrating installation to Botkube Cloud" -sidebar_position: 2 ---- - -## Migrating installation to Botkube Cloud - -If you have started using Botkube with the Open Source installation, you have the option to migrate this instance to be managed using [Botkube Cloud](https://app.botkube.io/). - -To make the migration process easier, we provide a dedicated `botkube cloud migrate` command that seamlessly transfers your Botkube installation to Botkube Cloud. - -Supported Botkube platforms: - -- Socket Slack -- Discord -- Mattermost - -## Steps - -1. [Install Botkube CLI](./getting-started.mdx#installation) -2. [Login into Botkube Cloud](./getting-started.mdx#first-use) -3. Run Botkube migrate: - - ```bash - botkube cloud migrate - ``` - -## Limitations - -The following list contains current limitations that we will address in the near future: - -- `extraObjects` in Botkube [helm configurations](https://github.com/kubeshop/botkube/blob/593746a70d9eb23469c28e5c0274c9a40a7b651d/helm/botkube/values.yaml#L1040) are ignored. If you have any extra resources under `extraObjects` section, you need to migrate them on your own. -- Custom `rbac.groups` are ignored. -- All 3rd-party plugins are ignored. -- Minimal supported Botkube version is v1.0.0. - -## See more - -To learn more about `botkube cloud migrate` and all supported settings, visit the [Botkube migrate](./commands/botkube_migrate.md) document. diff --git a/versioned_docs/version-1.8/configuration/action.md b/versioned_docs/version-1.8/configuration/action.md deleted file mode 100644 index 147f96bf..00000000 --- a/versioned_docs/version-1.8/configuration/action.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -id: action -title: Action -sidebar_position: 5 ---- - -The action configuration allows you to automate your workflow by defining commands that are executed on an incoming event. Similar to communication platforms, actions use [source bindings](source/index.md) to define the event sources (command triggers) and [executor bindings](../configuration/executor) to run a given command. - -The actions can be disabled and enabled using dedicated commands. See the [Automated actions](../usage/automated-actions.md) usage document for more details. - -## Predefined actions - -There are two predefined actions available: - -- `describe-created-resource` - describes a newly created resource, -- `show-logs-on-error` - prints logs on Pod/StatefulSet/DaemonSet/Deployment error. - -Both of them are disabled by default. See details in the [Syntax](#syntax) section. - -## Action output - -The command output is sent to the communication platforms that define the same source bindings. If there is no communication platform defined with the same source bindings, the action is still executed, but the output is ignored. - -To learn more how to configure sources for communicators, read the [communication](./communication/index.md) documentation. - -## Command templates - -Each action defines the `command` property which defines a command to be executed. It supports [Go template](https://golang.org/pkg/text/template/) syntax. The command template is rendered before actual execution. - -The following variables are available: - -- `{{ .Event }}` - the event object that triggered the action. See all available event properties in the [`event.go`](https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go) file. - -There are multiple helper functions supported by the templating engine. To learn more, read the documentation on the [`slim-sprig`](https://go-task.github.io/slim-sprig/) library page. - -## Syntax - -```yaml -# Map of actions. Action contains configuration for automation based on observed events. -# The property name under `actions` object is an alias for a given configuration. You can define multiple actions configuration with different names. -# -# Format: actions.{alias} -actions: - "describe-created-resource": - # If true, enables the action. - enabled: false - # Action display name posted in the channels bound to the same source bindings. - displayName: "Describe created resource" - # Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). - # You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. - command: "kubectl describe {{ .Event.TypeMeta.Kind | lower }}{{ if .Event.Namespace }} -n {{ .Event.Namespace }}{{ end }} {{ .Event.Name }}" - - # Bindings for a given action. - bindings: - # Event sources that trigger a given action. - sources: - - k8s-create-events - # Executors configuration used to execute a configured command. - executors: - - k8s-default-tools - "show-logs-on-error": - # If true, enables the action. - enabled: false - - # Action display name posted in the channels bound to the same source bindings. - displayName: "Show logs on error" - # Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). - # You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available event properties on https://github.com/kubeshop/botkube/blob/main/pkg/event/event.go. - command: "kubectl logs {{ .Event.TypeMeta.Kind | lower }}/{{ .Event.Name }} -n {{ .Event.Namespace }}" - - # Bindings for a given action. - bindings: - # Event sources that trigger a given action. - sources: - - k8s-err-with-logs-events - # Executors configuration used to execute a configured command. - executors: - - k8s-default-tools -``` - -## RBAC - -The `ChannelName` RBAC policy is not supported for automated actions at this time. -Use the `Static` RBAC policy instead. For more information read the [RBAC](./rbac.md) documentation. diff --git a/versioned_docs/version-1.8/configuration/alias.md b/versioned_docs/version-1.8/configuration/alias.md deleted file mode 100644 index 33e8d116..00000000 --- a/versioned_docs/version-1.8/configuration/alias.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -id: alias -title: Alias -sidebar_position: 4 ---- - -Botkube can define multiple aliases for arbitrary commands. The aliases are replaced with the underlying command before executing it. Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. - -Aliases work for all commands, including executor plugins and Botkube built-in ones. To learn more about how to configure Executors, see the [Executor](./executor/index.md) section. - -Aliases are defined globally for the whole Botkube installation. Once they are configured, read the [Aliases](../usage/executor/index.md#aliases) section in Usage document. - -## Syntax - -```yaml -# Custom aliases for given commands. -# The aliases are replaced with the underlying command before executing it. -# Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. -# -## Format: aliases.{alias} -aliases: - kc: - command: kubectl - displayName: "Kubectl alias" - k: - command: kubectl - displayName: "Kubectl alias" -## Multi-word alias example: -# kgp: -# command: kubectl get pods -# displayName: "Get pods" -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.8/configuration/assets/botkube-read-only.svg b/versioned_docs/version-1.8/configuration/assets/botkube-read-only.svg deleted file mode 100644 index d396ca54..00000000 --- a/versioned_docs/version-1.8/configuration/assets/botkube-read-only.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
dispatch
command
dispatch...
runs kubectl 
command
runs kubectl...
Slack
Slack
#general
#general
Kubernetes
Kubernetes
API Server
API Server
runs plugin
with dedicate
kubeconfig 
runs plugin...
resolves mapping
and generates
kubeconfig
resolves mapping...
#kubeconfig
group: general
#kubeconfiggroup...
uses
attached kubeconfig
uses...
kubectl plugin
kubectl plugin
# RBAC config mapping
botkube/kubectl:

context:
rbac:
group:
type: ChannelName
# RBAC config mapping...
Botkube Core
Botkube Core
Channels:
Channels:
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.8/configuration/assets/cloud-rbac-default.png b/versioned_docs/version-1.8/configuration/assets/cloud-rbac-default.png deleted file mode 100644 index d8882292..00000000 Binary files a/versioned_docs/version-1.8/configuration/assets/cloud-rbac-default.png and /dev/null differ diff --git a/versioned_docs/version-1.8/configuration/communication/index.md b/versioned_docs/version-1.8/configuration/communication/index.md deleted file mode 100644 index 99a262fd..00000000 --- a/versioned_docs/version-1.8/configuration/communication/index.md +++ /dev/null @@ -1,254 +0,0 @@ ---- -id: communication -title: "Communication" -sidebar_position: 1 ---- - -The communication settings contain: - -- Configuration for communication platforms scoped in separate communication groups, -- Platform-specific options, such as multichannel configuration for platforms that support channels. - -## Communication groups - -Communication group is a way to aggregate separate configurations for a set of communication platforms. You can specify multiple communication groups, and, in a result, support multiple Slack or Mattermost workspaces, Discord servers, or Elasticsearch server instances. - -Also, most platforms also support another level of multiple configurations within a workspace. For example, Slack supports multichannel configuration. To learn more about platform-specific options, see the [Syntax](#syntax) section. - -:::note -The purpose of the communication group is to allow using multiple workspaces, e.g. for Slack or Mattermost. To use multiple channels inside the same workspace, don't define separate communication groups, but use `channels` property under a given communication platform instead. -::: - -### Example - -Consider the following configuration: - -```yaml -communications: - "first-group": # Your own alias of a given communication group - slack: - enabled: true - token: "{SLACK_TOKEN_1}" # Token for Botkube Slack app installed in Workspace 1 - channels: - "general": # Your own alias for the channel configuration - name: general - bindings: - executors: # Executors configuration for a given channel - - k8s-default-tools - sources: # Notification sources configuration for a given channel - - k8s-events - "random": # Your own alias for the channel configuration - name: random - bindings: - executors: [] # Executors configuration for a given channel - sources: # Notification sources configuration for a given channel - - k8s-events - "second-group": # Your own alias of a given communication group - slack: - enabled: true - token: "{SLACK_TOKEN_2}" # Token for Botkube Slack app installed in Workspace 2 - channels: - "primary-channel": # Your own alias for the channel configuration - name: general - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: true - bindings: - executors: # Executors configuration for a given channel - - k8s-default-tools - sources: # Notification sources configuration for a given channel - - k8s-events -``` - -The example YAML configuration definition results in the following configuration. - -For Slack **Workspace 1**, as defined by the first communication group (`first-group`): - -- Notifications from `k8s-events` source are sent to the `general` and `random` channels. -- Commands from the `k8s-default-tools` configuration can be executed in the `general` channel. On `random` channel executors are not configured. - -For Slack **Workspace 2**, as defined by the second communication group (`second-group`): - -- Notifications are configured to be sent from the `k8s-events` source to the `general` channel. They are disabled by default, and can be enabled with `@Botkube` command or during Botkube upgrade. -- Commands from the `k8s-default-tools` configuration can be executed in the `general` channel. - -## Source and Executor Bindings - -Most of the communication platforms support executor and source bindings, which allows fine-tuning the notifications and allowed Botkube commands inside a given channel. - -With executor bindings you can configure which executors are allowed in a given channel. To read more about executor configuration, see the [Executor](../executor) document. - -With source bindings, you can specify which events are sent to a given channel (or, in case of Elasticsearch, index). To read more about source configuration, see the [Source](../source) document. - -## Known limitations - -Currently, [Microsoft Teams](../../installation/teams/) integration works differently than other bot integrations, such as Slack or Discord. While Microsoft Teams support multiple channels for forwarding notifications, you need to turn them on with `@Botkube enable notifications` on each channel. Microsoft Teams uses source and executor bindings defined under `communications.teams.bindings` property for all channels in the following way: - -- Executor bindings apply to all MS Teams channels where Botkube has access to. -- Source bindings apply to all channels which have notification turned on with `@Botkube enable notifications` command. - -## Syntax - -Each communication platform has specific options, however they share a similar syntax for consistency. -For example, bot integrations such as Slack, Mattermost or Discord have multichannel support, that is you can configure multiple channels with separate bindings. Same with Elasticsearch - you can forward notifications to multiple Elasticsearch indices, according to the sources configuration. - -```yaml -# Map of communication groups. Communication group contains settings for multiple communication platforms. -# The property name under `communications` object is an alias for a given configuration group. You can define multiple communication groups with different names. -# -# Format: communications.{alias} -communications: - "default-group": - # Settings for Slack. - slack: - # If true, enables Slack bot. - enabled: false - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - # Format: channels.{alias} - channels: - "default": - # Slack channel name without '#' prefix where you have added Botkube and want to receive notifications in. - name: "SLACK_CHANNEL" - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: false - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-events - # Slack token. - token: "SLACK_API_TOKEN" - - # Settings for Mattermost. - mattermost: - # If true, enables Mattermost bot. - enabled: false - # User in Mattermost which belongs the specified Personal Access token. - botName: "Botkube" - # The URL (including http/https schema) where Mattermost is running. e.g. https://example.com:9243 - url: "MATTERMOST_SERVER_URL" - # Personal Access token generated by Botkube user. - token: "MATTERMOST_TOKEN" - # The Mattermost Team name where Botkube is added. - team: "MATTERMOST_TEAM" - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - # Format: channels.{alias} - channels: - "default": - # The Mattermost channel name for receiving Botkube alerts. - # The Botkube user needs to be added to it. - name: "MATTERMOST_CHANNEL" - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: false - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-events - - # Settings for MS Teams. - teams: - # If true, enables MS Teams bot. - enabled: false - # The Bot name set while registering Bot to MS Teams. - botName: "Botkube" - # The Botkube application ID generated while registering Bot to MS Teams. - appID: "APPLICATION_ID" - # The Botkube application password generated while registering Bot to MS Teams. - appPassword: "APPLICATION_PASSWORD" - bindings: - # Executor bindings apply to all MS Teams channels where Botkube has access to. - executors: - - k8s-default-tools - # Source bindings apply to all channels which have notification turned on with `@Botkube enable notifications` command. - sources: - - k8s-events - # The path in endpoint URL provided while registering Botkube to MS Teams. - messagePath: "/bots/teams" - # The Service port for bot endpoint on Botkube container. - port: 3978 - - # Settings for Discord. - discord: - # If true, enables Discord bot. - enabled: false - # Botkube Bot Token. - token: "DISCORD_TOKEN" - # Botkube Application Client ID. - botID: "DISCORD_BOT_ID" - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - # Format: channels.{alias} - channels: - "default": - # Discord channel ID for receiving Botkube alerts. - # The Botkube user needs to be added to it. - id: "DISCORD_CHANNEL_ID" - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: false - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-events - - # Settings for Elasticsearch. - elasticsearch: - # If true, enables Elasticsearch. - enabled: false - awsSigning: - # If true, enables awsSigning using IAM for Elasticsearch hosted on AWS. Make sure AWS environment variables are set. - # [Ref doc](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html). - enabled: false - # AWS region where Elasticsearch is deployed. - awsRegion: "us-east-1" - # AWS IAM Role arn to assume for credentials, use this only if you don't want to use the EC2 instance role or not running on AWS instance. - roleArn: "" - # The server URL, e.g. https://example.com:9243 - server: "ELASTICSEARCH_ADDRESS" - # Basic Auth username. - username: "ELASTICSEARCH_USERNAME" - # Basic Auth password. - password: "ELASTICSEARCH_PASSWORD" - # If true, skips the verification of TLS certificate of the Elastic nodes. - # It's useful for clusters with self-signed certificates. - skipTLSVerify: false - # Map of configured indices. The `indices` property name is an alias for a given configuration. - # - # Format: indices.{alias} - indices: - "default": - # Configures Elasticsearch index settings. - name: botkube - type: botkube-event - shards: 1 - replicas: 0 - bindings: - # Notification sources configuration for a given index. - sources: - - k8s-events - - # Settings for Webhook. - webhook: - # If true, enables Webhook. - enabled: false - # The Webhook URL, e.g.: https://example.com:80 - url: "WEBHOOK_URL" - bindings: - # -- Notification sources configuration for the webhook. - sources: - - k8s-events -``` - -The default configuration for Helm chart can be found in [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml). diff --git a/versioned_docs/version-1.8/configuration/communication/vault-csi.md b/versioned_docs/version-1.8/configuration/communication/vault-csi.md deleted file mode 100644 index e9279d57..00000000 --- a/versioned_docs/version-1.8/configuration/communication/vault-csi.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -id: vault-csi -title: "Tokens from Vault via CSI driver" -sidebar_position: 1 ---- - -This tutorial shows how to install Botkube which takes the configuration from Vault instance. - -## Prerequisites - -- Kubernetes Clusters that supports CSI. - - For example, to run [K3s](https://k3s.io/) using [Lima](https://github.com/lima-vm/lima), run: - - ```bash - limactl start template://k3s - ``` - -- [Socket Slack integration installed](../../installation/slack/socket-slack.md). -- [`helm`](https://helm.sh/docs/intro/install/) v3 installed. -- [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) installed. - -## Steps - -This instruction guides you through the installation of Botkube and Vault on a Kubernetes cluster and configuring them together. - -1. Install Vault with CSI enabled: - - ```bash - helm repo add hashicorp https://helm.releases.hashicorp.com - helm repo update - helm install vault hashicorp/vault --namespace default \ - --set "server.dev.enabled=true" \ - --set "injector.enabled=false" \ - --set "csi.enabled=true" - ``` - -2. Add Slack token in Vault: - - ```bash - # Exec to pod - kubectl exec -n default -it vault-0 -- /bin/sh - ``` - - ```bash - # Write the token to Vault - vault kv put -mount=secret slack-app-token token=xapp-... - vault kv put -mount=secret slack-bot-token token=xoxb-... - ``` - -3. Enable Vault's Kubernetes authentication: - - ```bash - vault auth enable kubernetes - vault write auth/kubernetes/config \ - kubernetes_host="https://$KUBERNETES_PORT_443_TCP_ADDR:443" - ``` - - ```bash - vault policy write internal-app - < /tmp/values.yaml << ENDOFFILE - extraObjects: - - apiVersion: secrets-store.csi.x-k8s.io/v1 - kind: SecretProviderClass - metadata: - name: vault-database - spec: - provider: vault - parameters: - roleName: "database" - vaultAddress: "http://vault.default:8200" - objects: | - - objectName: "slack-app-token" - secretPath: "secret/data/slack-app-token" - secretKey: "token" - - objectName: "slack-bot-token" - secretPath: "secret/data/slack-bot-token" - secretKey: "token" - secretObjects: - - secretName: communication-slack - type: Opaque - data: - - objectName: "slack-app-token" - key: "slack-app-token" - - objectName: "slack-bot-token" - key: "slack-bot-token" - - communications: - 'default-group': - # Settings for SocketSlack - socketSlack: - enabled: true - channels: {} # configure your channels - # botToken - specified via env variable - # appToken - specified via env variable - - extraEnv: - - name: BOTKUBE_COMMUNICATIONS_DEFAULT-GROUP_SOCKET__SLACK_APP__TOKEN - valueFrom: - secretKeyRef: - name: communication-slack - key: slack-app-token - - name: BOTKUBE_COMMUNICATIONS_DEFAULT-GROUP_SOCKET__SLACK_BOT__TOKEN - valueFrom: - secretKeyRef: - name: communication-slack - key: slack-bot-token - - extraVolumeMounts: - - name: secrets-store-inline - mountPath: "/mnt/secrets-store" - readOnly: true - - extraVolumes: - - name: secrets-store-inline - csi: - driver: secrets-store.csi.k8s.io - readOnly: true - volumeAttributes: - secretProviderClass: "vault-database" - ENDOFFILE - ``` - -6. Install Botkube: - - :::note - You need to clone the https://github.com/kubeshop/botkube first. - ::: - - ```bash - helm install botkube --namespace default \ - -f /tmp/values.yaml \ - ./helm/botkube - ``` diff --git a/versioned_docs/version-1.8/configuration/executor/doctor.md b/versioned_docs/version-1.8/configuration/executor/doctor.md deleted file mode 100644 index 6ca4e3c9..00000000 --- a/versioned_docs/version-1.8/configuration/executor/doctor.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: doctor -title: Doctor -sidebar_position: 5 ---- - -The Botkube Doctor executor plugin allows you to run the `doctor` command directly in the chat window of each communication platform. Doctor is a ChatGPT integration project that knows how to diagnose Kubernetes problems and suggest solutions. - -The Doctor plugin is hosted by the official Botkube plugin repository. To enable the Doctor plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable the `doctor` executor, add `--set 'executors.ai.botkube/doctor.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). The `doctor` plugin uses ChatGPT for diagnosing problems, so you need to obtain an API Key from the OpenAI website as described [here](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key) and set it as follows: -`--set 'executors.ai.botkube/doctor.config.apiKey='` - -## Syntax - -```yaml -# 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: - "k8s-tools": - # Doctor executor configuration. - botkube/doctor: - enabled: false - ## Custom doctor plugin configuration. - config: - ## Open API key for accessing the ChatGPT engine. You can get it at https://platform.openai.com/account/api-keys. - apiKey: "" - ## OpenAI API Base URL. If empty, the default "https://api.openai.com/v1" value is used. - apiBaseUrl: "" - ## Default engine to use. If empty, "text-davinci-003" engine is used. - defaultEngine: "" - ## Optional organization ID for requests. - organizationID: "" - ## User agent to use for requests. If empty, the default value is used ("go-gpt3"). - userAgent: "" -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.8/configuration/executor/exec.md b/versioned_docs/version-1.8/configuration/executor/exec.md deleted file mode 100644 index 16362f47..00000000 --- a/versioned_docs/version-1.8/configuration/executor/exec.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -id: exec -title: Exec -sidebar_position: 4 ---- - -The `exec` executor plugin allows you to install and run CLI applications directly from chat (e.g., Slack, Discord, or Mattermost) without any hassle. - -The `exec` plugin is hosted by the official Botkube plugin repository. To enable the `exec` plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable `exec` plugin, add `--set 'executors.bins-management.botkube/exec.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). By default, the read-only `KUBECONFIG` is assigned. - -For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it from plugin's `context` configuration. To learn more refer to the [RBAC section](../rbac.md). - -## Syntax - -```yaml -# 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: - bins-management: - # Exec executor configuration. - # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - botkube/exec: - enabled: false - # Custom Exec plugin configuration. - config: - # An array of templates that define how to convert the command output into an interactive message. - templates: - # Link to templates source - # It uses the go-getter library, which supports multiple URL formats (such as HTTP, Git repositories, or S3) and is able to unpack archives. - # For more details, see the documentation at https://github.com/hashicorp/go-getter. - - ref: github.com/kubeshop/botkube//cmd/executor/exec/templates?ref=main - context: - # RBAC configuration for this plugin. - rbac: - group: - # Static impersonation for given group. - type: Static - static: - # Name of group.rbac.authorization.k8s.io the plugin role will be bound to. - values: [botkube-plugins-default] -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.8/configuration/executor/flux.md b/versioned_docs/version-1.8/configuration/executor/flux.md deleted file mode 100644 index a6848f2f..00000000 --- a/versioned_docs/version-1.8/configuration/executor/flux.md +++ /dev/null @@ -1,111 +0,0 @@ ---- -id: flux -title: Flux -sidebar_position: 6 ---- - -The Botkube Flux executor plugin allows you to run the [`flux`](https://fluxcd.io/) CLI commands directly within the chat window of your chosen communication platform. - -The Flux plugin is hosted in the official Botkube plugin repository. To enable the Flux plugin, ensure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -``` - -## Prerequisite elevated RBAC permissions - -One of the plugin capabilities is the `flux diff` command. To use it, you need to update the Flux plugin RBAC configuration. This is necessary because the command performs a server-side dry run that requires patch permissions, as specified in the [Kubernetes documentation](https://kubernetes.io/docs/reference/using-api/api-concepts/#dry-run-authorization). - -If you use Botkube self-hosted installation in version 1.4.1 or newer, you can create them during Botkube install/upgrade by specifying `--set="rbac.groups.flux.create=true"` override. - -However, you can also create them manually: - -```shell -cat > /tmp/flux-rbac.yaml << ENDOFFILE ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: flux -rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list", "patch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: flux -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: flux -subjects: -- kind: Group - name: flux - apiGroup: rbac.authorization.k8s.io -ENDOFFILE - -kubectl apply -f /tmp/flux-rbac.yaml -``` - -Next, use the `flux` group in the plugin RBAC configuration: - -```yaml -executors: - flux: - botkube/flux: - enabled: true - config: - # ... - - context: - rbac: - group: - type: Static - static: - values: ["flux"] -``` - -## Enabling plugin - -To enable the GitHub plugin, add the following flag to the Botkube [`install` command](../../cli/commands/botkube_install.md): - -```sh ---set 'executors.flux.botkube/flux.enabled'=true -``` - -The Flux plugin comes with integrated GitHub support. To enable it, you'll need a valid [GitHub token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token). Set the token using the following command: - -```sh ---set 'executors.flux.botkube/flux.config.github.auth.accessToken=' -``` - -By default, the Flux plugin has read-only access. To perform actions like creating or deleting Flux-related sources, you'll need to customize the [RBAC](../rbac.md#configuration). - -## Plugin Configuration Syntax - -```yaml -# 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: - flux: - botkube/flux: - enabled: false - config: - github: - auth: - # GitHub access token. - # Instructions for token creation: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token. - # Lack of token may limit functionality, e.g., adding comments to pull requests or approving them. - accessToken: "" - log: - level: "info" -``` - -For the default Helm chart configuration, refer to the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.8/configuration/executor/helm.md b/versioned_docs/version-1.8/configuration/executor/helm.md deleted file mode 100644 index b6672920..00000000 --- a/versioned_docs/version-1.8/configuration/executor/helm.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -id: helm -title: Helm -sidebar_position: 3 ---- - -The Botkube Helm executor plugin allows you to run the `helm` command directly in the chat window of each communication platform. - -The Helm plugin is hosted by the official Botkube plugin repository. To enable the Helm plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable Helm plugin, add `--set 'executors.k8s-default-tools.botkube/helm.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). By default, just the read-only Helm commands are supported. - -For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it from plugin's `context` configuration. To learn more refer to the [RBAC section](../rbac.md). - -## Syntax - -```yaml -# 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: - "k8s-tools": - botkube/helm: # Plugin name syntax: /[@]. 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. - helmDriver: "secret" # Allowed values are configmap, secret, memory. - helmCacheDir: "/tmp/helm/.cache" - helmConfigDir: "/tmp/helm/" - context: - # RBAC configuration for this plugin. - rbac: - group: - # Static impersonation for given group. - type: Static - static: - # Name of group.rbac.authorization.k8s.io the plugin role will be bound to. - values: [botkube-plugins-default] -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -## Merging strategy - -For all collected `helm` executors bindings, configuration properties are overridden based on the order of the binding list. The priority is given to the last binding specified on the list. Empty properties are omitted. - -### Example - -Consider such configuration: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - name: "random" - bindings: - executors: - - helm-one - - helm-two - - helm-three - -executors: - "helm-one": - botkube/helm: - enabled: true - config: - helmDriver: "secret" - helmCacheDir: "/tmp/helm/.cache" - helmConfigDir: "/tmp/helm/" - "helm-two": - botkube/helm: - enabled: true - config: - helmDriver: "configmap" - "helm-three": - botkube/helm: - enabled: false - config: - helmDriver: "secret" - helmCacheDir: "/example/helm/.cache" - helmConfigDir: "/example/helm/" -``` - -We can see that: - -- The `helmDriver` is set to `configmap` as it's overridden by the `helm-two` binding - the **last one** which is both enabled and sets the `helmDriver` property. -- The `helmConfigDir` and `helmCacheDir` are set to values specified by the `helm-one` configuration as the `helm-two` don't specify them. -- The `helm-tree` binding is disabled (`botkube/helm.enabled` is set to `false`), so it's not taken into account. diff --git a/versioned_docs/version-1.8/configuration/executor/index.md b/versioned_docs/version-1.8/configuration/executor/index.md deleted file mode 100644 index 4907fcce..00000000 --- a/versioned_docs/version-1.8/configuration/executor/index.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -id: executor -title: Executor -sidebar_position: 3 ---- - -The executor configuration allows you to define multiple executor configurations that can be later referred in [communication](../communication) bindings. For example, take a look at such executor definition: - -```yaml -executors: - "kubectl-global": # This is an executor configuration name, which is referred in communication bindings. - kubectl: - # ... trimmed ... - - "helm-read-only": # This is an executor configuration name, which is referred in communication bindings. - helm: - # ... trimmed ... -``` - -This can be later used by the communication platforms: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - bindings: - executors: # The order is important for merging strategy. - - kubectl-global # The executor configuration name - - helm-read-only # The executor configuration name - # ... trimmed ... -``` - -To use the Botkube executor plugins, first you need to define the plugins repository under the `plugins` property: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Next, you can configure executor from a given repository: - -```yaml -executors: - "plugins": - repo-name/executor-name@v1.0.0: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} -``` - -For all executor configuration properties, see the [**syntax**](#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. - -```yaml -# -- 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 - -```yaml -# 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: - "k8s-tools": - botkube/helm@v1.8.0: # Plugin name syntax: /[@]. 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. - helmDriver: "secret" - - 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.8.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](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.8/configuration/executor/kubectl.md b/versioned_docs/version-1.8/configuration/executor/kubectl.md deleted file mode 100644 index 8a30c55a..00000000 --- a/versioned_docs/version-1.8/configuration/executor/kubectl.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -id: kubectl -title: Kubectl -sidebar_position: 2 ---- - -The Botkube Kubectl executor plugin allows you to run the `kubectl` command directly in the chat window of each communication platform. - -The Kubectl plugin is hosted by the official Botkube plugin repository. To enable the Helm plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable `kubectl` executor, add `--set 'executors.k8s-default-tools.botkube/kubectl.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). By default, just the read-only `kubectl` commands are supported. - -For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it from plugin's `context` configuration. To learn more refer to the [RBAC section](../rbac.md). - -## Syntax - -```yaml -# 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: - "k8s-tools": - # Kubectl executor configuration. - botkube/kubectl: - enabled: false - config: - # Configures the default Namespace for executing Botkube `kubectl` commands. If not set, uses the 'default'. - defaultNamespace: "default" - # Configures the interactive kubectl command builder. - interactiveBuilder: - allowed: - # Configures which K8s namespace are displayed in namespace dropdown. - # If not specified, plugin needs to have access to fetch all Namespaces, otherwise Namespace dropdown won't be visible at all. - namespaces: ["default"] - # Configures which `kubectl` methods are displayed in commands dropdown. - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - # Configures which K8s resource are displayed in resources dropdown. - resources: ["deployments", "pods", "namespaces"] - context: - # RBAC configuration for this plugin. - rbac: - group: - # Static impersonation for given group. - type: Static - static: - # Name of group.rbac.authorization.k8s.io the plugin role will be bound to. - values: [botkube-plugins-default] -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -## Merging strategy - -For all collected `kubectl` executors bindings, configuration properties are overridden based on the order of the binding list. The priority is given to the last binding specified on the list. Empty properties are omitted. - -### Example - -Consider such configuration: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - name: "random" - bindings: - executors: - - kubectl-one - - kubectl-two - - kubectl-three - -executors: - "kubectl-one": - kubectl: - enabled: true - config: - defaultNamespace: "default" - interactiveBuilder: - allowed: - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - resources: ["deployments", "pods", "namespaces"] - "kubectl-two": - kubectl: - enabled: true - config: - interactiveBuilder: - allowed: - namespaces: ["default"] - verbs: ["api-resources", "top"] - "kubectl-three": - kubectl: - enabled: false - config: - interactiveBuilder: - allowed: - namespaces: ["kube-system"] -``` - -We can see that: - -- Only the `default` namespace is displayed in the interactive command builder. This is a result of merging `kubectl-one` and `kubectl-two`. The `kubectl-three` binding is not taken into account as it's disabled. -- Only the `api-resources` and `top` verbs are displayed in the interactive command builder as they are overridden by the `kubectl-two`. -- All resources defined in `kubectl-one` are displayed in the interactive command builder as other enabled bindings don't override this property. diff --git a/versioned_docs/version-1.8/configuration/general.md b/versioned_docs/version-1.8/configuration/general.md deleted file mode 100644 index deb37cb8..00000000 --- a/versioned_docs/version-1.8/configuration/general.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: general -title: General -sidebar_position: 6 ---- - -The general settings holds a general configuration for the Botkube backend. For example, log level, disabling config watcher and similar. - -## Syntax - -```yaml -# General Botkube configuration. -settings: - # Cluster name to differentiate incoming messages. - clusterName: not-configured - # If true, notifies about new Botkube releases. - upgradeNotifier: true - # Botkube logging settings. - log: - # Sets one of the log levels. Allowed values: `info`, `warn`, `debug`, `error`, `fatal`, `panic`. - level: info - # Configures log format. Allowed values: `text`, `json`. - formatter: json - # If true, disable ANSI colors in logging. Ignored when `json` formatter is used. - disableColors: false - -# Parameters for the Config Watcher component which reloads Botkube on ConfigMap changes. -# It restarts Botkube when configuration data change is detected. It watches ConfigMaps and/or Secrets with the `botkube.io/config-watch: "true"` label from the namespace where Botkube is installed. -configWatcher: - # If true, restarts the Botkube Pod on config changes. - enabled: true - # In-cluster Config Watcher configuration. It is used when remote configuration is not provided. - inCluster: - # Resync period for the Config Watcher informers. - informerResyncPeriod: 10m -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.8/configuration/helm-chart-parameters.md b/versioned_docs/version-1.8/configuration/helm-chart-parameters.md deleted file mode 100644 index 7d97b079..00000000 --- a/versioned_docs/version-1.8/configuration/helm-chart-parameters.md +++ /dev/null @@ -1,299 +0,0 @@ ---- -id: helm-chart-parameters -title: Helm chart parameters -sidebar_position: 8 ---- - -![Version: v1.8.0](https://img.shields.io/badge/Version-v1.8.0-informational?style=flat-square) ![AppVersion: v1.8.0](https://img.shields.io/badge/AppVersion-v1.8.0-informational?style=flat-square) - -Controller for the Botkube Slack app which helps you monitor your Kubernetes cluster, debug deployments and run specific checks on resources in the cluster. - -**Homepage:** [botkube.io](https://botkube.io) - -## Maintainers - -| Name | Email | -| ---------------- | --------------------- | -| Botkube Dev Team | `dev-team@botkube.io` | - -## Source Code - -- [github.com/kubeshop/botkube](https://github.com/kubeshop/botkube) - -## Parameters - -| Key | Type | Default | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------- | -| [image.registry](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L14) | string | `"ghcr.io"` | Botkube container image registry. | -| [image.repository](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L16) | string | `"kubeshop/botkube"` | Botkube container image repository. | -| [image.pullPolicy](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L18) | string | `"IfNotPresent"` | Botkube container image pull policy. | -| [image.tag](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L20) | string | `"v1.8.0"` | Botkube container image tag. Default tag is `appVersion` from Chart.yaml. | -| [podSecurityPolicy](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L24) | object | `{"enabled":false}` | Configures Pod Security Policy to allow Botkube to run in restricted clusters. [Ref doc](https://kubernetes.io/docs/concepts/policy/pod-security-policy/). | -| [securityContext](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L30) | object | Runs as a Non-Privileged user. | Configures security context to manage user Privileges in Pod. [Ref doc](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod). | -| [containerSecurityContext](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L36) | object | `{"allowPrivilegeEscalation":false,"privileged":false,"readOnlyRootFilesystem":true}` | Configures container security context. [Ref doc](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container). | -| [rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L43) | object | `{"create":true,"groups":{"argocd":{"create":false,"rules":[{"apiGroups":[""],"resources":["configmaps"],"verbs":["get","update"]},{"apiGroups":["argoproj.io"],"resources":["applications"],"verbs":["get","patch"]}]},"botkube-plugins-default":{"create":true,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list"]}]},"flux-read-patch":{"create":false,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list","patch"]}]}},"rules":[],"serviceAccountMountPath":"/var/run/7e7fd2f5-b15d-4803-bc52-f54fba357e76/secrets/kubernetes.io/serviceaccount","staticGroupName":""}` | Role Based Access for Botkube Pod and plugins. [Ref doc](https://kubernetes.io/docs/admin/authorization/rbac/). | -| [rbac.serviceAccountMountPath](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L47) | string | `"/var/run/7e7fd2f5-b15d-4803-bc52-f54fba357e76/secrets/kubernetes.io/serviceaccount"` | It is used to specify a custom path for mounting a service account to the Botkube deployment. This is important because we run plugins within the same Pod, and we want to avoid potential bugs when plugins rely on the default in-cluster K8s client configuration. Instead, they should always use kubeconfig specified directly for a given plugin. | -| [rbac.create](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L50) | bool | `true` | Configure RBAC resources for Botkube and (deprecated) `staticGroupName` subject with `rules`. For creating RBAC resources related to plugin permissions, use the `groups` property. | -| [rbac.rules](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L52) | list | `[]` | Deprecated. Use `rbac.groups` instead. | -| [rbac.staticGroupName](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L54) | string | `""` | Deprecated. Use `rbac.groups` instead. | -| [rbac.groups](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L56) | object | `{"argocd":{"create":false,"rules":[{"apiGroups":[""],"resources":["configmaps"],"verbs":["get","update"]},{"apiGroups":["argoproj.io"],"resources":["applications"],"verbs":["get","patch"]}]},"botkube-plugins-default":{"create":true,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list"]}]},"flux-read-patch":{"create":false,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list","patch"]}]}}` | Use this to create RBAC resources for specified group subjects. | -| [rbac.groups.argocd.create](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L65) | bool | `false` | Set it to `true` when using ArgoCD source plugin. | -| [rbac.groups.flux-read-patch.create](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L75) | bool | `false` | Set it to `true` when using Flux executor plugin to enable `flux diff`. | -| [kubeconfig.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L84) | bool | `false` | If true, enables overriding the Kubernetes auth. | -| [kubeconfig.base64Config](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L86) | string | `""` | A base64 encoded kubeconfig that will be stored in a Secret, mounted to the Pod, and specified in the KUBECONFIG environment variable. | -| [kubeconfig.existingSecret](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L91) | string | `""` | A Secret containing a kubeconfig to use. | -| [actions](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L98) | object | See the `values.yaml` file for full object. | Map of actions. Action contains configuration for automation based on observed events. The property name under `actions` object is an alias for a given configuration. You can define multiple actions configuration with different names. | -| [actions.describe-created-resource.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L101) | bool | `false` | If true, enables the action. | -| [actions.describe-created-resource.displayName](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L103) | string | `"Describe created resource"` | Action display name posted in the channels bound to the same source bindings. | -| [actions.describe-created-resource.command](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L108) | string | See the `values.yaml` file for the command in the Go template form. | Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available Kubernetes event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. | -| [actions.describe-created-resource.bindings](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L111) | object | `{"executors":["k8s-default-tools"],"sources":["k8s-create-events"]}` | Bindings for a given action. | -| [actions.describe-created-resource.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L113) | list | `["k8s-create-events"]` | Event sources that trigger a given action. | -| [actions.describe-created-resource.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L116) | list | `["k8s-default-tools"]` | Executors configuration used to execute a configured command. | -| [actions.show-logs-on-error.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L120) | bool | `false` | If true, enables the action. | -| [actions.show-logs-on-error.displayName](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L123) | string | `"Show logs on error"` | Action display name posted in the channels bound to the same source bindings. | -| [actions.show-logs-on-error.command](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L128) | string | See the `values.yaml` file for the command in the Go template form. | Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available Kubernetes event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. | -| [actions.show-logs-on-error.bindings](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L130) | object | `{"executors":["k8s-default-tools"],"sources":["k8s-err-with-logs-events"]}` | Bindings for a given action. | -| [actions.show-logs-on-error.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L132) | list | `["k8s-err-with-logs-events"]` | Event sources that trigger a given action. | -| [actions.show-logs-on-error.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L135) | list | `["k8s-default-tools"]` | Executors configuration used to execute a configured command. | -| [sources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L144) | object | See the `values.yaml` file for full object. | Map of sources. Source contains configuration for Kubernetes events and sending recommendations. The property name under `sources` object is an alias for a given configuration. You can define multiple sources configuration with different names. Key name is used as a binding reference. | -| [sources.k8s-recommendation-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L149) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [executors.k8s-default-tools.botkube/helm.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [executors.ai.botkube/doctor.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [executors.bins-management.botkube/exec.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L152) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.bins-management.botkube/exec.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.ai.botkube/doctor.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.k8s-default-tools.botkube/helm.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L155) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [executors.bins-management.botkube/exec.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [executors.ai.botkube/doctor.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [executors.k8s-default-tools.botkube/helm.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L157) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [executors.bins-management.botkube/exec.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [executors.k8s-default-tools.botkube/helm.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [executors.ai.botkube/doctor.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L160) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L174) | object | `{"ingress":{"backendServiceValid":true,"tlsSecretValid":true},"pod":{"labelsSet":true,"noLatestImageTag":true}}` | Describes configuration for various recommendation insights. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L176) | object | `{"labelsSet":true,"noLatestImageTag":true}` | Recommendations for Pod Kubernetes resource. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod.noLatestImageTag](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L178) | bool | `true` | If true, notifies about Pod containers that use `latest` tag for images. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod.labelsSet](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L180) | bool | `true` | If true, notifies about Pod resources created without labels. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L182) | object | `{"backendServiceValid":true,"tlsSecretValid":true}` | Recommendations for Ingress Kubernetes resource. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress.backendServiceValid](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L184) | bool | `true` | If true, notifies about Ingress resources with invalid backend service reference. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress.tlsSecretValid](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L186) | bool | `true` | If true, notifies about Ingress resources with invalid TLS secret reference. | -| [sources.k8s-all-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L192) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L198) | object | See the `values.yaml` file for full object. | Filter settings for various sources. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters.objectAnnotationChecker](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L200) | bool | `true` | If true, enables support for `botkube.io/disable` resource annotation. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters.nodeEventsChecker](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L202) | bool | `true` | If true, filters out Node-related events that are not important. | -| [sources.k8s-all-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L206) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-create-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L210) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L210) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-all-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L210) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L210) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-err-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L210) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-all-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L220) | object | `{"message":{"exclude":[],"include":[]},"reason":{"exclude":[],"include":[]},"types":["create","delete","error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L222) | list | `["create","delete","error"]` | Lists all event types to be watched. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L228) | object | `{"exclude":[],"include":[]}` | Optional list of exact values or regex patterns to filter events by event reason. Skipped, if both include/exclude lists are empty. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason.include](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L230) | list | `[]` | Include contains a list of allowed values. It can also contain regex expressions. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason.exclude](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L233) | list | `[]` | Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. Exclude list is checked before the Include list. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L236) | object | `{"exclude":[],"include":[]}` | Optional list of exact values or regex patterns to filter event by event message. Skipped, if both include/exclude lists are empty. If a given event has multiple messages, it is considered a match if any of the messages match the constraints. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message.include](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L238) | list | `[]` | Include contains a list of allowed values. It can also contain regex expressions. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message.exclude](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L241) | list | `[]` | Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. Exclude list is checked before the Include list. | -| [sources.k8s-all-events.botkube/kubernetes.config.annotations](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L245) | object | `{}` | Filters Kubernetes resources to watch by annotations. Each resource needs to have all the specified annotations. Regex expressions are not supported. | -| [sources.k8s-all-events.botkube/kubernetes.config.labels](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L248) | object | `{}` | Filters Kubernetes resources to watch by labels. Each resource needs to have all the specified labels. Regex expressions are not supported. | -| [sources.k8s-all-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L255) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources to watch. Resources are identified by its type in `{group}/{version}/{kind (plural)}` format. Examples: `apps/v1/deployments`, `v1/pods`. Each resource can override the namespaces and event configuration by using dedicated `event` and `namespaces` field. Also, each resource can specify its own `annotations`, `labels` and `name` regex. | -| [sources.k8s-err-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L369) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-err-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L376) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-err-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L380) | object | `{"types":["error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-err-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L382) | list | `["error"]` | Lists all event types to be watched. | -| [sources.k8s-err-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L387) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L413) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L420) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L424) | object | `{"types":["error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L426) | list | `["error"]` | Lists all event types to be watched. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L431) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.k8s-create-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L444) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-create-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L451) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-create-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L455) | object | `{"types":["create"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-create-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L457) | list | `["create"]` | Lists all event types to be watched. | -| [sources.k8s-create-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L462) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L479) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.extraButtons](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L484) | list | `[{"button":{"commandTpl":"doctor --resource={{ .Kind | lower }}/{{ .Name }} --namespace={{ .Namespace }} --error={{ .Reason }} --bk-cmd-header='AI assistance'","displayName":"Get Help"},"enabled":true,"trigger":{"type":["error"]}}]` | Define extra buttons to be displayed beside notification message. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L495) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L499) | object | `{"types":["error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L501) | list | `["error"]` | Lists all event types to be watched. | -| [sources.k8s-err-events-with-ai-support.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L506) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.prometheus.botkube/prometheus.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L533) | bool | `false` | If true, enables `prometheus` source. | -| [sources.prometheus.botkube/prometheus.config.url](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L536) | string | `"http://localhost:9090"` | Prometheus endpoint without api version and resource. | -| [sources.prometheus.botkube/prometheus.config.ignoreOldAlerts](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L538) | bool | `true` | If set as true, Prometheus source plugin will not send alerts that is created before plugin start time. | -| [sources.prometheus.botkube/prometheus.config.alertStates](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L540) | list | `["firing","pending","inactive"]` | Only the alerts that have state provided in this config will be sent as notification. https://pkg.go.dev/github.com/prometheus/prometheus/rules#AlertState | -| [sources.prometheus.botkube/prometheus.config.log](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L542) | object | `{"level":"info"}` | Logging configuration | -| [sources.prometheus.botkube/prometheus.config.log.level](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L544) | string | `"info"` | Log level | -| [sources.keptn.botkube/keptn.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L550) | bool | `false` | If true, enables `keptn` source. | -| [sources.keptn.botkube/keptn.config.url](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L553) | string | `"http://api-gateway-nginx.keptn.svc.cluster.local/api"` | Keptn API Gateway URL. | -| [sources.keptn.botkube/keptn.config.token](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L555) | string | `""` | Keptn API Token to access events through API Gateway. | -| [sources.keptn.botkube/keptn.config.project](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L557) | string | `""` | Optional Keptn project. | -| [sources.keptn.botkube/keptn.config.service](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L559) | string | `""` | Optional Keptn Service name under the project. | -| [sources.keptn.botkube/keptn.config.log](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L561) | object | `{"level":"info"}` | Logging configuration | -| [sources.keptn.botkube/keptn.config.log.level](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L563) | string | `"info"` | Log level | -| [sources.argocd.botkube/argocd.config](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L578) | object | `{"argoCD":{"notificationsConfigMap":{"name":"argocd-notifications-cm","namespace":"argocd"},"uiBaseUrl":"http://localhost:8080"},"defaultSubscriptions":{"applications":[{"name":"guestbook","namespace":"argocd"}]}}` | Config contains configuration for ArgoCD source plugin. This section lists only basic options, and uses default triggers and templates which are based on ArgoCD Notification Catalog ones (https://github.com/argoproj/argo-cd/blob/master/notifications_catalog/install.yaml). Advanced customization (including triggers and templates) is described in the documentation. | -| [sources.argocd.botkube/argocd.config.defaultSubscriptions.applications](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L581) | list | `[{"name":"guestbook","namespace":"argocd"}]` | Provide application name and namespace to subscribe to all events for a given application. | -| [sources.argocd.botkube/argocd.config.argoCD.uiBaseUrl](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L586) | string | `"http://localhost:8080"` | ArgoCD UI base URL. It is used for generating links in the incoming events. | -| [sources.argocd.botkube/argocd.config.argoCD.notificationsConfigMap](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L588) | object | `{"name":"argocd-notifications-cm","namespace":"argocd"}` | ArgoCD Notifications ConfigMap reference. | -| [executors](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L598) | object | See the `values.yaml` file for full object. | Map of executors. Executor contains configuration for running `kubectl` commands. The property name under `executors` is an alias for a given configuration. You can define multiple executor configurations with different names. Key name is used as a binding reference. | -| [executors.k8s-default-tools.botkube/helm.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L605) | bool | `false` | If true, enables `helm` commands execution. | -| [executors.k8s-default-tools.botkube/helm.config.helmDriver](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L610) | string | `"secret"` | Allowed values are configmap, secret, memory. | -| [executors.k8s-default-tools.botkube/helm.config.helmConfigDir](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L612) | string | `"/tmp/helm/"` | Location for storing Helm configuration. | -| [executors.k8s-default-tools.botkube/helm.config.helmCacheDir](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L614) | string | `"/tmp/helm/.cache"` | Location for storing cached files. Must be under the Helm config directory. | -| [executors.k8s-default-tools.botkube/kubectl.config](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L624) | object | See the `values.yaml` file for full object including optional properties related to interactive builder. | Custom kubectl configuration. | -| [executors.flux.botkube/flux.config.log](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L697) | object | `{"level":"info"}` | Logging configuration | -| [executors.flux.botkube/flux.config.log.level](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L699) | string | `"info"` | Log level | -| [aliases](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L713) | object | See the `values.yaml` file for full object. | Custom aliases for given commands. The aliases are replaced with the underlying command before executing it. Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. | -| [existingCommunicationsSecretName](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L740) | string | `""` | Configures existing Secret with communication settings. It MUST be in the `botkube` Namespace. To reload Botkube once it changes, add label `botkube.io/config-watch: "true"`. | -| [communications](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L747) | object | See the `values.yaml` file for full object. | Map of communication groups. Communication group contains settings for multiple communication platforms. The property name under `communications` object is an alias for a given configuration group. You can define multiple communication groups with different names. | -| [communications.default-group.socketSlack.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L752) | bool | `false` | If true, enables Slack bot. | -| [communications.default-group.socketSlack.channels](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L756) | object | `{"default":{"bindings":{"executors":["k8s-default-tools","bins-management","ai","flux"],"sources":["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]},"name":"SLACK_CHANNEL"}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.socketSlack.channels.default.name](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L759) | string | `"SLACK_CHANNEL"` | Slack channel name without '#' prefix where you have added Botkube and want to receive notifications in. | -| [communications.default-group.socketSlack.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L762) | list | `["k8s-default-tools","bins-management","ai","flux"]` | Executors configuration for a given channel. | -| [communications.default-group.socketSlack.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L768) | list | `["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]` | Notification sources configuration for a given channel. | -| [communications.default-group.socketSlack.botToken](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L775) | string | `""` | Slack bot token for your own Slack app. [Ref doc](https://api.slack.com/authentication/token-types). | -| [communications.default-group.socketSlack.appToken](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L778) | string | `""` | Slack app-level token for your own Slack app. [Ref doc](https://api.slack.com/authentication/token-types). | -| [communications.default-group.mattermost.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L782) | bool | `false` | If true, enables Mattermost bot. | -| [communications.default-group.mattermost.botName](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L784) | string | `"Botkube"` | User in Mattermost which belongs the specified Personal Access token. | -| [communications.default-group.mattermost.url](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L786) | string | `"MATTERMOST_SERVER_URL"` | The URL (including http/https schema) where Mattermost is running. e.g https://example.com:9243 | -| [communications.default-group.mattermost.token](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L788) | string | `"MATTERMOST_TOKEN"` | Personal Access token generated by Botkube user. | -| [communications.default-group.mattermost.team](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L790) | string | `"MATTERMOST_TEAM"` | The Mattermost Team name where Botkube is added. | -| [communications.default-group.mattermost.channels](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L794) | object | `{"default":{"bindings":{"executors":["k8s-default-tools","bins-management","ai","flux"],"sources":["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]},"name":"MATTERMOST_CHANNEL","notification":{"disabled":false}}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.mattermost.channels.default.name](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L798) | string | `"MATTERMOST_CHANNEL"` | The Mattermost channel name for receiving Botkube alerts. The Botkube user needs to be added to it. | -| [communications.default-group.mattermost.channels.default.notification.disabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L801) | bool | `false` | If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. | -| [communications.default-group.mattermost.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L804) | list | `["k8s-default-tools","bins-management","ai","flux"]` | Executors configuration for a given channel. | -| [communications.default-group.mattermost.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L810) | list | `["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]` | Notification sources configuration for a given channel. | -| [communications.default-group.teams.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L819) | bool | `false` | If true, enables MS Teams bot. | -| [communications.default-group.teams.botName](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L821) | string | `"Botkube"` | The Bot name set while registering Bot to MS Teams. | -| [communications.default-group.teams.appID](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L823) | string | `"APPLICATION_ID"` | The Botkube application ID generated while registering Bot to MS Teams. | -| [communications.default-group.teams.appPassword](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L825) | string | `"APPLICATION_PASSWORD"` | The Botkube application password generated while registering Bot to MS Teams. | -| [communications.default-group.teams.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L828) | list | `["k8s-default-tools","bins-management","ai","flux"]` | Executor bindings apply to all MS Teams channels where Botkube has access to. | -| [communications.default-group.teams.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L834) | list | `["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]` | Source bindings apply to all channels which have notification turned on with `@Botkube enable notifications` command. | -| [communications.default-group.teams.messagePath](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L840) | string | `"/bots/teams"` | The path in endpoint URL provided while registering Botkube to MS Teams. | -| [communications.default-group.teams.port](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L842) | int | `3978` | The Service port for bot endpoint on Botkube container. | -| [communications.default-group.discord.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L847) | bool | `false` | If true, enables Discord bot. | -| [communications.default-group.discord.token](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L849) | string | `"DISCORD_TOKEN"` | Botkube Bot Token. | -| [communications.default-group.discord.botID](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L851) | string | `"DISCORD_BOT_ID"` | Botkube Application Client ID. | -| [communications.default-group.discord.channels](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L855) | object | `{"default":{"bindings":{"executors":["k8s-default-tools","bins-management","ai","flux"],"sources":["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]},"id":"DISCORD_CHANNEL_ID","notification":{"disabled":false}}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.discord.channels.default.id](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L859) | string | `"DISCORD_CHANNEL_ID"` | Discord channel ID for receiving Botkube alerts. The Botkube user needs to be added to it. | -| [communications.default-group.discord.channels.default.notification.disabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L862) | bool | `false` | If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. | -| [communications.default-group.discord.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L865) | list | `["k8s-default-tools","bins-management","ai","flux"]` | Executors configuration for a given channel. | -| [communications.default-group.discord.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L871) | list | `["k8s-err-events","k8s-recommendation-events","k8s-err-events-with-ai-support","argocd"]` | Notification sources configuration for a given channel. | -| [communications.default-group.elasticsearch.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L880) | bool | `false` | If true, enables Elasticsearch. | -| [communications.default-group.elasticsearch.awsSigning.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L884) | bool | `false` | If true, enables awsSigning using IAM for Elasticsearch hosted on AWS. Make sure AWS environment variables are set. [Ref doc](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html). | -| [communications.default-group.elasticsearch.awsSigning.awsRegion](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L886) | string | `"us-east-1"` | AWS region where Elasticsearch is deployed. | -| [communications.default-group.elasticsearch.awsSigning.roleArn](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L888) | string | `""` | AWS IAM Role arn to assume for credentials, use this only if you don't want to use the EC2 instance role or not running on AWS instance. | -| [communications.default-group.elasticsearch.server](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L890) | string | `"ELASTICSEARCH_ADDRESS"` | The server URL, e.g https://example.com:9243 | -| [communications.default-group.elasticsearch.username](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L892) | string | `"ELASTICSEARCH_USERNAME"` | Basic Auth username. | -| [communications.default-group.elasticsearch.password](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L894) | string | `"ELASTICSEARCH_PASSWORD"` | Basic Auth password. | -| [communications.default-group.elasticsearch.skipTLSVerify](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L897) | bool | `false` | If true, skips the verification of TLS certificate of the Elastic nodes. It's useful for clusters with self-signed certificates. | -| [communications.default-group.elasticsearch.logLevel](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L904) | string | `""` | Specify the log level for Elasticsearch client. Leave empty to disable logging. | -| [communications.default-group.elasticsearch.indices](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L909) | object | `{"default":{"bindings":{"sources":["k8s-err-events","k8s-recommendation-events"]},"name":"botkube","replicas":0,"shards":1,"type":"botkube-event"}}` | Map of configured indices. The `indices` property name is an alias for a given configuration. | -| [communications.default-group.elasticsearch.indices.default.name](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L912) | string | `"botkube"` | Configures Elasticsearch index settings. | -| [communications.default-group.elasticsearch.indices.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L918) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for a given index. | -| [communications.default-group.webhook.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L925) | bool | `false` | If true, enables Webhook. | -| [communications.default-group.webhook.url](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L927) | string | `"WEBHOOK_URL"` | The Webhook URL, e.g.: https://example.com:80 | -| [communications.default-group.webhook.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L930) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for the webhook. | -| [communications.default-group.slack](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L940) | object | See the `values.yaml` file for full object. | Settings for deprecated Slack integration. **DEPRECATED:** Legacy Slack integration has been deprecated and removed from the Slack App Directory. Use `socketSlack` instead. Read more here: https://docs.botkube.io/installation/slack/ | -| [settings.clusterName](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L958) | string | `"not-configured"` | Cluster name to differentiate incoming messages. | -| [settings.lifecycleServer](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L961) | object | `{"enabled":true,"port":2113}` | Server configuration which exposes functionality related to the app lifecycle. | -| [settings.healthPort](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L964) | int | `2114` | | -| [settings.upgradeNotifier](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L966) | bool | `true` | If true, notifies about new Botkube releases. | -| [settings.log.level](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L970) | string | `"info"` | Sets one of the log levels. Allowed values: `info`, `warn`, `debug`, `error`, `fatal`, `panic`. | -| [settings.log.disableColors](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L972) | bool | `false` | If true, disable ANSI colors in logging. Ignored when `json` formatter is used. | -| [settings.log.formatter](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L974) | string | `"json"` | Configures log format. Allowed values: `text`, `json`. | -| [settings.systemConfigMap](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L977) | object | `{"name":"botkube-system"}` | Botkube's system ConfigMap where internal data is stored. | -| [settings.persistentConfig](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L982) | object | `{"runtime":{"configMap":{"annotations":{},"name":"botkube-runtime-config"},"fileName":"_runtime_state.yaml"},"startup":{"configMap":{"annotations":{},"name":"botkube-startup-config"},"fileName":"_startup_state.yaml"}}` | Persistent config contains ConfigMap where persisted configuration is stored. The persistent configuration is evaluated from both chart upgrade and Botkube commands used in runtime. | -| [ssl.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L997) | bool | `false` | If true, specify cert path in `config.ssl.cert` property or K8s Secret in `config.ssl.existingSecretName`. | -| [ssl.existingSecretName](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1003) | string | `""` | Using existing SSL Secret. It MUST be in `botkube` Namespace. | -| [ssl.cert](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1006) | string | `""` | SSL Certificate file e.g certs/my-cert.crt. | -| [service](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1009) | object | `{"name":"metrics","port":2112,"targetPort":2112}` | Configures Service settings for ServiceMonitor CR. | -| [ingress](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1016) | object | `{"annotations":{"kubernetes.io/ingress.class":"nginx"},"create":false,"host":"HOST","tls":{"enabled":false,"secretName":""}}` | Configures Ingress settings that exposes MS Teams endpoint. [Ref doc](https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource). | -| [serviceMonitor](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1027) | object | `{"enabled":false,"interval":"10s","labels":{},"path":"/metrics","port":"metrics"}` | Configures ServiceMonitor settings. [Ref doc](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitor). | -| [deployment.annotations](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1037) | object | `{}` | Extra annotations to pass to the Botkube Deployment. | -| [deployment.livenessProbe](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1039) | object | `{"failureThreshold":35,"initialDelaySeconds":1,"periodSeconds":2,"successThreshold":1,"timeoutSeconds":1}` | Liveness probe. | -| [deployment.livenessProbe.initialDelaySeconds](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1041) | int | `1` | The liveness probe initial delay seconds. | -| [deployment.livenessProbe.periodSeconds](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1043) | int | `2` | The liveness probe period seconds. | -| [deployment.livenessProbe.timeoutSeconds](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1045) | int | `1` | The liveness probe timeout seconds. | -| [deployment.livenessProbe.failureThreshold](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1047) | int | `35` | The liveness probe failure threshold. | -| [deployment.livenessProbe.successThreshold](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1049) | int | `1` | The liveness probe success threshold. | -| [deployment.readinessProbe](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1052) | object | `{"failureThreshold":35,"initialDelaySeconds":1,"periodSeconds":2,"successThreshold":1,"timeoutSeconds":1}` | Readiness probe. | -| [deployment.readinessProbe.initialDelaySeconds](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1054) | int | `1` | The readiness probe initial delay seconds. | -| [deployment.readinessProbe.periodSeconds](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1056) | int | `2` | The readiness probe period seconds. | -| [deployment.readinessProbe.timeoutSeconds](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1058) | int | `1` | The readiness probe timeout seconds. | -| [deployment.readinessProbe.failureThreshold](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1060) | int | `35` | The readiness probe failure threshold. | -| [deployment.readinessProbe.successThreshold](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1062) | int | `1` | The readiness probe success threshold. | -| [extraAnnotations](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1069) | object | `{}` | Extra annotations to pass to the Botkube Pod. | -| [extraLabels](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1071) | object | `{}` | Extra labels to pass to the Botkube Pod. | -| [priorityClassName](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1073) | string | `""` | Priority class name for the Botkube Pod. | -| [nameOverride](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1076) | string | `""` | Fully override "botkube.name" template. | -| [fullnameOverride](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1078) | string | `""` | Fully override "botkube.fullname" template. | -| [resources](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1084) | object | `{}` | The Botkube Pod resource request and limits. We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. [Ref docs](https://kubernetes.io/docs/user-guide/compute-resources/) | -| [extraEnv](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1096) | list | `[{"name":"LOG_LEVEL_SOURCE_BOTKUBE_KUBERNETES","value":"debug"}]` | Extra environment variables to pass to the Botkube container. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables). | -| [extraVolumes](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1110) | list | `[]` | Extra volumes to pass to the Botkube container. Mount it later with extraVolumeMounts. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/volume/#Volume). | -| [extraVolumeMounts](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1125) | list | `[]` | Extra volume mounts to pass to the Botkube container. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1). | -| [nodeSelector](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1143) | object | `{}` | Node labels for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/user-guide/node-selection/). | -| [tolerations](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1147) | list | `[]` | Tolerations for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/). | -| [affinity](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1151) | object | `{}` | Affinity for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). | -| [serviceAccount.create](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1155) | bool | `true` | If true, a ServiceAccount is automatically created. | -| [serviceAccount.name](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1158) | string | `""` | The name of the service account to use. If not set, a name is generated using the fullname template. | -| [serviceAccount.annotations](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1160) | object | `{}` | Extra annotations for the ServiceAccount. | -| [extraObjects](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1163) | list | `[]` | Extra Kubernetes resources to create. Helm templating is allowed as it is evaluated before creating the resources. | -| [analytics.disable](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1191) | bool | `false` | If true, sending anonymous analytics is disabled. To learn what date we collect, see [Privacy Policy](https://docs.botkube.io/privacy#privacy-policy). | -| [configWatcher](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1195) | object | `{"enabled":true,"inCluster":{"informerResyncPeriod":"10m"}}` | Parameters for the Config Watcher component which reloads Botkube on ConfigMap changes. It restarts Botkube when configuration data change is detected. It watches ConfigMaps and/or Secrets with the `botkube.io/config-watch: "true"` label from the namespace where Botkube is installed. | -| [configWatcher.enabled](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1197) | bool | `true` | If true, restarts the Botkube Pod on config changes. | -| [configWatcher.inCluster](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1199) | object | `{"informerResyncPeriod":"10m"}` | In-cluster Config Watcher configuration. It is used when remote configuration is not provided. | -| [configWatcher.inCluster.informerResyncPeriod](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1201) | string | `"10m"` | Resync period for the Config Watcher informers. | -| [plugins](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1204) | object | `{"cacheDir":"/tmp","healthCheckInterval":"10s","incomingWebhook":{"enabled":true,"port":2115,"targetPort":2115},"repositories":{"botkube":{"url":"https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml"}},"restartPolicy":{"threshold":10,"type":"DeactivatePlugin"}}` | Configuration for Botkube executors and sources plugins. | -| [plugins.cacheDir](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1206) | string | `"/tmp"` | Directory, where downloaded plugins are cached. | -| [plugins.repositories](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1208) | object | `{"botkube":{"url":"https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml"}}` | List of plugins repositories. | -| [plugins.repositories.botkube](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1210) | object | `{"url":"https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml"}` | This repository serves officially supported Botkube plugins. | -| [plugins.incomingWebhook](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1213) | object | `{"enabled":true,"port":2115,"targetPort":2115}` | Configure Incoming webhook for source plugins. | -| [plugins.restartPolicy](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1218) | object | `{"threshold":10,"type":"DeactivatePlugin"}` | Botkube Restart Policy on plugin failure. | -| [plugins.restartPolicy.type](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1220) | string | `"DeactivatePlugin"` | Restart policy type. Allowed values: "RestartAgent", "DeactivatePlugin". | -| [plugins.restartPolicy.threshold](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1222) | int | `10` | Number of restarts before policy takes into effect. | -| [config](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1226) | object | `{"provider":{"apiKey":"","endpoint":"https://api.botkube.io/graphql","identifier":""}}` | Configuration for synchronizing Botkube configuration. | -| [config.provider](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1228) | object | `{"apiKey":"","endpoint":"https://api.botkube.io/graphql","identifier":""}` | Base provider definition. | -| [config.provider.identifier](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1231) | string | `""` | Unique identifier for remote Botkube settings. If set to an empty string, Botkube won't fetch remote configuration. | -| [config.provider.endpoint](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1233) | string | `"https://api.botkube.io/graphql"` | Endpoint to fetch Botkube settings from. | -| [config.provider.apiKey](https://github.com/kubeshop/botkube/blob/release-1.8/helm/botkube/values.yaml#L1235) | string | `""` | Key passed as a `X-API-Key` header to the provider's endpoint. | - -### AWS IRSA on EKS support - -AWS has introduced IAM Role for Service Accounts in order to provide fine-grained access. This is useful if you are looking to run Botkube inside an EKS cluster. For more details visit https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html. - -Annotate the Botkube Service Account as shown in the example below and add the necessary Trust Relationship to the corresponding Botkube role to get this working. - -``` -serviceAccount: - annotations: - eks.amazonaws.com/role-arn: "{role_arn_to_assume}" -``` diff --git a/versioned_docs/version-1.8/configuration/index.mdx b/versioned_docs/version-1.8/configuration/index.mdx deleted file mode 100644 index 5b643c8b..00000000 --- a/versioned_docs/version-1.8/configuration/index.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -id: configuration -title: Configuration -sidebar_position: 3 ---- - -Botkube backend allows you to specify [source](./source), [executor](./executor), [communication](./communication), and [general](./general) Botkube settings. Check the related documents for more detailed explanation. - -The configuration settings are read from two sources: - -- the configuration files specified by the `BOTKUBE_CONFIG_PATHS` environment variable or `--config/-c` flag. For example: - - ```bash - export BOTKUBE_CONFIG_PATHS="global.yaml,team-b-specific.yaml" - # or - ./botkube --config "global.yaml,team-b-specific.yaml" - ``` - - You can split individual settings into multiple configuration files. The priority will be given to the last (right-most) file specified. Files with `_` name prefix are always read as the last ones. See the [merging strategy](#merging-strategy) section for more details. - - :::note - For Helm installation, Botkube uses `_runtime_state.yaml` and `_startup_state.yaml` files to store its internal state. Remember to keep these files in the `BOTKUBE_CONFIG_PATHS` environment variable. - ::: - -- the exported [environment variables](#environment-variables) that overrides the configuration specified in the files. - -## Helm install options - -Advanced Helm install options are documented [here](helm-chart-parameters). - -## Updating the configuration - -To update Botkube configuration, you can either: - -- upgrade Botkube installation with Helm, -- or use dedicated `@Botkube` commands, to e.g. toggle notifications or edit Source Bindings. See the [Usage](../usage/index.md) document for more details. - -If you wish to change the configuration with Helm, create a `/tmp/values.yaml` file that contains the new values and run: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -```shell -botkube install -f /tmp/values.yaml -``` - - - - - -```shell -helm upgrade -n botkube botkube -f /tmp/values.yaml helm/botkube --wait -``` - - - - -As both Helm release upgrade and some of the `@Botkube` commands modify the same configuration, it is merged during command execution. -Whenever you specify a new value in the `/tmp/values.yaml` file, it will override the existing value in the configuration. - -### Preventing overrides by default Helm chart values - -Keep in mind that even if you don't specify custom values in the `/tmp/values.yaml` file, Helm can override the existing values with the default ones. - -Consider the following config: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - botToken: "{botToken}" - appToken: "{appToken}" - channels: - "default": - name: general - notification: - disabled: false # default from the Helm chart - bindings: - sources: - - k8s-all-events # default from the Helm chart -# (...) -``` - -Assume that users ran the following commands: - -``` -@Botkube edit SourceBindings k8s-err-events, k8s-recommendation-events -@Botkube disable notifications -``` - -Which effectively result in the following config that Botkube sees: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - botToken: "{botToken}" - appToken: "{appToken}" - channels: - "default": - name: general - notification: - disabled: true # set by user command - bindings: - sources: - - k8s-err-events # set by user command - - k8s-recommendation-events # set by user command -# (...) -``` - -To persist the configuration that users provided, and not overwrite notification and source bindings values, run Helm upgrade with: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - name: general - notification: null # explicitly not use defaults from Helm chart - bindings: - sources: null # explicitly not use defaults from Helm chart -# (...) other values -``` - -The following properties need such `null` value during upgrade, if you want to keep the previous configuration: - -- `communications.default-group.{communication-platform}.channels.default.notifications`, where `{communication-platform}` is any communication platform supported except Microsoft Teams, -- `communications.default-group.{communication-platform}.channels.default.bindings.sources`, where `{communication-platform}` is any communication platform supported except Microsoft Teams, -- `communications.default-group.teams.bindings.sources`. - -To learn more, read the [Deleting a default key](https://helm.sh/docs/chart_template_guide/values_files/#deleting-a-default-key) paragraph in Helm documentation. - -## Environment variables - -The individual communication settings can be specified via environment variables. They take priority and override the configuration specified in the file. - -To construct the environment variable name, take any property from the configuration file and make it uppercase. Use the underscore for properties that are nested. Use the double underscore for all camelCase properties. Finally, add the `BOTKUBE_` prefix. - -For example, such configuration property from YAML: - -```yaml -settings: - kubectl: - defaultNamespace: "NAMESPACE" -``` - -is mapped to the `BOTKUBE_SETTINGS_KUBECTL_DEFAULT__NAMESPACE` environment variable. - -This is a useful feature that allows you to store the overall configuration in a file, where sensitive data, such as tokens, can be put in environment variables. See the [**Tokens from Vault via CSI driver**](./communication/vault-csi/) tutorial for an example use-case. - -## Merging strategy - -Botkube allows you to split individual settings into multiple configuration files. The following rules apply: - -- The priority will be given to the last (right-most) file specified. -- Files with `_` name prefix are always read as the last ones following the initial order. -- Objects are merged together and primitive fields are overridden. For example: - - ```yaml - # a.yaml - first file - settings: - clusterName: dev-cluster - kubectl: - enabled: false - ``` - - ```yaml - # _a.yaml - second file with `_` prefix - settings: - clusterName: demo-cluster - ``` - - ```yaml - # b.yaml - third file - settings: - kubectl: - enabled: true - ``` - - ```yaml - # result - settings: - clusterName: demo-cluster - kubectl: - enabled: true - ``` - -- The arrays items are not merged, they are overridden. For example: - - ```yaml - # a.yaml - settings: - kubectl: - enabled: true - commands: - verbs: - ["api-resources", "api-versions", "cluster-info", "describe", "diff", "explain", "get", "logs", "top", "auth"] - ``` - - ```yaml - # b.yaml - settings: - kubectl: - commands: - verbs: ["get", "logs", "top", "auth"] - ``` - - ```yaml - # result - settings: - kubectl: - enabled: true - commands: - verbs: ["get", "logs", "top", "auth"] - ``` diff --git a/versioned_docs/version-1.8/configuration/rbac.md b/versioned_docs/version-1.8/configuration/rbac.md deleted file mode 100644 index d5a0e213..00000000 --- a/versioned_docs/version-1.8/configuration/rbac.md +++ /dev/null @@ -1,432 +0,0 @@ ---- -id: rbac -title: RBAC -sidebar_position: 4 ---- - -Botkube allows plugins to access Kubernetes API by defining [RBAC](https://en.wikipedia.org/wiki/Role-based_access_control) rules as part of plugin `context.rbac` configuration. Kubeconfig generation needs to be requested by defining `context.rbac` property. - -Based on this configuration Botkube generates a temporary [kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) with user and/or group impersonation. -This kubeconfig is available to plugins in the `Execute` and `Stream` contexts. - -## Architecture - -Botkube uses its own cluster credentials to generate a temporary kubeconfig, and the kubeconfig uses [user/group impersonation](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation). - -For source plugins, the kubeconfig is generated once - during plugin startup. -For executor plugins, the kubeconfig is generated every time a command is sent to the plugin, which allows greater flexibility, such as including the name of the channel the command was sent from. - -![diagram](assets/botkube-read-only.svg "diagram") - -## Configuration - -For each executor and source plugin, you can define a `context.rbac` configuration. This config is used to generate a dedicated kubeconfig. - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static # Static or ChannelName - static: # applicable only for "Static" user mapping type - value: botkube-internal-static-user - prefix: "" # optional prefix for user name; useful especially for channel name mapping - group: - type: Static # Static or ChannelName - static: # applicable only for "Static" group mapping type - values: - - "my-group1" - - "my-group2" - prefix: "" # optional prefix for all group names; useful especially for channel name mapping -``` - -### Mapping types - -For both user and group, the following mapping types are supported: - -- `Static` - - For user, it uses a single static value. For group, it uses a list of static values. The value is prepended with an optional prefix. - -- `ChannelName` - - Channel name is used as subject for user or group impersonation. The channel name is prepended with an optional prefix. - This mapping is only available for executor plugins. - -### Default configuration - -When a given plugin have `context.rbac` property undefined, Botkube doesn't generate a kubeconfig for this plugin. To request kubeconfig generation, define `context.rbac` property with empty value: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: {} # enable kubeconfig generation -``` - -However, such configuration will generate a kubeconfig with empty impersonation config, which effectively means an anonymous access to the Kubernetes API. - -During Botkube installation, Botkube generates Kubernetes ClusterRole and ClusterRoleBinding resources with read-only access for the default group `botkube-plugins-default`. This group is used by default across the `values.yaml` for all default plugins. - -```yaml -rbac: - # ... - groups: - "botkube-plugins-default": - create: true - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] -``` - -See the [`values.yaml`](https://github.com/kubeshop/botkube/blob/v1.8.0/helm/botkube/values.yaml) for more details. - -#### Defaults for user mapping when group mapping is used - -Kubernetes requires user for group impersonation. That's why when a group mapping is user without `context.rbac.user` mapping defined, Botkube uses `botkube-internal-static-user` user name for impersonation. -For example, when the following configuration is used: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - # no user mapping defined - group: - type: Static - static: - value: botkube-plugins-default -``` - -It is equivalent to: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static - static: - value: botkube-internal-static-user - group: - type: Static - static: - value: botkube-plugins-default -``` - -#### Defaults for Botkube Cloud - -When configuring plugin on Botkube Cloud, the "Default" permissions mean that the `botkube-plugins-default` group will be used, which have read-only access to Kubernetes API and is configured during Botkube installation. See the [Default configuration](#default-configuration) section. - -![Cloud RBAC defaults](./assets/cloud-rbac-default.png) - -## Examples - -This paragraph contains examples of RBAC configuration for different use cases. - -:::tip -You can use `rbac.groups` or `extraObjects` overrides during Botkube installation to create custom RBAC resources. See the [`values.yaml`](https://github.com/kubeshop/botkube/blob/v1.8.0/helm/botkube/values.yaml) for more details. -::: - -### Kubectl executor with read-only Pod access based on static group mapping - -In this example an executor plugin is defined with static RBAC that maps to group `read-pods`. - -1. Consider the following Botkube config: - - ```yaml - # ... - executors: - "kubectl-read-only": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - group: - type: Static - static: - values: [read-pods] - ``` - -Let's assume this plugin is bound to at least one channel. - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: kubectl-read-pods - rules: - - apiGroups: [""] - resources: ["pods"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: kubectl-read-pods - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kubectl-read-pods - subjects: - - kind: Group - name: read-pods # <-- this is the group name used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, when this executor plugin is invoked, Botkube generates a kubeconfig impersonating group `read-pods` and passes it to the plugin. The plugin then can authenticate with the API server with identity of group `read-pods`. In that way, the plugin can use read-only operations on Pods. - -### Kubernetes source plugin with read-only access based on static user mapping - -In this example a single source plugin is defined with static RBAC that maps to user `kubernetes-read-only`. - -1. Consider the following Botkube config: - - ```yaml - sources: - "kubernetes": - botkube/kubernetes@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static - static: - value: kubernetes-read-only - ``` - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: reader - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: reader - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: reader - subjects: - - kind: User - name: kubernetes-read-only # <-- this is the username used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, the source plugin can access all Kubernetes resources with read-only permissions. - -### Kubectl executor plugin with different permissions based on channel name mapping - -In this example **kubectl** executor plugin is configured with channel name mapping and bound to two channels, `ch-1` and `ch-2`. In Kubernetes RBAC resources, group `ch-1` is given write access, while group `ch-2` is given only read access. - -1. Consider the following Botkube config: - - ```yaml - executors: - "kubectl": - botkube/kubectl@v1: - # ... - enabled: true - context: - rbac: - group: - type: ChannelName - communications: - "default-group": - socketSlack: - enabled: true - # ... - channels: - "ch-1": - name: ch-1 - bindings: - executors: - - kubectl - "ch-2": - name: ch-2 - bindings: - executors: - - kubectl - # ... - ``` - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: editor - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list", "update", "create", "delete"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: editor - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: editor - subjects: - - kind: Group - name: ch-1 # <-- channel name used in Botkube config - apiGroup: rbac.authorization.k8s.io - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: read-only - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: read-only - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: read-only - subjects: - - kind: Group - name: ch-2 # <-- channel name used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, users in channel `ch-1` can execute all kubectl commands, while users in channel `ch-2` can only execute read-only commands. - -## Limitations - -This paragraph contains limitations of the current implementation. - -### Shared file system - -Botkube runs plugin processes in the same container within the same Pod. Therefore, all plugins share the same file system. - -If you're a plugin developer and decide to write kubeconfig to the file system, be aware -that it can be accessible by all plugins in the container. - -### RBAC configuration merging - -The same executor plugins with different RBAC configuration cannot be bound to the same channel. This is validated during Botkube startup and will result in an error. - -For example, the following configuration is invalid: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - # ... - channels: - "ch-1": - name: ch-1 - bindings: - executors: - - kubectl - - kubectl-read-only -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: # Different RBAC configuration - group: - type: ChannelName - "kubectl-read-only": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: # Different RBAC configuration - user: - type: Static - static: - value: kubectl-read-only -``` - -### Supported RBAC mappings - -While Executor plugins support multiple mapping types, there are the following limitations: - -- Source plugins support only the `Static` mapping. -- Automated [actions](../usage/automated-actions.md) support only the `Static` mapping. - -## Troubleshooting - -In most cases troubleshooting Botkube RBAC issues means [troubleshooting Kubernetes RBAC](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access), where `kubectl auth` command can help. - -If you see the following error: - -``` -Error: create: failed to create: secrets is forbidden: User "botkube-internal-static-user" cannot create resource "secrets" in API group "" in the namespace "default" -``` - -that means the RBAC rules configured for a given plugin are insufficient in a given context. - -Firstly, ensure what user/group is used for impersonation. To do that, check your configuration against the mapping description from the [Configuration](#configuration) section. - -### Checking available actions for a given user/group - -After obtaining proper user and group, use the following command to list all available actions for a given user and/or group: - -```shell -kubectl auth can-i --as {user} --as-group {group} --list -``` - -For example, to list all available actions for user `botkube-internal-static-user` and group `private-channel` use: - -```shell -kubectl auth can-i --as botkube-internal-static-user --as-group private-channel --list -``` - -### Checking if a given user/group can perform a given action - -To verify if a given user and/or group can perform a given action, use: - -```shell -kubectl auth can-i get pod -n botkube --as {user} --as-group {group} -``` - -For example, to verify if user `botkube-internal-static-user` and group `private-channel` can get Secret in namespace `botkube` use: - -```shell -kubectl auth can-i get secret -n botkube --as botkube-internal-static-user --as-group private-channel -``` - -## Plugin development - -If you are a plugin developer and want to learn how to use generated kubeconfig in the plugin codebase, refer to [Using kubeconfig](../plugin/using-kubeconfig.md) document. diff --git a/versioned_docs/version-1.8/configuration/source/argocd.md b/versioned_docs/version-1.8/configuration/source/argocd.md deleted file mode 100644 index 07e43cb8..00000000 --- a/versioned_docs/version-1.8/configuration/source/argocd.md +++ /dev/null @@ -1,155 +0,0 @@ ---- -id: argocd -title: ArgoCD -sidebar_position: 5 ---- - -ArgoCD source plugin sends events from ArgoCD to configured communication platforms. During startup, the plugin configures ArgoCD webhooks, triggers, templates and subscriptions based on the [ArgoCD Notification Catalog](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/catalog/). -It uses native [ArgoCD notifications](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/triggers/) configuration to send the events to Botkube communication platforms. - -The plugin is hosted in the official Botkube plugin repository. To enable the GitHub plugin, ensure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -``` - -## Prerequisite elevated RBAC permissions - -ArgoCD plugin requires specific RBAC permissions. If you use Botkube self-hosted installation in version 1.4.1 or newer, you can create them during Botkube install/upgrade by specifying `--set="rbac.groups.argocd.create=true"` override. - -However, you can also create them manually: - -```shell -cat > /tmp/argocd-rbac.yaml << ENDOFFILE ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: argocd -rules: - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "update"] - - apiGroups: ["argoproj.io"] - resources: ["applications"] - verbs: ["get", "patch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: argocd -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: argocd -subjects: -- kind: Group - name: argocd - apiGroup: rbac.authorization.k8s.io -ENDOFFILE - -kubectl apply -f /tmp/argocd-rbac.yaml -``` - -Next, use the `argocd` group in the plugin RBAC configuration: - -```yaml -"argocd": - botkube/argocd: - enabled: true - config: - # ... - context: - rbac: - group: - type: Static - static: - values: ["argocd"] -``` - -## Enabling plugin - -:::note -In order to enable the plugin, ArgoCD has to be already installed on the cluster and all watched Applications need to be created. - -Also, remember to create RBAC resources for the plugin. See the [Elevated RBAC permissions required](#prerequisite-elevated-rbac-permissions) section. -::: - -To enable the ArgoCD plugin and watch a single ArgoCD Application named `guestbook` in `argocd` Namespace, add the following flag to the Botkube [`install` command](../../cli/commands/botkube_install.md): - -```sh ---set 'sources.argocd.botkube/argocd.enabled'=true \ ---set='rbac.groups.argocd.create'=true \ # flag available in Botkube 1.4.1+ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[0].name'=guestbook \ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[0].namespace'=argocd -``` - -You can watch multiple ArgoCD Applications by specifying `config.defaultSubscriptions.applications[n]` values, such as: - -```sh ---set 'sources.argocd.botkube/argocd.enabled'=true \ ---set='rbac.groups.argocd.create'=true \ # flag available in Botkube 1.4.1+ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[0].name'=first-app \ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[0].namespace'=first-app-ns \ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[1].name'=second-app \ ---set 'sources.argocd.botkube/argocd.config.defaultSubscriptions.applications[1].namespace'=second-app-ns -``` - -## Syntax - -### Basic configuration - -This section lists all basic configuration options for the ArgoCD source plugin. The ArgoCD notification config is created automatically during plugin startup and uses triggers and templates based on the [ArgoCD Notification Catalog](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/catalog/). - -```yaml -sources: - "argocd": - botkube/argocd: - enabled: true - context: - rbac: - group: - type: Static - static: - values: ["argocd"] - # Config contains configuration for ArgoCD source plugin. - # This section lists only basic options, and uses default triggers and templates - # which are based on ArgoCD Notification Catalog ones (https://github.com/argoproj/argo-cd/blob/master/notifications_catalog/install.yaml). - # Advanced customization (including triggers and templates) is described in the documentation. - config: - defaultSubscriptions: - # -- Provide application name and namespace to subscribe to all events for a given application. - applications: - - name: "guestbook" - namespace: "argocd" - argoCD: - # ArgoCD UI base URL. It is used for generating links in the incoming events. - uiBaseUrl: http://localhost:8080 - # ArgoCD Notifications ConfigMap reference. - notificationsConfigMap: - name: argocd-notifications-cm - namespace: argocd -``` - -### Advanced configuration - -You can customize all triggers, templates, webhook registration and more. For advanced properties, see the [`default-config.yaml`](https://github.com/kubeshop/botkube/blob/main/internal/source/argocd/default-config.yaml) file. - -## Cleanup - -When you disable the plugin, it won't revert all changes made during the plugin startup. To clean up all ArgoCD follow the manual steps: - -- Clean up ArgoCD Notifications ConfigMap. It is usually named `argocd-notifications-cm` in the `argocd` Namespace. - - Remove all properties that contains `b-` or `botkube-` prefixes in the name. - - - Webhook property name follows the syntax `service.webhook.{webhook-name}`. For example, the `service.webhook.b-784e` property was created by Botkube. - - Template property name follows the syntax `template.{template-name}`. For example, the `template.template.botkube-argocd-ch05k-app-health-degraded` property was created by Botkube. - - Trigger property name follows the syntax `trigger.{trigger-name}`. For example, the `trigger.b-372839f86ed61c4c88` property was created by Botkube. - -- Remove all `argocd.argoproj.io/notifications` annotations from ArgoCD Applications which contain `b-` prefix in the trigger and webhook names. - - The annotation key pattern is `notifications.argoproj.io/subscribe.{trigger-name}.{webhook-name}`. For example, the annotation `notifications.argoproj.io/subscribe.b-5cc4c004df01230f72.b-efc0: ""` was created by Botkube and it should be deleted if the plugin is disabled. diff --git a/versioned_docs/version-1.8/configuration/source/github-events.md b/versioned_docs/version-1.8/configuration/source/github-events.md deleted file mode 100644 index 6a12cf6a..00000000 --- a/versioned_docs/version-1.8/configuration/source/github-events.md +++ /dev/null @@ -1,250 +0,0 @@ ---- -id: github-events -title: GitHub Events -sidebar_position: 4 ---- - -The Botkube GitHub Events source sends events for configured GitHub repositories. These events can be sent to communication channels or actions. To learn how to bind sources to communication channels or actions, refer to the [Communication](../communication/index.md) and [Action](../action.md) documents. - -The GitHub Events plugin is hosted in the official Botkube plugin repository. To enable the GitHub plugin, ensure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable the GitHub plugin, add the following flag to the Botkube [`install` command](../../cli/commands/botkube_install.md): - -```sh ---set 'sources.github.botkube/github-events.enabled'=true -``` - -## Syntax - -```yaml -# Map of sources. The `sources` property name is an alias for a given configuration. -# Key name is used as a binding reference. -# -# Format: sources.{alias} -sources: - "github": - botkube/github-events: # Plugin name syntax: /[@]. 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. - # Logger configuration settings. - log: - level: info - format: json - - # GitHub client configuration settings. - github: - # Auth allows you to set either PAT or APP credentials. - # If none provided then watch functionality could not work properly, e.g. you can reach the API calls quota or if you are setting GitHub Enterprise base URL then an unauthorized error can occur. - auth: - # The GitHub access token. - # Instruction for creating a token can be found here: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token. - accessToken: your-github-token - # AppConfig represents the GitHub App configuration. - # This replaces the AccessToken. - app: - # GitHub App ID for authentication. - id: "" - - # GitHub App Installation ID. - installationId: "" - - # GitHub App private key in PEM format. - privateKey: "" - # The GitHub base URL for API requests. Defaults to the public GitHub API, but can be set to a domain endpoint to use with GitHub Enterprise. - # Default: https://api.github.com/ - baseUrl: "" - - # The GitHub upload URL for uploading files. It is taken into account only when the BaseURL is also set. If only the BaseURL is provided then this parameter defaults to the BaseURL value. - # Default: https://uploads.github.com/ - uploadUrl: "" - - # refreshDuration defines how often we should call GitHub REST API to check repository events. - # It's the same for all configured repositories. For example, if you configure 5s refresh time, and you have 3 repositories registered, - # we will execute maximum 2160 calls which easily fits into PAT rate limits. - # You can create multiple plugins configuration with dedicated tokens to have the rate limits increased. - # - # NOTE: - # - we use conditional requests (https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#conditional-requests), so if there are no events the call doesn't count against your rate limits.\ - # - if you configure file pattern matcher for merged pull request events we execute one more additional call to check which files were changed in the context of a given pull request - # - # Rate limiting: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting - refreshDuration: 10s - - repositories: - - name: owner/repo1 - on: - pullRequests: - - types: [open, merged] # Allowed pull request types (open, closed, merged). - paths: - # Included file patterns for pull request changes. - include: ["kustomize/.*"] - # Excluded file patterns for pull request changes. - # exclude: [ '.*\.js' ] - labels: - # Included labels for pull requests. - include: ["bug"] - # Excluded labels for pull requests. - # exclude: [ 'enhancement' ] - notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " - - - name: owner/repo2 - on: - # EventsAPI watches for /events API containing events triggered by activity on GitHub. - # This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. - # source: https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events - events: - # WatchEvent for now emitted only when someone stars a repository. - # https://docs.github.com/en/webhooks-and-events/events/github-event-types#watchevent - - type: "WatchEvent" - - # IssuesEvent with json path filter - - type: "IssuesEvent" - # The JSONPath expression to filter events - jsonPath: ".action" - # The value to match in the JSONPath result - value: "opened" - notificationTemplate: - previewTpl: |- - Issue Opened - - #{{ .Issue.Number }} {{ .Issue.Title }} - State: {{ .Issue.State }} - extraButtons: - - displayName: Open - url: "{{ .Issue.HTMLURL }}" - style: primary -``` - -## Authorization - -You can use either a [personal access token](#github-personal-access-token) or a [GitHub App](#github-app) for authentication. -By using GitHub Apps, you can increase your maximum rate limits because multiple GitHub Apps are independent and do not share the rate limits. However, using multiple Personal Access Tokens (PATs) for the same account will result in sharing the same rate limit. - -### GitHub personal access token - -Follow the instructions [here](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token) to create a token. The required scope differs for public and private repositories. - -### GitHub App - -To use a GitHub App: - -1. [Create a GitHub App](https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app). No callback or webhook URL is needed. -2. Add read-only permission to the "Members" item of organization permissions. -3. [Install the app in your organization](https://docs.github.com/en/developers/apps/managing-github-apps/installing-github-apps). -4. Done! Use the following details for authentication: - - | Name | Description | - | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | GitHub App Private Key | PEM-format key generated when the app is installed. If you lost it, you can regenerate it ([docs](https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key)). | - | GitHub App ID | Found in the app's "About" page (Organization settings -> Developer settings -> Edit button on your app). | - | GitHub App Installation ID | Found in the URL your organization's app install page (Organization settings -> Github Apps -> Configure button on your app). It's the last number in the URL, ex: `https://github.com/organizations/{my-org}/settings/installations/1234567890`. | - -## Subscriptions - -The GitHub Events source plugin uses polling instead of Webhook endpoint for retrieving GitHub events. It calls two types of GitHub REST API endpoints with a configured refresh time window: - -- [`/repos/{owner}/{repo}/events`](https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events) for `on.events` configuration -- [`/repos/{owner}/{repo}/pulls`](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests) for `on.pullRequests` configuration - -By default, we use [conditional requests](https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#conditional-requests) to prevent excessive API calls. As a result, from `on.pullRequests` triggers may have up to a 60-second delay due to caching. - -### Pull requests - -For a configured `refreshDuration` we call the [`/repos/{owner}/{repo}/pulls`](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests) endpoint for all registered repositories. It's configured to fetch 100 pull requests that were recently modified. We ignore all events that were already processed. - -#### Matching criteria - -If no matching criteria are specified, all pull requests will be reported. For example: - -```yaml -repositories: - - name: owner/repo1 - on: - pullRequests: [] -``` - -To narrow down emitted events, you can specify at least one of the available criteria: - -- `types`: This is a list of pull request types for which the event should be triggered. The allowed types are: `open`, `closed`, `merged`. - -- `paths.include`: This is a list of file patterns for which the event should be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `["kustomize/.*"]`. - -- `paths.exclude`: This is a list of file patterns for which the event should not be triggered. It also supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `['.*\.js']`. This exclusion criteria takes precedence over `paths.include`. - -- `labels.include`: This is a list of label patterns for which the event should be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `["backend-.*"]`. - -- `labels.exclude`: This is a list of label patterns for which the event should not be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `['bug']`. This exclusion criteria takes precedence over `labels.include`. - -#### Templating - -You can customize the notification template with additional buttons: - -```yaml -notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " -``` - -For the `commandTpl` you can use all fields that are available on [`pullRequest`](https://github.com/google/go-github/blob/899235e0a9d750d6fecf9048a676046d50f9d4a3/github/pulls.go#L29-L85) type. - -### Events - -For a configured `refreshDuration` we call the [`/repos/{owner}/{repo}/events`](https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events) endpoint for all registered repositories. - -:::note -This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. -::: - -The Events API covers various event types. Refer to the [GitHub event types](https://docs.github.com/en/webhooks-and-events/events/github-event-types) page for more information. - -#### Matching criteria - -To retrieve relevant events, you must define at least one entry within the `events` property. For instance: - -```yaml -events: - - type: "WatchEvent" -``` - -If you provide an empty list `events: []`, no events will be emitted. For more precise filtering of events, you can optionally use JSONPath along with the event type to filter based on specific criteria within the event payload. - -#### Templating - -The available fields for templating differ based on the event type. Refer to the [google/go-github](https://github.com/google/go-github/tree/899235e0a9d750d6fecf9048a676046d50f9d4a3/github) repository for dedicated event types. - -For instance, you can add an "Open" button to an `IssuesEvent` template: - -```yaml -events: - # IssuesEvent with json path filter - - type: "IssuesEvent" - # The JSONPath expression to filter events - jsonPath: ".action" - # The regex value to match in the JSONPath result - value: "opened" - notificationTemplate: - previewTpl: |- - Issue Opened - - #{{ .Issue.Number }} {{ .Issue.Title }} - State: {{ .Issue.State }} - extraButtons: - - displayName: Open - url: "{{ .Issue.HTMLURL }}" - style: primary -``` - -Here, the `jsonPath` field specifies the JSONPath expression to filter events, and the value field defines the regex value to match within the JSONPath result. This combination helps narrow down reported events based on specific conditions within the event payload. diff --git a/versioned_docs/version-1.8/configuration/source/index.md b/versioned_docs/version-1.8/configuration/source/index.md deleted file mode 100644 index 74094126..00000000 --- a/versioned_docs/version-1.8/configuration/source/index.md +++ /dev/null @@ -1,133 +0,0 @@ ---- -id: source -title: Source -sidebar_position: 1 ---- - -The source configuration allows you to define multiple source configurations that can be later referred in [communication](../communication) bindings. For example, take a look at such source definition: - -```yaml -sources: - "k8s-recommendation-alerts": # This is a source configuration name, which is referred in communication bindings. - botkube/kubernetes: - # ... trimmed ... - - "prometheus-firing-alerts": # This is a source configuration name, which is referred in communication bindings. - botkube/prometheus: - # ... trimmed ... -``` - -This can be later used by the communication platforms: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - bindings: - sources: # The order is important for merging strategy. - - k8s-recommendation-events # The source configuration name - - prometheus-firing-events # The source configuration name - # ... trimmed ... -``` - -To use the Botkube source plugins, first you need to define the plugins repository under the `plugins` property: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Next, you can configure source from a given repository: - -```yaml -sources: - "plugins": - repo-name/source-name@v1.0.0: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} -``` - -For all source configuration properties, see the [**syntax**](#syntax) section. - -#### Restart Policy and Health Check Interval - -This section of the configuration allows you to configure the restart policy for the Botkube source plugins. The restart policy is used when the source 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 source plugins. The default health check interval is 10 seconds. The health check interval can be configured with the following property: - -- `healthCheckInterval` - health check interval. - -```yaml -# -- 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 - -```yaml -# Map of sources. The `sources` property name is an alias for a given configuration. -# Key name is used as a binding reference. -# -# Format: sources.{alias} -sources: - "prom": - botkube/prometheus@v1.8.0: # Plugin name syntax: /[@]. 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. - url: "http://localhost:9090" - - "k8s-recommendation-events": - # Built-in kubernetes source configuration. - botkube/kubernetes: - enabled: true - config: - # Kubernetes configuration - recommendations: - pod: - noLatestImageTag: true - # ... trimmed ... - -# 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.8.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](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.8/configuration/source/keptn.md b/versioned_docs/version-1.8/configuration/source/keptn.md deleted file mode 100644 index 0a8467e0..00000000 --- a/versioned_docs/version-1.8/configuration/source/keptn.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: keptn -title: Keptn -sidebar_position: 4 ---- - -The Botkube Keptn source plugin allows you to consume events from Keptn deployment and notify in configured platforms. - -The Keptn plugin is hosted by the official Botkube plugin repository. To enable the Keptn plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable Keptn plugin, add `--set 'sources.keptn.botkube/keptn.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). - -## Syntax - -```yaml -# Map of sources. The `sources` property name is an alias for a given configuration. -# Key name is used as a binding reference. -# -# Format: sources.{alias} -sources: - "keptn": - botkube/keptn: # Plugin name syntax: /[@]. 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. - project: "" # Keptn project name - url: "http://api-gateway-nginx.keptn" # Keptn API Gateway to fetch events. - token: "" # Keptn API Token to authenticate API Gateway to fetch events. -``` diff --git a/versioned_docs/version-1.8/configuration/source/kubernetes.md b/versioned_docs/version-1.8/configuration/source/kubernetes.md deleted file mode 100644 index 1fab7458..00000000 --- a/versioned_docs/version-1.8/configuration/source/kubernetes.md +++ /dev/null @@ -1,579 +0,0 @@ ---- -id: kubernetes -title: Kubernetes -sidebar_position: 2 ---- - -A `kubernetes` source plugin produces events for configured Kubernetes resources. These events can be sent to communication channels or actions. To learn how to bind sources to communication channels or actions, read the Communication and Action documents. - -## Enabling source - -To enable Kubernetes source, add `--set 'sources.{configuration-name}.botkube/kubernetes.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). - -## Event and resource constraints - -Define constraints for Kubernetes events to narrow down the events you want to receive. - -You can define both global constraints, that are applied to all resources within a given source, and also resource-specific constraints, which override global constraints. See the [Syntax](#syntax) paragraph for more details. - -There are multiple types of constraints. Each constraint type is described in the following sections. - -### Namespaces - -Include and/or exclude namespaces to watch. You can use exact values or regex expressions to specify namespaces. - -Exclude takes precedence over include. If a given namespace is excluded, it will be ignored, even if it included. - -**Examples** - -To watch all namespaces except those with `testing-` prefix, use the following constraint: - -```yaml -namespaces: - include: - - ".*" # include all... - exclude: - - "testing-.*" # ...except any namespace that has `testing-` prefix -``` - -To watch only `dev` and `prod` namespaces, use the following constraint: - -```yaml -namespaces: - include: - - "dev" - - "prod" - exclude: [] -``` - -### Labels - -Specify exact match for resource labels. The watched resources must have all the specified labels. - -**Example** - -```yaml -labels: # Match only the resources that have all the specified labels - app: "my-app" - environment: "production" -``` - -### Annotations - -Specify exact match for resource annotations. The watched resources must have all the specified annotations. - -**Example** - -```yaml -annotations: # Match only the resources that have all the specified annotations. - app: "my-app" - my-annotation: "true" -``` - -### Resource name - -Filter events based on the resource name. If not defined, all resource names are matched. -Exclude takes precedence over include. If a given resource name is excluded, it will be ignored, even if it included. - -You can use both exact values and regex expressions to specify resource names. This constraint can be set per resource only. See the [Syntax](#syntax) paragraph for more details. - -**Examples** - -To match resource names that have `testing-` prefix, use the following constraint: - -```yaml -name: - include: - - "testing-.*" # include only resource names that have `testing-` prefix - exclude: [] -``` - -To match all resources except those that have `testing-` prefix, use the following constraint: - -```yaml -name: - include: - - ".*" # include all resource names... - exclude: - - "testing-.*" # ...except those that have `testing-` prefix -``` - -### Event types - -List the event types to watch. - -Possible values: - -- `create`, -- `update`, -- `delete`, -- `error`, -- `all`, which is equal to all of the above. - -**Example** - -```yaml -event: - types: # watch for create, delete and error events - - create - - delete - - error -``` - -### Event reason - -Define exact values or regex expression to match the event reason. If not defined, all events are watched. -Exclude takes precedence over include. If a given event reason is excluded, it will be ignored, even if it included. - -**Examples** - -To match events with reason equal to `BackOff`, use the following constraint: - -```yaml -event: - reason: - include: - - "^BackOff$" # match events with reason equal to `BackOff` - exclude: [] -``` - -To match all events except those with reason equal to `BackOff`, use the following constraint: - -```yaml -event: - reason: - include: - - ".*" # match all event reasons... - exclude: - - "^BackOff$" # ...except those equal to `BackOff` -``` - -### Event message - -Define regex expression to match the event message. If not defined, all event messages are matched. - -Exclude takes precedence over include. If a given event message is excluded, it will be ignored, even if it included. - -**Example** - -To match events with message starting with `Back-off`, use the following constraint: - -```yaml -event: - message: - include: - - "^Back-off.*" # match all events with message starting with `Back-off` - exclude: [] -``` - -To match all events except those with message starting with `Back-off`, use the following constraint: - -```yaml -event: - message: - include: - - ".*" # match all event messages... - exclude: - - "^Back-off.*" # ...except those starting with `Back-off` -``` - -### Recommendations - -You can configure recommendations related to Kubernetes resources. Recommendations respect [namespaces](#namespaces) constraint regex patterns. - -Currently, Kubernetes source plugin can send recommendation about 2 resources: `Pods` and `Ingresses`. - -**Example** - -In order to send recommendation for the Pods that have containers with `latest` tag or the Pods without labels, use the following configuration. - -```yaml -recommendations: - # Recommendations for Pod Kubernetes resource. - pod: - # If true, notifies about Pod containers that use `latest` tag for images. - noLatestImageTag: true - # If true, notifies about Pod resources created without labels. - labelsSet: true -``` - -If you want to receive recommendations for Ingress that contains invalid backend service definition or TLS secret, use the following configuration. - -```yaml -recommendations: - # Recommendations for Ingress Kubernetes resource. - ingress: - # If true, notifies about Ingress resources with invalid backend service reference. - backendServiceValid: true - # If true, notifies about Ingress resources with invalid TLS secret reference. - tlsSecretValid: true -``` - -### Filters - -The filter configuration allows you to configure filters which are used for all processed Kubernetes events. - -```yaml -# Filter settings for various sources. -# Currently, all filters are globally enabled or disabled. -# You can enable or disable filters with `@Botkube filters` commands. -filters: - kubernetes: - # If true, enables support for `botkube.io/disable` resource annotations. - objectAnnotationChecker: true - # If true, filters out Node-related events that are not important. - nodeEventsChecker: true -``` - -## Syntax - -```yaml -# Map of sources. Source contains configuration for Kubernetes events and sending recommendations. -# The property name under `sources` object is an alias for a given configuration. You can define multiple sources configuration with different names. -# Key name is used as a binding reference. -# See the `values.yaml` file for full object. -# -## Format: sources.{alias} -sources: - "k8s-recommendation-events": - displayName: "Kubernetes Recommendations" - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes configuration for various recommendation insights. - recommendations: - # Recommendations for Pod Kubernetes resource. - pod: - # If true, notifies about Pod containers that use `latest` tag for images. - noLatestImageTag: true - # If true, notifies about Pod resources created without labels. - labelsSet: true - # Recommendations for Ingress Kubernetes resource. - ingress: - # If true, notifies about Ingress resources with invalid backend service reference. - backendServiceValid: true - # If true, notifies about Ingress resources with invalid TLS secret reference. - tlsSecretValid: true - - "k8s-all-events": - displayName: "Kubernetes Info" - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # -- Logging configuration - log: - # -- Log level - level: info - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: &k8s-events-namespaces - # Include contains a list of allowed Namespaces. - # It can also contain regex expressions: - # `- ".*"` - to specify all Namespaces. - include: - - ".*" - # Exclude contains a list of Namespaces to be ignored even if allowed by Include. - # It can also contain regex expressions: - # `- "test-.*"` - to specif all Namespaces with `test-` prefix. - # Exclude list is checked before the Include list. - # exclude: [] - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - create - - delete - - error - # Optional list of exact values or regex patterns to filter events by event reason. - # Skipped, if both include/exclude lists are empty. - reason: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - # Optional list of exact values or regex patterns to filter event by event message. Skipped, if both include/exclude lists are empty. - # If a given event has multiple messages, it is considered a match if any of the messages match the constraints. - message: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - - # Filters Kubernetes resources to watch by annotations. Each resource needs to have all the specified annotations. - # Regex expressions are not supported. - annotations: {} - # Filters Kubernetes resources to watch by labels. Each resource needs to have all the specified labels. - # Regex expressions are not supported. - labels: {} - - # Describes the Kubernetes resources to watch. - # Resources are identified by its type in `{group}/{version}/{kind (plural)}` format. Examples: `apps/v1/deployments`, `v1/pods`. - # Each resource can override the namespaces and event configuration by using dedicated `event` and `namespaces` field. - # Also, each resource can specify its own `annotations`, `labels` and `name` regex. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - # namespaces: # Overrides 'source'.kubernetes.namespaces - # include: - # - ".*" - # exclude: [] - # annotations: {} # Overrides 'source'.kubernetes.annotations - # labels: {} # Overrides 'source'.kubernetes.labels - # # Optional resource name constraints. - # name: - # # Include contains a list of allowed values. It can also contain regex expressions. - # include: [] - # # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # # Exclude list is checked before the Include list. - # exclude: [] - # event: - # # Overrides 'source'.kubernetes.event.reason - # reason: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.message - # message: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.types - # types: - # - create - - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/persistentvolumes - - type: v1/persistentvolumeclaims - - type: v1/configmaps - - type: rbac.authorization.k8s.io/v1/roles - - type: rbac.authorization.k8s.io/v1/rolebindings - - type: rbac.authorization.k8s.io/v1/clusterrolebindings - - type: rbac.authorization.k8s.io/v1/clusterroles - - type: apps/v1/daemonsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.numberReady - - type: batch/v1/jobs - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.conditions[*].type - - type: apps/v1/deployments - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.availableReplicas - - type: apps/v1/statefulsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.readyReplicas - ## Custom resource example - # - type: velero.io/v1/backups - # namespaces: - # include: - # - ".*" - # exclude: - # - - # event: - # types: - # - create - # - update - # - delete - # - error - # updateSetting: - # includeDiff: true - # fields: - # - status.phase - # List of available commands that can be used in actionable items under kubernetes events. - commands: - # -- Configures which verbs are available in actionable items. - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - # -- Configure which resources are available in actionable items. - resources: - [ - "deployments", - "pods", - "namespaces", - "daemonsets", - "statefulsets", - "storageclasses", - "nodes", - "configmaps", - "services", - "ingresses", - ] - # -- Filter settings for various sources. - # Currently, all filters are globally enabled or disabled. - # You can enable or disable filters with `@Botkube enable/disable filters` commands. - # @default -- See the `values.yaml` file for full object. - filters: - kubernetes: - # -- If true, enables support for `botkube.io/disable` resource annotations. - objectAnnotationChecker: true - # -- If true, filters out Node-related events that are not important. - nodeEventsChecker: true - - "k8s-err-events": - displayName: "Kubernetes Errors" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - error - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/persistentvolumes - - type: v1/persistentvolumeclaims - - type: v1/configmaps - - type: rbac.authorization.k8s.io/v1/roles - - type: rbac.authorization.k8s.io/v1/rolebindings - - type: rbac.authorization.k8s.io/v1/clusterrolebindings - - type: rbac.authorization.k8s.io/v1/clusterroles - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs - - "k8s-err-with-logs-events": - displayName: "Kubernetes Errors for resources with logs" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - error - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs - # `apps/v1/replicasets` excluded on purpose - to not show logs twice for a given higher-level resource (e.g. Deployment) - - "k8s-create-events": - displayName: "Kubernetes Resource Created Events" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - create - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/configmaps - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs - - "prometheus": - ## Prometheus source configuration - ## Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - botkube/prometheus: - # If true, enables `prometheus` source. - enabled: false - config: - # Prometheus endpoint without api version and resource. - url: "http://localhost:9090" - # If set as true, Prometheus source plugin will not send alerts that is created before plugin start time. - ignoreOldAlerts: true - # Only the alerts that have state provided in this config will be sent as notification. https://pkg.go.dev/github.com/prometheus/prometheus/rules#AlertState - alertStates: ["firing", "pending", "inactive"] - # Logging configuration - log: - # Log level - level: info -``` - -The default configuration for Helm chart can be found in [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml). diff --git a/versioned_docs/version-1.8/configuration/source/prometheus.md b/versioned_docs/version-1.8/configuration/source/prometheus.md deleted file mode 100644 index 36401a1f..00000000 --- a/versioned_docs/version-1.8/configuration/source/prometheus.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -id: prometheus -title: Prometheus -sidebar_position: 3 ---- - -The Botkube Prometheus source plugin allows you to fetch alerts from AlertManager of Prometheus deployment and notify in configured platforms. - -The Prometheus plugin is hosted by the official Botkube plugin repository. To enable the Prometheus plugin, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -``` - -## Enabling plugin - -To enable Prometheus plugin, add `--set 'sources.prometheus.botkube/prometheus.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). - -## Syntax - -```yaml -# Map of sources. The `sources` property name is an alias for a given configuration. -# Key name is used as a binding reference. -# -# Format: sources.{alias} -sources: - "prom": - botkube/prometheus: # Plugin name syntax: /[@]. 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. - url: "http://localhost:9090" # Prometheus host to fetch alerts via Prometheus HTTP API - alertStates: ["firing", "pending", "inactive"] # Provided alert states will overwrite default values. For example, Prometheus plugin will notify for only `firing` alerts if `alertStates` is `["firing"]`. - ignoreOldAlerts: true # If set to true, only the alerts that active since Botkube deployment start time. Otherwise, plugin will fetch all the alerts available in AlertManager on Botkube start. -``` - -## Merging strategy - -For all collected `prometheus` sources bindings, configuration properties are overridden based on the order of the binding list. The priority is given to the last binding specified on the list. Empty properties are omitted. - -### Example - -Consider such configuration: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - name: "random" - bindings: - sources: - - prometheus-one - - prometheus-two - - prometheus-three - -sources: - "prometheus-one": - botkube/prometheus: - enabled: true - config: - url: "http://localhost:9090" - ignoreOldAlerts: false - alertStates: ["firing"] - "prometheus-two": - botkube/prometheus: - enabled: true - config: - ignoreOldAlerts: true - "prometheus-three": - botkube/prometheus: - enabled: false - config: - url: "http://localhost:9091" - ignoreOldAlerts: true - alertStates: ["inactive"] -``` - -We can see that: - -- The `ignoreOldAlerts` is set to `true` as it's overridden by the `prometheus-two` binding - the **last one** which is both enabled and sets the `ignoreOldAlerts` property. -- The `url` and `alertStates` are set to values specified by the `prometheus-one` configuration as the `prometheus-two` don't specify them. -- The `prometheus-three` binding is disabled (`botkube/prometheus.enabled` is set to `false`), so it's not taken into account. diff --git a/versioned_docs/version-1.8/examples-and-tutorials/_category_.json b/versioned_docs/version-1.8/examples-and-tutorials/_category_.json deleted file mode 100644 index fba891b9..00000000 --- a/versioned_docs/version-1.8/examples-and-tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials and examples", - "position": 2 -} diff --git a/versioned_docs/version-1.8/examples-and-tutorials/getstarted/assets/create-new-instance.png b/versioned_docs/version-1.8/examples-and-tutorials/getstarted/assets/create-new-instance.png deleted file mode 100644 index 28217273..00000000 Binary files a/versioned_docs/version-1.8/examples-and-tutorials/getstarted/assets/create-new-instance.png and /dev/null differ diff --git a/versioned_docs/version-1.8/examples-and-tutorials/getstarted/assets/install-agent.png b/versioned_docs/version-1.8/examples-and-tutorials/getstarted/assets/install-agent.png deleted file mode 100644 index 3886713b..00000000 Binary files a/versioned_docs/version-1.8/examples-and-tutorials/getstarted/assets/install-agent.png and /dev/null differ diff --git a/versioned_docs/version-1.8/examples-and-tutorials/getstarted/index.md b/versioned_docs/version-1.8/examples-and-tutorials/getstarted/index.md deleted file mode 100644 index 26a7dbed..00000000 --- a/versioned_docs/version-1.8/examples-and-tutorials/getstarted/index.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: get started -title: Get Started -sidebar_position: 1 ---- - -# Get Started with Botkube in Minutes - -Welcome to Botkube! This guide will walk you through the process of setting up Botkube to send notifications and execute commands in your Kubernetes clusters directly from Slack and Microsoft Teams. - -[![Watch our video tutorial for a step-by-step walkthrough](http://img.youtube.com/vi/AGKJsNro4jE/0.jpg)](https://www.youtube.com/watch?v=AGKJsNro4jE&t=59s "Watch our video tutorial for a step-by-step walkthrough") - -## Overview - -Botkube is a Kubernetes Monitoring and Tool designed to optimize your K8s workflow by providing real-time alerts from and commands within your Kubernetes environment. With Botkube, you can receive alerts, execute commands, and stay informed about your cluster's health and status, all from your preferred communication platform. - -## Step 1: Sign up for Botkube - -Visit [botkube.io](http://botkube.io) and create an account. This account will enable you to access the Botkube Cloud Dashboard and manage your Botkube instances. - -## Step 2: Connect Your Kubernetes Cluster - -1. **Create a New Instance:** Log in to the Botkube Cloud Dashboard and select "create a new instance". - - ![Create New Instance](assets/create-new-instance.png) - -2. **Install Botkube Agent:** Follow the instructions provided on the dashboard to install the Botkube Agent on your Kubernetes cluster. You can choose either Helm or a CLI command for installation. - - ![Install Botkube Agent](assets/install-agent.png) - -## Step 3: Connect to Your Preferred Communication Platform - -Follow the instructions provided on the Botkube Cloud Dashboard to connect Botkube to your preferred communication platform, such as [Slack ](https://docs.botkube.io/installation/slack/cloud-slack)or [Microsoft Teams](https://docs.botkube.io/installation/teams/). - -## Step 4: Setting Up a Botkube Cloud Instance - -Once your Botkube instance is connected to your communication platform, you will start receiving alerts and notifications from your Kubernetes cluster. - -### Finalizing Your Botkube Cloud Instance - -1. **Select Channels:** From the dashboard, choose the channels you wish to use with Botkube. -2. **Configure Plugins:** Connect your preferred plugins to enhance Botkube's functionality. -3. **Set Preferences:** Review and select your preferred Botkube defaults. -4. **Apply Changes:** Finalize your setup by selecting "Apply changes." - -## Step 5: Start Receiving Alerts - -Congratulations! You're now ready to start using Botkube to streamline your Kubernetes workflow and stay informed about your cluster's status. If you encounter any issues or need further assistance, feel free to reach out to our community on [Slack](https://join.botkube.io/) or [schedule a call with one of our team](https://calendly.com/d/274-ytm-6mk/chat-with-the-botkube-team-30-minutes). Happy Monitoring! diff --git a/versioned_docs/version-1.8/examples-and-tutorials/index.mdx b/versioned_docs/version-1.8/examples-and-tutorials/index.mdx deleted file mode 100644 index 589a111f..00000000 --- a/versioned_docs/version-1.8/examples-and-tutorials/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -id: overview -title: Overview -sidebar_position: 1 ---- - -import { CardTutorial } from "@site/src/components/Card/Tutorial"; - -# Welcome to Botkube Examples & Tutorials - -
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
diff --git a/versioned_docs/version-1.8/examples-and-tutorials/integrations/index.md b/versioned_docs/version-1.8/examples-and-tutorials/integrations/index.md deleted file mode 100644 index 0228021b..00000000 --- a/versioned_docs/version-1.8/examples-and-tutorials/integrations/index.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -id: integrations -title: Integrations -sidebar_position: 4 ---- - -# 🛠 Integrations - -## Communication Platforms - -- [Microsoft Teams](https://botkube.io/integration/teams): Seamlessly manage Kubernetes and collaborate within your team using Botkube's integration with Microsoft Teams -- [Slack](https://botkube.io/integration/slack): Enhance your Kubernetes management by receiving notifications and interacting with clusters directly from Slack channels through Botkube. -- [Discord](https://botkube.io/integration/discord): Stay on top of Kubernetes events and streamline your operations by integrating Botkube with Discord. -- [Mattermost](https://botkube.io/integration/mattermost): Keep your team informed about Kubernetes events and receive alerts directly within your Mattermost instance with Botkube integration. - -## Source Plugins - -- [Kubernetes Events](https://botkube.io/learn/how-botkube-makes-monitoring-kubernetes-easy): Effortlessly monitor Kubernetes events using Botkube's built-in source plugin. -- [ArgoCD](https://botkube.io/integration/argo-cd-botkube-kubernetes-integration): Streamline your GitOps workflows and receive notifications by using Botkube's ArgoCD plugin. -- [Prometheus](https://botkube.io/integration/prometheus): Optimize your Kubernetes Monitoring process by connecting your Prometheus metrics with Botkube. -- [Keptn](https://botkube.io/integration/keptn): Automate testing, deployment, and operations in your Kubernetes environments by using Botkube's Keptn plugin. - -## Executor Plugins - -- [Kubectl](https://docs.botkube.io/usage/executor/kubectl): Easily execute Kubernetes commands in your channels with Botkube's Kubectl integration. -- [Open AI](https://botkube.io/integration/chatgpt-botkube-kubernetes-integration): Harness the power of Open AI with Botkube's Doctor plugin for intelligent interactions and enhanced automation in your Kubernetes environment. -- [Helm](https://botkube.io/integration/helm): Manage Helm deployments and releases seamlessly with Botkube's Helm plugin. -- [Flux](https://botkube.io/integration/botkube-flux-kubernetes-integration): Use Botkube for GitOps operations with the Flux plugin. -- [Exec](https://botkube.io/integration/custom-executor-plugin): Connecting your own plugin for a tailored Kubernetes workflow with Botkube's exec plugin. diff --git a/versioned_docs/version-1.8/examples-and-tutorials/tutorials/index.md b/versioned_docs/version-1.8/examples-and-tutorials/tutorials/index.md deleted file mode 100644 index 725791b7..00000000 --- a/versioned_docs/version-1.8/examples-and-tutorials/tutorials/index.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: tutorials -title: Tutorials -sidebar_position: 2 ---- - -# 🧑‍💻Tutorials - -## Best Practices - -- [Multi-cluster Kubernetes Observability](https://botkube.io/blog/empowering-your-kubernetes-multi-cluster-observability-with-intelligent-monitoring): Explore how Botkube streamlines Kubernetes multi-cluster management for optimized performance and reliability. -- [Day 2 Operations with Flux](https://botkube.io/blog/creating-the-botkube-flux-plugin-for-day-2-operations) :Discover best practices for handling Day 2 operations in Kubernetes using Botkube's Flux plugin. - -## Features - -### Communication Platforms - -- [Microsoft Teams Integration](https://botkube.io/blog/maximize-your-devops-teams-efficiency-with-botkube-and-microsoft-teams): Learn how to integrate Botkube with Microsoft Teams for seamless communication and collaboration in Kubernetes environments. -- [Slack Integration](https://botkube.io/blog/get-botkube-running-in-under-3-minutes-the-new-slack-app): Step-by-step guide on setting up Botkube integration with Slack to receive notifications and interact with Kubernetes clusters directly. -- [Discord Integration](https://botkube.io/integration/discord): Implement Botkube integration with Discord for efficient Kubernetes operations and event management. -- [Mattermost Integration](https://botkube.io/integration/mattermost): Configure Botkube integration with Mattermost to stay updated on Kubernetes events and receive alerts within Mattermost channels. - -### Executor Plugins - -- [Kubectl Plugin Usage](https://botkube.io/learn/kubectl-cheat-sheet): Utilize Botkube's integration with Kubectl for executing Kubernetes commands conveniently. -- [Open AI Integration](https://botkube.io/blog/doctor-plug-in-tutorial): Integrate Open AI with Botkube for intelligent automation and enhanced interactions within Kubernetes environments. -- [Helm Plugin Setup](https://botkube.io/learn/helm-charts): Seamlessly manage Helm deployments and releases with Botkube's Helm integration. -- [Flux Plugin Configuration](https://botkube.io/blog/streamlining-gitops-with-the-botkube-flux-plugin): Set up and configure Botkube's Flux plugin for automated deployment and synchronization of Kubernetes resources. -- [Custom Executor Plugin Development](https://botkube.io/integration/custom-executor-plugin): Develop and integrate custom executor plugins with Botkube for tailored Kubernetes operations. - -### Source Plugins - -- [Kubernetes Events Monitoring](https://botkube.io/blog/five-essential-kubernetes-tasks): Monitor Kubernetes events effortlessly with Botkube's built-in source plugin. -- [ArgoCD Integration](https://botkube.io/blog/getting-started-with-botkube-and-argocd): Integrate Botkube with ArgoCD for streamlined continuous delivery workflows and notifications. -- [Prometheus Integration](https://botkube.io/integration/prometheus): Monitor Kubernetes clusters effectively by integrating Prometheus metrics with Botkube. -- [Keptn Integration](https://botkube.io/blog/implementing-your-own-botkube-plugin-a-real-life-use-case): Automate testing, deployment, and operations in Kubernetes environments by integrating Botkube with Keptn. diff --git a/versioned_docs/version-1.8/examples-and-tutorials/usecases/index.md b/versioned_docs/version-1.8/examples-and-tutorials/usecases/index.md deleted file mode 100644 index fa077853..00000000 --- a/versioned_docs/version-1.8/examples-and-tutorials/usecases/index.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: use cases -title: Use Cases -sidebar_position: 3 ---- - -# 🛠Use Cases - -## GitOps Integrations - -- [Flux Plugin for Day 2 Operations](https://botkube.io/blog/creating-the-botkube-flux-plugin-for-day-2-operations): Discover how Botkube's Flux plugin simplifies Day 2 operations and provides tailored solutions for various K8s management needs. -- [ArgoCD Plugin for Optimizing Collaboration & Notifications](https://botkube.io/blog/optimizing-collaboration-and-notifications-with-the-botkube-argocd-plugin): Learn about how Botkube's engineering team using the ArgoCD plugin to optimize their deployment experience. -- [Enhancing GitOps Workflows with Botkube](https://botkube.io/blog/enhancing-gitops-workflows-with-botkube): Explore Botkube's capabilities in optimizing GitOps workflows. - -## Automating the K8s Troubleshooting workflow - -- [Using Keptn as a Source](https://botkube.io/blog/implementing-your-own-botkube-plugin-a-real-life-use-case): Discover how to leverage Keptn as a source to adapt to various troubleshooting scenarios. -- [Streamlining Helm Deployments](https://botkube.io/case-studies/civo): Learn how one of Botkube's users utilizes the Botkube Helm plugin to streamline their Helm deployments and updates. -- [GitHub Issue Reporter for Failing K8s Apps](https://botkube.io/blog/build-a-github-issues-reporter-for-failing-kubernetes-apps-with-botkube-plugins): Automate the reporting of issues with your Kubernetes applications on GitHub directly from your Slack channel. -- [5 Essential DevOps tasks to Automate](https://botkube.io/blog/botkube-5-essential-devopstasks-to-automate): Discover how to automate essential DevOps tasks like resource scaling and log management with Botkube. - -## Smart Monitoring - -- [ChatGPT Plugin](https://botkube.io/blog/building-a-chatgpt-plugin-from-ideation-to-implementation): Explore Botkube's AIOps capabilities and dive into the realm of intelligent Kubernetes monitoring with the OpenAI plugin. diff --git a/versioned_docs/version-1.8/examples-and-tutorials/videos/index.md b/versioned_docs/version-1.8/examples-and-tutorials/videos/index.md deleted file mode 100644 index 6ec967d7..00000000 --- a/versioned_docs/version-1.8/examples-and-tutorials/videos/index.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: videos -title: Videos -sidebar_position: 5 ---- - -# 🎥️ Videos - -## Office Hours - -- [Developer Self-Service](https://www.youtube.com/watch?v=74qMbqWBxms&list=PL2Vye-us8_x8-IErakx_KggCC7EPWJuby&index=2) -- [Troubleshooting Kubernetes in Microsoft Teams](https://youtu.be/HaHaa9ju8Wg) -- [GitOps Practices with Flux](https://www.youtube.com/watch?v=WxkDWLqVghw&list=PL2Vye-us8_x8-IErakx_KggCC7EPWJuby) -- [Developer Productivity with Oketeo](https://www.youtube.com/watch?v=506Tc1Grj_o) -- [Botkube goes GitOps](https://www.youtube.com/watch?v=WxkDWLqVghw) -- [Kubernetes Multi-Cluster Management](https://www.youtube.com/watch?v=ZeaUfboNKfc) -- [5 Essential Kubernetes Tasks to Automate](https://www.youtube.com/watch?v=CzlSHMM_Ypc) -- [ArgoCD Workflows](https://youtu.be/1i59PN-65SY) -- [Zapier for Kubernetes](https://www.youtube.com/watch?v=VJzSRTQpHhs) - -## Community Calls - -- [Open Source Friday - ChatOps for Kubernetes](https://www.youtube.com/watch?v=tdyPuMA2mww) -- [CNCF Webinar - Unlocking the Power of Kubernetes Collaborative Troubleshooting](https://youtu.be/6VTEOOfIbIk) -- [Tailwarden - ChatOps for Kubernetes](https://youtu.be/UOURPb03mxU) -- [Kubefirst - Monitor & Act on Your Kubernetes Cluster](https://www.youtube.com/watch?v=RLmU472lync) -- [CNCF Islamabad - Unlocking K8s Troubleshooting Best Practices](https://www.youtube.com/watch?v=Ry_UijS1ZNk) -- [Cloud Lunch and Learn - K8s Troubleshooting Best Practices in Azure](https://www.youtube.com/watch?v=x0TBA6TpfqU) -- [Kunal Kushwaha - Collaborative Troubleshooting and Monitoring in K8s With Botkube](https://youtu.be/coDSM9LiOB4) - -## Botkube User Contributions - -- [Kubernetes Cluster ChatOps - Engineering with Morris](https://youtu.be/wI6nJL4dtHY) -- [Botkube (Real-Time Kubernetes Monitoring and Alerting) - Kubernetes Bangalore](https://youtu.be/Xylb7w0yZhQ) -- [Como utilizar Slack e BotKube pra se comunicar com o seu cluster Kubernetes - Fabricio Veronez](https://www.youtube.com/watch?v=FEUOnE4z2Ac) -- [Monitoring & Debugging Kubernetes Applications with BotKube - Collabnix](https://youtu.be/mZHxJjYNmKA) - -## Conference Talks - -- [GitOps Con EU - Empowering Developer Productivity with ArgoCD](https://www.youtube.com/watch?v=k4L5_zKorZ8&list=PL2Vye-us8_x_5eqYQTBq7ZywupscaW5yA) -- [Civo Navigate - Love is Blind, but Your K8s Troubleshooting Doesn’t Have to Be](https://youtu.be/nFpTXrkz3cQ) diff --git a/versioned_docs/version-1.8/installation/assets/cloud_install.png b/versioned_docs/version-1.8/installation/assets/cloud_install.png deleted file mode 100644 index 954d6cfe..00000000 Binary files a/versioned_docs/version-1.8/installation/assets/cloud_install.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/assets/cloud_instance_delete.png b/versioned_docs/version-1.8/installation/assets/cloud_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.8/installation/assets/cloud_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/assets/cloud_new_instance.png b/versioned_docs/version-1.8/installation/assets/cloud_new_instance.png deleted file mode 100644 index 80cdd33f..00000000 Binary files a/versioned_docs/version-1.8/installation/assets/cloud_new_instance.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_add_bot.png b/versioned_docs/version-1.8/installation/discord/assets/discord_add_bot.png deleted file mode 100644 index f03ecdc8..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_add_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_add_plugins.png b/versioned_docs/version-1.8/installation/discord/assets/discord_add_plugins.png deleted file mode 100644 index 8fbf3941..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_applications_portal.png b/versioned_docs/version-1.8/installation/discord/assets/discord_applications_portal.png deleted file mode 100644 index 278b7b5d..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_applications_portal.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_bot_auth.png b/versioned_docs/version-1.8/installation/discord/assets/discord_bot_auth.png deleted file mode 100644 index 45ef0970..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_bot_auth.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_bot_auth_2.png b/versioned_docs/version-1.8/installation/discord/assets/discord_bot_auth_2.png deleted file mode 100644 index 7de140dd..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_bot_auth_2.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_bot_created.png b/versioned_docs/version-1.8/installation/discord/assets/discord_bot_created.png deleted file mode 100644 index 2f7da954..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_bot_created.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_bot_id_form.png b/versioned_docs/version-1.8/installation/discord/assets/discord_bot_id_form.png deleted file mode 100644 index 5a932a4c..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_bot_id_form.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_bot_scope.png b/versioned_docs/version-1.8/installation/discord/assets/discord_bot_scope.png deleted file mode 100644 index 487f0dd1..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_bot_scope.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_channel_id_form.png b/versioned_docs/version-1.8/installation/discord/assets/discord_channel_id_form.png deleted file mode 100644 index abf2aa77..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_channel_id_form.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_copy_application_id.png b/versioned_docs/version-1.8/installation/discord/assets/discord_copy_application_id.png deleted file mode 100644 index 259021f1..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_copy_application_id.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_copy_channel_id.png b/versioned_docs/version-1.8/installation/discord/assets/discord_copy_channel_id.png deleted file mode 100644 index 2ecf8d18..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_copy_channel_id.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_create.png b/versioned_docs/version-1.8/installation/discord/assets/discord_create.png deleted file mode 100644 index cf28566d..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_create.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_create_new.png b/versioned_docs/version-1.8/installation/discord/assets/discord_create_new.png deleted file mode 100644 index bc88d336..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_create_new.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_developer_mode.png b/versioned_docs/version-1.8/installation/discord/assets/discord_developer_mode.png deleted file mode 100644 index d0f1c270..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_developer_mode.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_instance_delete.png b/versioned_docs/version-1.8/installation/discord/assets/discord_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_instance_display_name.png b/versioned_docs/version-1.8/installation/discord/assets/discord_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_platform_select.png b/versioned_docs/version-1.8/installation/discord/assets/discord_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_summary.png b/versioned_docs/version-1.8/installation/discord/assets/discord_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/assets/discord_token_form.png b/versioned_docs/version-1.8/installation/discord/assets/discord_token_form.png deleted file mode 100644 index 7a998f8c..00000000 Binary files a/versioned_docs/version-1.8/installation/discord/assets/discord_token_form.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/discord/cloud.md b/versioned_docs/version-1.8/installation/discord/cloud.md deleted file mode 100644 index 8435cd39..00000000 --- a/versioned_docs/version-1.8/installation/discord/cloud.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -id: discord-cloud -slug: cloud -title: Discord for Botkube Cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Discord - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/discord_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Discord` option. - ![Select Platform](assets/discord_platform_select.png "Select platform") - -4. Create Botkube app at your Discord Server - - Reach https://discordapp.com/developers/applications. - - ![discord_applications_portal](assets/discord_applications_portal.png) - -5. Create a "New Application" named Botkube and add a bot named **Botkube** into the Application. - - ![discord_create_new](assets/discord_create_new.png) - -6. Copy the Application **APPLICATION ID** - - ![discord_copy_client_id](assets/discord_copy_application_id.png) - - and paste it in the `BotID` field in the form. - - ![bot_id_form](assets/discord_bot_id_form.png) - -7. Add a description - `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - Set the Botkube icon (Botkube icon can be downloaded from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-color-192x192.png)). - - Click on Save Changes to update the Bot. - -8. Now, reach the **Bot** page and Click **Add Bot** to add a Discord Bot to your application. - - ![discord_add_bot](assets/discord_add_bot.png) - -9. After Bot creation, now you can see a bot is added to your application. Click on the **Reset Token** button. - - ![discord_bot_created](assets/discord_bot_created.png) - -10. Copy the Token and paste it in `Token` field the form. - - ![discord_token_form](assets/discord_token_form.png) - -11. Go to the **OAuth2** page. Generate the URL with suitable permissions using the **OAuth2 URL Generator** available under the OAuth2 section to add bot to your Discord server. - -![discord_bot_scope](assets/discord_bot_scope.png) - -the generated URL contains **YOUR_CLIENT_ID**, Scope and permission details. - -``` -https://discord.com/api/oauth2/authorize?client_id={YOUR_CLIENT_ID}&permissions={SET_OF_PERMISSIONS}&scope=bot -``` - -12. Copy and Paste the generated URL in a new tab, select the discord server to which you want to add the bot, click Continue and Authorize Bot addition. - -![discord_bot_auth](assets/discord_bot_auth.png) - -![discord_bot_auth_2](assets/discord_bot_auth_2.png) - -13. Switch to the Discord app. Navigate to **User settings** and select **Advanced** tab. - - Enable the **Developer Mode**. - - ![discord_developer_mode](assets/discord_developer_mode.png) - -14. Create a new channel or select an existing one and copy the **CHANNEL ID**. - - To get the channel ID, right-click on a channel you want to receive notification in and click on **Copy ID**. - - ![discord_copy_channel_id.png](assets/discord_copy_channel_id.png) - - Copy the channel ID and create it in `Channel ID` field in the form. - - ![discord_channel_id_form](assets/discord_channel_id_form.png) - -15. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/discord_add_plugins.png "Plugins") - -16. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/discord_create.png "Create") - -17. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/discord_summary.png "Summary") - -## Clean up - -### Remove Botkube from Discord Server - -- Go to Discord Developers Portal [Applications](https://discord.com/developers/applications) page, -- Click on "Botkube" and click on "Delete App" button. - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/discord_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.8/installation/discord/index.md b/versioned_docs/version-1.8/installation/discord/index.md deleted file mode 100644 index 0f3cfb03..00000000 --- a/versioned_docs/version-1.8/installation/discord/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: discord -title: Discord -sidebar_position: 4 ---- - -You can use Discord app to connect Botkube to your Discord Server. Learn how to create and configure Discord app for Botkube installation for: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.8/installation/discord/self-hosted.md b/versioned_docs/version-1.8/installation/discord/self-hosted.md deleted file mode 100644 index 93fe3746..00000000 --- a/versioned_docs/version-1.8/installation/discord/self-hosted.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -id: discord-self-hosted -slug: self-hosted -title: Discord for self-hosted Botkube -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Discord server account - -## Install Botkube to the Discord Server - -Follow the steps below to install Botkube Discord app to your Discord server. - -### Create Botkube app at your Discord Server - -1. Reach https://discordapp.com/developers/applications. - - ![discord_applications_portal](assets/discord_applications_portal.png) - -2. Create a "New Application" named Botkube and add a bot named **Botkube** into the Application. - - ![discord_create_new](assets/discord_create_new.png) - -3. Copy the Application **APPLICATION ID** and export it as the `DISCORD_BOT_ID` environment variable. - - ``` - export DISCORD_BOT_ID={APPLICATION_ID} - ``` - - ![discord_copy_client_id](assets/discord_copy_application_id.png) - -4. Add a description - `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - Set the Botkube icon (Botkube icon can be downloaded from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-color-192x192.png)). - - Click on Save Changes to update the Bot. - -5. Now, reach the **Bot** page and Click **Add Bot** to add a Discord Bot to your application. - - ![discord_add_bot](assets/discord_add_bot.png) - -6. After Bot creation, now you can see a bot is added to your application. Click on the **Reset Token** button. - - ![discord_bot_created](assets/discord_bot_created.png) - -7. Copy the Token and export it as the `DISCORD_TOKEN` environment variable. - - ``` - export DISCORD_TOKEN={TOKEN} - ``` - -8. Go to the **OAuth2** page. Generate the URL with suitable permissions using the **OAuth2 URL Generator** available under the OAuth2 section to add bot to your Discord server. - - ![discord_bot_scope](assets/discord_bot_scope.png) - - the generated URL contains **YOUR_CLIENT_ID**, Scope and permission details. - - ``` - https://discord.com/api/oauth2/authorize?client_id={YOUR_CLIENT_ID}&permissions={SET_OF_PERMISSIONS}&scope=bot - ``` - -9. Copy and Paste the generated URL in a new tab, select the discord server to which you want to add the bot, click Continue and Authorize Bot addition. - - ![discord_bot_auth](assets/discord_bot_auth.png) - - ![discord_bot_auth_2](assets/discord_bot_auth_2.png) - -10. Switch to the Discord app. Navigate to **User settings** and select **Advanced** tab. - - Enable the **Developer Mode**. - - ![discord_developer_mode](assets/discord_developer_mode.png) - -11. Create a new channel or select an existing one and copy the **CHANNEL ID**. - - To get the channel ID, right-click on a channel you want to receive notification in and click on **Copy ID**. - - ![discord_copy_channel_id.png](assets/discord_copy_channel_id.png) - - Copy the channel ID and export it as the `DISCORD_CHANNEL_ID` environment variable. - - ``` - export DISCORD_CHANNEL_ID={ID} - ``` - -12. Now, go ahead and install the Botkube backend on your Kubernetes cluster. - -:::note -Follow the first 4 mins of this [Video Tutorial](https://youtu.be/8o25pRbXdFw) to understand the process visually. -::: - -### Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} -export ALLOW_HELM={allow_helm} - -botkube install --version v1.8.0 \ ---set communications.default-group.discord.enabled=true \ ---set communications.default-group.discord.channels.default.id=${DISCORD_CHANNEL_ID} \ ---set communications.default-group.discord.botID=${DISCORD_BOT_ID} \ ---set communications.default-group.discord.token=${DISCORD_TOKEN} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} \ ---set 'executors.k8s-default-tools.botkube/helm.enabled'=${ALLOW_HELM} -``` - -where: - -- **DISCORD_CHANNEL_ID** is the channel name where @Botkube needs to send notifications, -- **DISCORD_BOT_ID** is the Botkube Application Client ID, -- **DISCORD_TOKEN** is the Token you received after adding Botkube bot to your Discord Application, -- **CLUSTER_NAME** is the cluster name set in the incoming messages, -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster, -- **ALLOW_HELM** set true to allow `helm` command execution by Botkube on the cluster, - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -### Remove Botkube from Discord Server - -- Go to Discord Developers Portal [Applications](https://discord.com/developers/applications) page, -- Click on "Botkube" and click on "Delete App" button. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_add_plugins.png b/versioned_docs/version-1.8/installation/elasticsearch/assets/els_add_plugins.png deleted file mode 100644 index 8306a743..00000000 Binary files a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_create.png b/versioned_docs/version-1.8/installation/elasticsearch/assets/els_create.png deleted file mode 100644 index 9ffaf353..00000000 Binary files a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_create.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_form.png b/versioned_docs/version-1.8/installation/elasticsearch/assets/els_form.png deleted file mode 100644 index db744494..00000000 Binary files a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_form.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_instance_delete.png b/versioned_docs/version-1.8/installation/elasticsearch/assets/els_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_instance_display_name.png b/versioned_docs/version-1.8/installation/elasticsearch/assets/els_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_platform_select.png b/versioned_docs/version-1.8/installation/elasticsearch/assets/els_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_summary.png b/versioned_docs/version-1.8/installation/elasticsearch/assets/els_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.8/installation/elasticsearch/assets/els_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/elasticsearch/cloud.md b/versioned_docs/version-1.8/installation/elasticsearch/cloud.md deleted file mode 100644 index 4a37750c..00000000 --- a/versioned_docs/version-1.8/installation/elasticsearch/cloud.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: elasticsearch-cloud -title: Elasticsearch for Botkube Cloud -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Elasticsearch - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/els_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Elasticsearch` option. - - ![Select Platform](assets/els_platform_select.png "Select platform") - -4. Fill in all required data in the form - - ![Form](assets/els_form.png "Form") - -5. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/els_add_plugins.png "Plugins") - -6. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/els_create.png "Create") - - :::note - If you don't include other platforms which use `Executor` plugins we recommend `default aliases` and `default actions` options unchecked - ::: - -7. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/els_summary.png "Summary") - -## Clean up - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/els_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.8/installation/elasticsearch/index.md b/versioned_docs/version-1.8/installation/elasticsearch/index.md deleted file mode 100644 index cfd7af21..00000000 --- a/versioned_docs/version-1.8/installation/elasticsearch/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: elasticsearch -title: "Elasticsearch" -sidebar_position: 6 ---- - -You can use Botkube to populate your Elasticsearch with events. Learn how to configure Botkube to work with Elasticsearch: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.8/installation/elasticsearch/self-hosted.md b/versioned_docs/version-1.8/installation/elasticsearch/self-hosted.md deleted file mode 100644 index d070518d..00000000 --- a/versioned_docs/version-1.8/installation/elasticsearch/self-hosted.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -id: elasticsearch-self-hosted -title: "Elasticsearch for self-hosted Botkube" -slug: self-hosted -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Elasticsearch server - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ELASTICSEARCH_ADDRESS={elasticsearch_address} -export ELASTICSEARCH_USERNAME={elasticsearch_username} -export ELASTICSEARCH_PASSWORD={elasticsearch_password} -export ELASTICSEARCH_INDEX_NAME={elasticsearch_index_name} - -botkube install --version v1.8.0 \ ---set communications.default-group.elasticsearch.enabled=true \ ---set communications.default-group.elasticsearch.server=${ELASTICSEARCH_ADDRESS} \ ---set communications.default-group.elasticsearch.username=${ELASTICSEARCH_USERNAME} \ ---set communications.default-group.elasticsearch.password=${ELASTICSEARCH_PASSWORD} \ ---set communications.default-group.elasticsearch.indices.default.name=${ELASTICSEARCH_INDEX_NAME} \ ---set settings.clusterName=${CLUSTER_NAME} -``` - -where: - -- **ELASTICSEARCH_ADDRESS** is an address on which Elasticsearch server is reachable e.g https://example.com:9243, -- **ELASTICSEARCH_USERNAME** is the username for authentication to Els server, -- **ELASTICSEARCH_PASSWORD** is a password for the username to authenticate with Els server, -- **ELASTICSEARCH_INDEX_NAME** _(optional)_ is an index name on which Botkube events will be stored _(default: botkube)_. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.8/installation/index.mdx b/versioned_docs/version-1.8/installation/index.mdx deleted file mode 100644 index eff29cd5..00000000 --- a/versioned_docs/version-1.8/installation/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -id: installation -title: Installation -sidebar_position: 1 -slug: / ---- - -import { IntegrationList } from "@site/src/components/IntegrationList"; - -Botkube has two components that need to be installed. - -1. Botkube App Integration in your Slack/Mattermost/Microsoft Teams/Discord -2. Botkube agent in your Kubernetes cluster - -## Feature map - -Learn about Botkube features and their availability in different integrations. - -### Bots - -Compare our bidirectional integrations: - -| Feature | Cloud Slack | Slack | Microsoft Teams | Discord | Mattermost | -| ---------------------------------------------------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| Source plugins support (e.g. `kubernetes`, `prometheus`, etc.) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Executor plugins support (e.g. `kubectl`, `helm`, etc.) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Multi-cluster support | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Enhanced per-channel plugin configuration including RBAC policy. | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Interactive messages | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | -| Actionable notifications | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | -| Emoji reactions | :heavy_check_mark: | :x: | :x: | :x: | :x: | - -### Sinks - -Compare our unidirectional integrations: - -| Feature | Elasticsearch | Webhook | -| -------------------------------------------------------------- | ------------------ | ------------------ | -| Source plugins support (e.g. `kubernetes`, `prometheus`, etc.) | :heavy_check_mark: | :heavy_check_mark: | -| Multi-cluster support | :heavy_check_mark: | :heavy_check_mark: | - -## Integrations - - - -:::tip -You can use a single Botkube agent to serve all the interfaces - Slack, Mattermost, Microsoft Teams, Elasticsearch and Webhook.
-You just need to enable required mediums through the settings and add a necessary configuration.
-_see the [configuration](../configuration/index.mdx) section for more information_ -::: diff --git a/versioned_docs/version-1.8/installation/mattermost/assets/invite.png b/versioned_docs/version-1.8/installation/mattermost/assets/invite.png deleted file mode 100644 index af62c87a..00000000 Binary files a/versioned_docs/version-1.8/installation/mattermost/assets/invite.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/mattermost/assets/mattermost_instance_display_name.png b/versioned_docs/version-1.8/installation/mattermost/assets/mattermost_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.8/installation/mattermost/assets/mattermost_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/mattermost/assets/mm_add_plugins.png b/versioned_docs/version-1.8/installation/mattermost/assets/mm_add_plugins.png deleted file mode 100644 index 6a6ba82f..00000000 Binary files a/versioned_docs/version-1.8/installation/mattermost/assets/mm_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/mattermost/assets/mm_channels_form.png b/versioned_docs/version-1.8/installation/mattermost/assets/mm_channels_form.png deleted file mode 100644 index 9d1ac4a0..00000000 Binary files a/versioned_docs/version-1.8/installation/mattermost/assets/mm_channels_form.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/mattermost/assets/mm_create.png b/versioned_docs/version-1.8/installation/mattermost/assets/mm_create.png deleted file mode 100644 index b56ea252..00000000 Binary files a/versioned_docs/version-1.8/installation/mattermost/assets/mm_create.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/mattermost/assets/mm_form_bot_name.png b/versioned_docs/version-1.8/installation/mattermost/assets/mm_form_bot_name.png deleted file mode 100644 index c0f323bc..00000000 Binary files a/versioned_docs/version-1.8/installation/mattermost/assets/mm_form_bot_name.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/mattermost/assets/mm_instance_delete.png b/versioned_docs/version-1.8/installation/mattermost/assets/mm_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.8/installation/mattermost/assets/mm_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/mattermost/assets/mm_personal_token_form.png b/versioned_docs/version-1.8/installation/mattermost/assets/mm_personal_token_form.png deleted file mode 100644 index cf9cc05d..00000000 Binary files a/versioned_docs/version-1.8/installation/mattermost/assets/mm_personal_token_form.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/mattermost/assets/mm_platform_select.png b/versioned_docs/version-1.8/installation/mattermost/assets/mm_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.8/installation/mattermost/assets/mm_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/mattermost/assets/mm_summary.png b/versioned_docs/version-1.8/installation/mattermost/assets/mm_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.8/installation/mattermost/assets/mm_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/mattermost/cloud.md b/versioned_docs/version-1.8/installation/mattermost/cloud.md deleted file mode 100644 index 63d46bc8..00000000 --- a/versioned_docs/version-1.8/installation/mattermost/cloud.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -id: mattermost-cloud -title: Mattermost for Botkube Cloud -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Mattermost - -Follow the steps below to install Botkube in your Mattermost instance. - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/mattermost_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Mattermost` option. - ![Mattermost Platform Select](assets/mm_platform_select.png "Select mattermost platform") - -4. Follow the [Mattermost instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/) for creating a bot account. When creating the bot account, use the following details: - - - Username — `Botkube` - - :::note - You can also use a custom username for your bot. Just remember that you'll need to provide this username during a later step of the Botkube installation. - ::: - - - Description — `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - - Icon — You can download the Botkube icon from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-black-192x192.png). - -5. Paste the bot name in the form - - ![Bot Name in the form](assets/mm_form_bot_name.png "Bot Name in the form") - -6. Past the token in the form - - ![Personal Token in the form](assets/mm_personal_token_form.png "Personal Token in the form") - -7. Add Botkube to a channel - - Make sure that the newly created bot account is added to your Mattermost team by following [these instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/#bot-account-creation). - - ![Invite Bot Account](./assets/invite.png) - - Add Botkube user created to the channel you want to receive notifications in. - - ![Channels in the form](assets/mm_channels_form.png "Channels in the form") - -8. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/mm_add_plugins.png "Plugins") - -9. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/mm_create.png "Create") - -10. Follow the instructions in the summary page to deploy Botkube into your environment. - -![Summary](assets/mm_summary.png "Summary") - -## Clean up - -### Remove Botkube from Mattermost Team - -- Deactivate or remove Botkube user from Mattermost Team. Login as System Admin, in the Menu proceed to System console -> Users -> botkube -> Deactivate. -- Archive Channel created for Botkube communication if required. - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/mm_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.8/installation/mattermost/index.md b/versioned_docs/version-1.8/installation/mattermost/index.md deleted file mode 100644 index cb1d242a..00000000 --- a/versioned_docs/version-1.8/installation/mattermost/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: mattermost -title: Mattermost -sidebar_position: 3 ---- - -You can use Mattermost Bot to connect Botkube to your Mattermost Server. Learn how to create and configure Mattermost Bot for Botkube installation for: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.8/installation/mattermost/self-hosted.md b/versioned_docs/version-1.8/installation/mattermost/self-hosted.md deleted file mode 100644 index e13609e1..00000000 --- a/versioned_docs/version-1.8/installation/mattermost/self-hosted.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -id: mattermost-self-hosted -title: Mattermost for self-hosted Botkube -slug: self-hosted -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster - -## Install Botkube to the Mattermost - -Follow the steps below to install Botkube in your Mattermost instance. - -### Create the Botkube bot account - -1. Follow the [Mattermost instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/) for creating a bot account. When creating the bot account, use the following details: - - - Username — `Botkube` - - :::note - You can also use a custom username for your bot. Just remember that you'll need to provide this username during a later step of the Botkube installation. - ::: - - - Description — `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - - Icon — You can download the Botkube icon from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-black-192x192.png). - -2. Export the bot name as an environment variable: - - ```bash - export MATTERMOST_BOT_NAME="{bot_name}" - ``` - -3. Also, export the bot's token as an environment variable: - - ```bash - export MATTERMOST_TOKEN="{token}" - ``` - -### Add Botkube to a channel - -Make sure that the newly created bot account is added to your Mattermost team by following [these instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/#bot-account-creation). - -![Invite Bot Account](./assets/invite.png) - -Next, invite the Botkube bot into the specific channel where you want to receive notifications. Export the channel name as an environment variable: - -```bash -export MATTERMOST_CHANNEL="{channel_name}" -``` - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export MATTERMOST_SERVER_URL={mattermost_server_url} -export MATTERMOST_TEAM={mattermost_team_name} -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} -export ALLOW_HELM={allow_helm} - -botkube install --version v1.8.0 \ ---set communications.default-group.mattermost.enabled=true \ ---set communications.default-group.mattermost.url=${MATTERMOST_SERVER_URL} \ ---set communications.default-group.mattermost.token=${MATTERMOST_TOKEN} \ ---set communications.default-group.mattermost.team=${MATTERMOST_TEAM} \ ---set communications.default-group.mattermost.channels.default.name=${MATTERMOST_CHANNEL} \ ---set communications.default-group.mattermost.botName=${MATTERMOST_BOT_NAME} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} \ ---set 'executors.k8s-default-tools.botkube/helm.enabled'=${ALLOW_HELM} -``` - -where: - -- **MATTERMOST_SERVER_URL** is the URL (including http/https schema) where Mattermost is running, -- **MATTERMOST_TOKEN** is the Token received by creating Personal Access Token for Botkube bot, -- **MATTERMOST_TEAM** is the Team name where Botkube is added, -- **MATTERMOST_CHANNEL** is the Channel name where Botkube is added and used for communication, -- **MATTERMOST_BOT_NAME** is the Mattermost bot username (usually it is `Botkube`), -- **CLUSTER_NAME** is the cluster name set in the incoming messages, -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster, -- **ALLOW_HELM** set true to allow `helm` command execution by Botkube on the cluster, - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -## Remove Botkube from Mattermost Team - -- Deactivate or remove Botkube bot from Mattermost Team. -- Archive Channel created for Botkube communication if required. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` - -## Troubleshooting - -### Botkube doesn't start - -**Symptoms** - -The Botkube Pod is restarting and the Botkube logs show the following error: - -```json -{ - "level": "fatal", - "msg": "while running application: while waiting for goroutines to finish gracefully: 1 error occurred:\n\t* while creating Mattermost bot: while getting team details: team \"Botkube\" not found", - "time": "2023-08-25T14:52:30+02:00" -} -``` - -**Solution** - -You need to ensure that the configuration used by Botkube is valid. - -1. Get and decode the communication Secret details: - ```bash - kubectl get secret botkube-communication-secret -n botkube --template='{{index .data "comm_config.yaml" | base64decode }}' - ``` -2. Verify the following: - - - Ensure that the value of `communications.default-group.mattermost.team` in the configuration matches the actual team name in your Mattermost UI. - - - Confirm that the bot specified in `communications.default-group.mattermost.botName` has been invited to the relevant team and all specified channels. - - - Check the validity of the token provided in `communications.default-group.mattermost.token`. If you're unsure, navigate to the Bot Accounts section in Mattermost and generate a new one. - -3. Additional Steps: - - If you continue to experience issues with Botkube restarts, you can perform further troubleshooting by following the instructions provided by Mattermost on [testing bot connections](https://developers.mattermost.com/integrate/reference/bot-accounts/#how-can-i-quickly-test-if-my-bot-account-is-working). diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_add_plugins.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_add_plugins.png deleted file mode 100644 index 6d0df836..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_add_to_slack.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_add_to_slack.png deleted file mode 100644 index 508b8d64..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_add_to_slack.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_all_clusters.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_all_clusters.png deleted file mode 100644 index f0629ad8..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_all_clusters.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_help.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_help.png deleted file mode 100644 index a141f676..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_help.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_list_instances.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_list_instances.png deleted file mode 100644 index ff0f1375..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_list_instances.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_set_default.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_set_default.png deleted file mode 100644 index cf489aed..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_command_set_default.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_create.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_create.png deleted file mode 100644 index deb72f65..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_create.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_credentials.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_credentials.png deleted file mode 100644 index a6c60dbc..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_credentials.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_grant.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_grant.png deleted file mode 100644 index 55858e31..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_grant.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_install.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_install.png deleted file mode 100644 index 954d6cfe..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_install.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_instance_delete.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_instance_list_manage.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_instance_list_manage.png deleted file mode 100644 index 3dd8d34e..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_instance_list_manage.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_new_instance.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_new_instance.png deleted file mode 100644 index 80cdd33f..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_new_instance.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_select_slack.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_select_slack.png deleted file mode 100644 index 544f59a2..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_select_slack.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_workspace_details.png b/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_workspace_details.png deleted file mode 100644 index a5feeb96..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/cloud_slack_workspace_details.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/slack_add_app.png b/versioned_docs/version-1.8/installation/slack/assets/slack_add_app.png deleted file mode 100644 index 378e0b9a..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/slack_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/slack_generate_app_token.png b/versioned_docs/version-1.8/installation/slack/assets/slack_generate_app_token.png deleted file mode 100644 index 0864aae1..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/slack_generate_app_token.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/slack_install_app.png b/versioned_docs/version-1.8/installation/slack/assets/slack_install_app.png deleted file mode 100644 index cee7293e..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/slack_install_app.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/slack_retrieve_app_token.png b/versioned_docs/version-1.8/installation/slack/assets/slack_retrieve_app_token.png deleted file mode 100644 index 5644a174..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/slack_retrieve_app_token.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/slack_retrieve_bot_token.png b/versioned_docs/version-1.8/installation/slack/assets/slack_retrieve_bot_token.png deleted file mode 100644 index e3954a91..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/slack_retrieve_bot_token.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/assets/slack_select_workspace.png b/versioned_docs/version-1.8/installation/slack/assets/slack_select_workspace.png deleted file mode 100644 index 897e5b31..00000000 Binary files a/versioned_docs/version-1.8/installation/slack/assets/slack_select_workspace.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/slack/cloud-slack.mdx b/versioned_docs/version-1.8/installation/slack/cloud-slack.mdx deleted file mode 100644 index 5cacdea9..00000000 --- a/versioned_docs/version-1.8/installation/slack/cloud-slack.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -id: cloud-slack -title: Botkube Cloud App for Slack -sidebar_position: 1 ---- - -The Botkube Cloud App for Slack uses Botkube Cloud services to manage channels and route executor commands. This allows multi-cluster support without a need to create a dedicated Slack application for each cluster. Events and alerts are sent directly from your cluster to your Slack workspace for reliable, fast notifications. - -## Prerequisites - -- A Botkube Cloud account. - - You can try out the Botkube Cloud App for Slack for free by creating an account in the [Botkube Cloud app](https://app.botkube.io). - -## Create a Botkube Cloud Instance with Cloud Slack - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and click on `New Instance` button. - - ![New Instance](assets/cloud_slack_new_instance.png "Create new instance") - -2. Install Botkube Agent on your Kubernetes cluster by following the instructions on the page. - - ![Install Agent](assets/cloud_slack_install.png "Install Agent") - -3. Click `Add platform` dropdown, and select `Slack` option. - - ![Slack Platform Select](assets/cloud_slack_select_slack.png "Select slack platform") - -4. Click `Add to Slack` button to add Cloud Slack integration to your Slack workspace. - - ![Add to Slack](assets/cloud_slack_add_to_slack.png "Add to Slack") - -5. Click `Allow` to grant permission for Botkube app to access your Slack workspace. - - ![Cloud Slack Grant](assets/cloud_slack_grant.png "Cloud Slack grant") - -6. Provide the Slack app details as described follows and click `Next` button. - - - **Connected Slack Workspace:** Slack workspace that you granted permission in the previous step. - - **Display Name:** Display name of the Cloud Slack configuration. - - **Channels:** Slack channes where you can execute Botkube commands and receive notification. - - ![Cloud Slack Workspace](assets/cloud_slack_workspace_details.png "Cloud Slack workspace") - -7. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Cloud Slack Plugins](assets/cloud_slack_add_plugins.png "Cloud Slack plugins") - -8. Include optional default command aliases and actions and click `Apply Changes` button to update Botkube Cloud instance. - - ![Cloud Slack Create](assets/cloud_slack_create.png "Cloud Slack create") - -## Using Botkube Cloud App for Slack - -You can start using Botkube Cloud App for Slack by typing `@Botkube cloud help` in the Slack channel you configured in one of the previous steps. - -![Cloud Slack Command Help](assets/cloud_slack_command_help.png "Cloud Slack command help") - -### Listing Cloud Instances - -You can list all the Botkube Cloud instances by typing `@Botkube cloud list instances` in the Slack channel, or click the button `List connected instances` in the help command response. -Besides the instance `name`, `ID`, and `status` in the list response, you can also click the `Get details` button to go to instance details on Botkube Cloud Dashboard. - -![Cloud Slack List Instances](assets/cloud_slack_command_list_instances.png "Cloud Slack list instances") - -### Setting Default Instances - -Once a Botkube command is executed, it will be handled on target Kubernetes cluster specified with `--cluster-name` flag. This is an optional flag, -where if you have not specified it, Botkube Cloud will select the first instance. However, you can also achieve setting default instance with command `@Botkube cloud set default-instance {instance-id}`. - -![Cloud Slack Set Default Instances](assets/cloud_slack_command_set_default.png "Cloud Slack set default instance") - -After this point, all of your commands will be executed on the default instance. Moreover, if you want to execute a command on all the target clusters, you can use `--all-clusters` flag. - -![Cloud Slack All Clusters](assets/cloud_slack_command_all_clusters.png "Cloud Slack all clusters") - -### Setting Public Alias for Private Channels - -In order to maintain your confidentiality while using Botkube's plugins, you need to create a public alias for your private Slack channels. This alias will only be visible to Botkube Cloud administrators. - -#### During the Botkube Invitation to Private Channels - -When you invite Botkube to a private channel, a prompt will appear to guide you through the process of creating a public alias. - -#### For Existing Private Channels - -To update an existing alias for a private channel, or if Botkube is already integrated, simply use this command: - -``` -@Botkube cloud set channel-alias -``` - -## Cleanup - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - - ![Cloud Slack Instance Manage](assets/cloud_slack_instance_list_manage.png "Cloud Slack instances manage") - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Cloud Slack Instance Delete](assets/cloud_slack_instance_delete.png "Cloud Slack instances delete") diff --git a/versioned_docs/version-1.8/installation/slack/index.md b/versioned_docs/version-1.8/installation/slack/index.md deleted file mode 100644 index 75a0e837..00000000 --- a/versioned_docs/version-1.8/installation/slack/index.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: slack -title: Slack -sidebar_position: 1 ---- - -## Botkube Slack App Versions - -In order to connect with Slack, Botkube requires a Slack application. There are two versions of the Botkube Slack App available: - -### Botkube Cloud App for Slack - -The Botkube Cloud App for Slack offers several advanced features: - -- One-click installation into your Slack workspace -- Multi-cluster executor support with a single Slack App -- Manage Slack channels directly from the Botkube web app and ensure the Botkube bot is invited to the correct channels - -The Botkube Cloud App for Slack uses Botkube's cloud services to manage channels and route executor commands. Events and alerts are sent directly from your cluster to your Slack workspace for reliable, fast notifications. - -You can directly try Botkube Cloud App for Slack for free by creating an account in the [Botkube Web App](https://app.botkube.io). Follow the [Cloud Slack app tutorial](cloud-slack.mdx) to learn more. - -### Botkube Socket Slack App - -The Socket-mode app works with the open-source Botkube Agent. The Botkube Socket-mode Slack App has the following caveats: - -- Must be installed manually into your Slack workspace using the provided configuration -- Slack channels must be managed manually, and you need to ensure the Botkube bot is invited to any channel you want to use with Botkube -- When using executor plugins (e.g. kubectl, helm) in a multi-cluster environment, each cluster needs to have a dedicated Botkube Slack bot in order to route commands to the correct cluster. - -Follow the [instruction](socket-slack.md) for more details. diff --git a/versioned_docs/version-1.8/installation/slack/socket-slack.md b/versioned_docs/version-1.8/installation/slack/socket-slack.md deleted file mode 100644 index 0e5a26df..00000000 --- a/versioned_docs/version-1.8/installation/slack/socket-slack.md +++ /dev/null @@ -1,235 +0,0 @@ ---- -id: socket-slack -title: Socket Slack App -sidebar_position: 2 ---- - -The Socket-mode app works with the open-source Botkube Agent and does not require an account or subscription. - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Slack Workspace admin access - -## Install Socket Slack App in Your Slack workspace - -Botkube uses interactive messaging to provide better experience. Interactive messaging needs a Slack App with Socket Mode enabled and currently this is not suitable for Slack App Directory listing. For this reason, you need to create a Slack App in your own Slack workspace and use it for Botkube deployment. - -:::warning -**Multi-cluster caveat:** The architecture of socket-based Slack apps has a limitation on the routing of executor commands. If you would like to use [Botkube executors](../../configuration/executor/index.md) (e.g. kubectl commands) and have multiple Kubernetes clusters, you need to create and install a Botkube Slack app for each cluster. This is required so that the Slack to Botkube connections go to the right place. We recommend you set the name of each app to reflect the cluster it will connect to in the next steps. - -To learn more about the Slack Socket API limitation, see the [comment](https://github.com/slackapi/bolt-js/issues/1263#issuecomment-1006372826) in the official Slack bot framework repository. - -The [Botkube Cloud App for Slack](./cloud-slack.mdx) does not have this limitation. -::: - -Follow the steps below to create and install Botkube Slack app to your Slack workspace. - -### Create Slack app - -1. Go to [Slack App console](https://api.slack.com/apps) to create an application. -1. Click **Create New App** and select **From an app manifest** in the popup to create application from manifest. - - ![Create App from Manifest](assets/slack_add_app.png "Slack add app") - -1. Select a workspace where you want to create application and click **Next**. - - ![Select Workspace](assets/slack_select_workspace.png "Slack select workspace") - -1. Select **YAML** tab, copy & paste one of the following manifests, and click **Next**, and then **Create**. - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -
- - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - channels:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - groups:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - channels:read - - groups:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - -
- -### Install Botkube to the Slack workspace - -Once the application is created, you will be redirected to application details page. Press the **Install your app** button, select the workspace and click **Allow to finish installation**. - -![Install Slack App](assets/slack_install_app.png "Slack install app") - -### Obtain Bot Token - -Follow the steps to obtain the Bot Token: - -1. Select **OAuth & Permissions** section on the left sidebar. On this page you can copy the bot token which starts with `xoxb...`. - - ![Retrieve Slack Bot Token](assets/slack_retrieve_bot_token.png "Slack Bot Token") - -1. Export Slack Bot Token as follows: - - ```shell - export SLACK_API_BOT_TOKEN="{botToken}" - ``` - -### Generate and obtain App-Level Token - -Slack App with Socket Mode requires an App-Level Token for the websocket connection. - -Follow the steps to generate an App-Level Token: - -1. Select **Basic Information** link from the left sidebar and scroll down to section **App-Level Token**. Click on the **Generate Token and Scopes** button. -1. Enter a **Name**, select `connections:write` scope, and click **Generate**. - - ![Generate App-Level Token](assets/slack_generate_app_token.png "Slack App Token") - - ![Retrieve App-Level Token](assets/slack_retrieve_app_token.png "Slack Retrieve App Token") - -1. Copy **App-Level Token** and export it as follows: - - ```shell - export SLACK_API_APP_TOKEN="${appToken}" - ``` - -### Add Botkube user to a Slack channel - -After installing Botkube app to your Slack workspace, you could see a new bot user with the name "Botkube" added in your workspace. Add that bot to a Slack channel you want to receive notification in. You can add it by inviting `@Botkube` in a channel. - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} -export ALLOW_HELM={allow_helm} -export SLACK_CHANNEL_NAME={channel_name} - -botkube install --version v1.8.0 \ ---set communications.default-group.socketSlack.enabled=true \ ---set communications.default-group.socketSlack.channels.default.name=${SLACK_CHANNEL_NAME} \ ---set communications.default-group.socketSlack.appToken=${SLACK_API_APP_TOKEN} \ ---set communications.default-group.socketSlack.botToken=${SLACK_API_BOT_TOKEN} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} \ ---set 'executors.k8s-default-tools.botkube/helm.enabled'=${ALLOW_HELM} -``` - -where: - -- **SLACK_CHANNEL_NAME** is the channel name where @Botkube is added -- **SLACK_API_BOT_TOKEN** is the Token you received after installing Botkube app to your Slack workspace -- **SLACK_API_APP_TOKEN** is the Token you received after installing Botkube app to your Slack workspace and generate in App-Level Token section -- **CLUSTER_NAME** is the cluster name set in the incoming messages -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster, -- **ALLOW_HELM** set true to allow `helm` command execution by Botkube on the cluster, - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -### Delete Botkube from Slack workspace - -- Go to the [Slack apps](https://api.slack.com/apps) page, -- Click on "Botkube", scroll to bottom, and click on "Delete App" button. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.8/installation/socketslack.mdx b/versioned_docs/version-1.8/installation/socketslack.mdx deleted file mode 100644 index 314744a2..00000000 --- a/versioned_docs/version-1.8/installation/socketslack.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -id: socketslack -title: "Slack" -sidebar_position: -1 -sidebar_class_name: hidden ---- - -Redirecting to the new location of Slack installation... If you are not redirected in a few seconds, please click [here](./slack/index.md). - -import { RelativeRedirect } from "@site/src/components/RelativeRedirect"; - - diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_add_app.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_add_app.png deleted file mode 100644 index de175417..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_add_plugins.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_add_plugins.png deleted file mode 100644 index 7217b81b..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_admin_center.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_admin_center.png deleted file mode 100644 index 46a149eb..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_admin_center.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_botkube_app_add.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_botkube_app_add.png deleted file mode 100644 index 4f8cbe63..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_botkube_app_add.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_command_all_clusters.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_command_all_clusters.png deleted file mode 100644 index bba0111b..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_command_all_clusters.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_command_help.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_command_help.png deleted file mode 100644 index ccb04a47..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_command_help.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_command_set_default.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_command_set_default.png deleted file mode 100644 index 1f89e9ec..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_command_set_default.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_config.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_config.png deleted file mode 100644 index 99aee80e..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_config.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_create.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_create.png deleted file mode 100644 index 246b25e2..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_create.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_download_app.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_download_app.png deleted file mode 100644 index ccb6608d..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_download_app.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_instance_list_manage.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_instance_list_manage.png deleted file mode 100644 index c7842590..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_instance_list_manage.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_list_instances.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_list_instances.png deleted file mode 100644 index 097ca812..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_list_instances.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_permissions_accept.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_permissions_accept.png deleted file mode 100644 index aa624edc..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_permissions_accept.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_permissions_select_account.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_permissions_select_account.png deleted file mode 100644 index 13a4bf33..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_permissions_select_account.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_permissions_success.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_permissions_success.png deleted file mode 100644 index e35fc720..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_permissions_success.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_select_platform.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_select_platform.png deleted file mode 100644 index 9659eccd..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_select_platform.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_select_team.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_select_team.png deleted file mode 100644 index dc020de3..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_select_team.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_team_connect.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_team_connect.png deleted file mode 100644 index 9473896a..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_team_connect.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_team_connect_success.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_team_connect_success.png deleted file mode 100644 index 53bb3ec3..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_team_connect_success.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_welcome_msg.png b/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_welcome_msg.png deleted file mode 100644 index 76dee224..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/cloud_teams_welcome_msg.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/teams_add_app.png b/versioned_docs/version-1.8/installation/teams/assets/teams_add_app.png deleted file mode 100644 index 43b22d05..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/teams_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/teams_add_app_info.png b/versioned_docs/version-1.8/installation/teams/assets/teams_add_app_info.png deleted file mode 100644 index 448ae69c..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/teams_add_app_info.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/teams_add_bot.png b/versioned_docs/version-1.8/installation/teams/assets/teams_add_bot.png deleted file mode 100644 index 3f386f4f..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/teams_add_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/teams_add_bot_endpoint.png b/versioned_docs/version-1.8/installation/teams/assets/teams_add_bot_endpoint.png deleted file mode 100644 index 3d4c9ede..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/teams_add_bot_endpoint.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/teams_add_bot_feature.png b/versioned_docs/version-1.8/installation/teams/assets/teams_add_bot_feature.png deleted file mode 100644 index a6594094..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/teams_add_bot_feature.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/teams_add_to_team.png b/versioned_docs/version-1.8/installation/teams/assets/teams_add_to_team.png deleted file mode 100644 index 94ff2cd2..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/teams_add_to_team.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/teams_ping.png b/versioned_docs/version-1.8/installation/teams/assets/teams_ping.png deleted file mode 100644 index d0cdfb2d..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/teams_ping.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/teams_publish_app.png b/versioned_docs/version-1.8/installation/teams/assets/teams_publish_app.png deleted file mode 100644 index f311389a..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/teams_publish_app.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/assets/teams_select_existing_bot.png b/versioned_docs/version-1.8/installation/teams/assets/teams_select_existing_bot.png deleted file mode 100644 index 383d5386..00000000 Binary files a/versioned_docs/version-1.8/installation/teams/assets/teams_select_existing_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/teams/index.md b/versioned_docs/version-1.8/installation/teams/index.md deleted file mode 100644 index 598f0fce..00000000 --- a/versioned_docs/version-1.8/installation/teams/index.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -id: teams -title: "Microsoft Teams" -sidebar_position: 5 ---- - -## Botkube app for Microsoft Teams - -The Botkube app for Microsoft Teams offers several advanced features: - -- Simplified installation into your Microsoft Teams workspace -- Multi-cluster executor support with a single Microsoft Teams app -- Manage Teams channels directly from the Botkube web app and ensure the Botkube bot is invited to the correct channels - -The Botkube app for Microsoft Teams uses Botkube's cloud services to manage channels and route source events and executor commands. Currently, it requires a manual side-loading of the app, but we are working on getting it listed in Microsoft AppSource. - -You can directly try Botkube app for Microsoft Teams for free by creating an account in the [Botkube Web App](https://app.botkube.io). Follow the steps below to install the app. - -## Prerequisites - -- A Botkube Cloud account. - - You can try out the Botkube app for Microsoft Teams for free by creating an account in the [Botkube Cloud app](https://app.botkube.io). - -## Create a Botkube Cloud Instance with Microsoft Teams - -### Connect Botkube Cloud to your Kubernetes cluster - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and click on `New Instance` button. - - ![New Instance](../assets/cloud_new_instance.png "Create new instance") - -1. Install Botkube Agent on your Kubernetes cluster by following the instructions on the page. - - ![Install Agent](../assets/cloud_install.png "Install Agent") - -1. Click `Add platform` dropdown, and select `Teams` option. - - ![Teams Platform Select](assets/cloud_teams_select_platform.png "Select Teams platform") - -Proceed with the next section. - -### Install Botkube app to your team - -1. Install Botkube app for Microsoft Teams from the official app catalog by clicking the `Install Botkube App for Teams` button. - - ![Install Botkube App for Microsoft Teams](assets/cloud_teams_download_app.png "Install Botkube App for Microsoft Teams") - - Alternatively, you can search for the "Botkube" app in the Microsoft Teams app catalog and click the **Add** button. - - ![Add Botkube App](assets/cloud_teams_add_app.png "Add Botkube App") - -1. Add the Botkube app to your team. - - 1. Click the **Add to a team** button. - - ![Add app to team](assets/cloud_teams_botkube_app_add.png "Add app to team") - - 1. Select the team and default channel, where you'll get the welcome message. - - ![Select a team](assets/cloud_teams_select_team.png "Select a team") - - 1. Click the **Set up a bot** button. - -Once the Botkube app is added to your team, you'll receive a welcome message. - -![Botkube Cloud Microsoft Teams Welcome Message](assets/cloud_teams_welcome_msg.png "Botkube Cloud Microsoft Teams welcome message") - -Proceed with the next section. - -### Grant permissions for Botkube app - -:::info -This step requires administrator permissions on your Microsoft Teams organization. Granting permissions is needed only once for the whole organization. -::: - -1. Click on the **Grant access** button. -1. Select your Microsoft account. - - ![Select account](assets/cloud_teams_permissions_select_account.png "Select account") - -1. Click the **Accept** button. - - ![Grant access](assets/cloud_teams_permissions_accept.png "Grant access") - -1. You will be redirected to the confirmation page. - - ![Confirmation page](assets/cloud_teams_permissions_success.png "Confirmation page") - -Close the page and proceed with the next section. - -### Connect your team to Botkube Cloud - -Go back to the Microsoft Teams app channel, where you received the welcome message. - -1. Click the **Connect to Botkube Cloud** button in the welcome message. -1. Log in to Botkube Cloud, if you haven't already. Ensure that you selected the correct organization, where you want to connect your team. -1. Click the **Connect** button. - - ![Connect to Botkube Cloud](assets/cloud_teams_team_connect.png "Connect to Botkube Cloud") - -1. You will see a confirmation page. - - ![Confirmation page](assets/cloud_teams_team_connect_success.png "Confirmation page") - -Close the page and proceed with the next section. - -### Finalize Botkube Cloud instance configuration - -Go back to the Botkube Cloud instance creation. - -1. In step 2, select your connected team and provide other details. - - - **Connected Microsoft Teams team:** Teams team that you connected in the previous section. - - **Display Name:** Display name of the Microsoft Teams team configuration. - - **Channels:** Teams channels where you can execute Botkube commands and receive notification. - - ![Botkube Cloud Instance Configuration](assets/cloud_teams_config.png "Botkube Cloud Instance Configuration") - -2. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Microsoft Teams Plugins](assets/cloud_teams_add_plugins.png "Microsoft Teams plugins") - -3. Include optional default command aliases and actions and click `Apply Changes` button to update Botkube Cloud instance. - - ![Microsoft Teams Create](assets/cloud_teams_create.png "Microsoft Teams create") - -## Using Botkube app for Microsoft Teams - -You can start using Botkube Cloud Microsoft Teams by typing `@Botkube cloud help` in one of the channels in the team you configured in one of the previous steps. - -![Botkube Cloud Microsoft Teams Command Help](assets/cloud_teams_command_help.png "Botkube Cloud Microsoft Teams command help") - -### Listing Cloud Instances - -You can list all your Botkube Cloud instances by typing `@Botkube cloud list` in the Microsoft Teams channel, or click the button `List connected instances` in the help command response. Besides the instance `name`, `ID`, and `status` in the list response, you can also click the `Get details` button to go to instance details on Botkube Cloud Dashboard. - -![Botkube Cloud Microsoft Teams List Instances](assets/cloud_teams_list_instances.png "Botkube Cloud Microsoft Teams list instances") - -### Setting Default Instance - -Once a Botkube command is executed, it will be handled on target Kubernetes cluster specified with `--cluster-name` flag. This is an optional flag, -where if you have not specified it, Botkube Cloud will select the first instance. However, you can also achieve setting default instance with command `@Botkube cloud set default-instance`. - -![Cloud Microsoft Teams Set Default Instances](assets/cloud_teams_command_set_default.png "Cloud Microsoft Teams set default instance") - -After this point, all of your commands will be executed on the default instance. Moreover, if you want to execute a command on all the target clusters, you can use `--all-clusters` flag. - -![Cloud Microsoft Teams All Clusters](assets/cloud_teams_command_all_clusters.png "Cloud Microsoft Teams all clusters") - -## Cleanup - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - - ![Cloud Teams Instance Manage](assets/cloud_teams_instance_list_manage.png "Cloud Microsoft Teams instances manage") - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Cloud Teams Instance Delete](../assets/cloud_instance_delete.png "Cloud Microsoft Teams instances delete") - -## Caveats - -### RBAC `ChannelName` mapping - -Same as other communication platforms, Botkube app for Microsoft Teams supports RBAC along with [all mappings](../../configuration/rbac.md#mapping-types). -However, because of the Microsoft Teams API limitation, for the default team channel the `ChannelName` is always `General`, regardless of the actual localized channel name. - -## Limitations - -Botkube app for Microsoft Teams currently doesn't support the following features yet: - -- Processing states from selected dropdowns, e.g., used for the `kubectl` command builder. In a result, the command builder is not available. -- Adding 👀 and ✅ reactions to messages indicating process status. - - This seems to be a limitation of the Microsoft Teams platform, however we'll investigate if there is a workaround. - -- Sending messages visible only to specific users. -- Replacing messages with new content, e.g., used for pagination. Currently, a new card is sent as a new message. -- User mentions in messages. Instead, Botkube app uses plaintext mentions with first and last name. diff --git a/versioned_docs/version-1.8/installation/webhook/assets/webhook_add_plugins.png b/versioned_docs/version-1.8/installation/webhook/assets/webhook_add_plugins.png deleted file mode 100644 index c4c4d54b..00000000 Binary files a/versioned_docs/version-1.8/installation/webhook/assets/webhook_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/webhook/assets/webhook_create.png b/versioned_docs/version-1.8/installation/webhook/assets/webhook_create.png deleted file mode 100644 index 1ec031e0..00000000 Binary files a/versioned_docs/version-1.8/installation/webhook/assets/webhook_create.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/webhook/assets/webhook_form.png b/versioned_docs/version-1.8/installation/webhook/assets/webhook_form.png deleted file mode 100644 index dd2d98cc..00000000 Binary files a/versioned_docs/version-1.8/installation/webhook/assets/webhook_form.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/webhook/assets/webhook_instance_delete.png b/versioned_docs/version-1.8/installation/webhook/assets/webhook_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.8/installation/webhook/assets/webhook_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/webhook/assets/webhook_instance_display_name.png b/versioned_docs/version-1.8/installation/webhook/assets/webhook_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.8/installation/webhook/assets/webhook_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/webhook/assets/webhook_platform_select.png b/versioned_docs/version-1.8/installation/webhook/assets/webhook_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.8/installation/webhook/assets/webhook_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/webhook/assets/webhook_summary.png b/versioned_docs/version-1.8/installation/webhook/assets/webhook_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.8/installation/webhook/assets/webhook_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.8/installation/webhook/cloud.md b/versioned_docs/version-1.8/installation/webhook/cloud.md deleted file mode 100644 index 59926126..00000000 --- a/versioned_docs/version-1.8/installation/webhook/cloud.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: webhook-cloud -title: "Outgoing webhook for Botkube Cloud" -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Webhook - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/webhook_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Webhook` option. - - ![Select Platform](assets/webhook_platform_select.png "Select platform") - -4. Fill in all required data in the form - - ![Form](assets/webhook_form.png "Form") - -5. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/webhook_add_plugins.png "Plugins") - -6. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/webhook_create.png "Create") - - :::note - If you don't include other platforms which use `Executor` plugins we recommend `default aliases` and `default actions` options unchecked - ::: - -7. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/webhook_summary.png "Summary") - -## Clean up - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/webhook_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.8/installation/webhook/index.md b/versioned_docs/version-1.8/installation/webhook/index.md deleted file mode 100644 index be2a3aa3..00000000 --- a/versioned_docs/version-1.8/installation/webhook/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: webhook -title: "Outgoing webhook" -sidebar_position: 7 ---- - -You can use Botkube to trigger your Webhook and send events. Learn how to configure Botkube to work with Webhook: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.8/installation/webhook/self-hosted.md b/versioned_docs/version-1.8/installation/webhook/self-hosted.md deleted file mode 100644 index 0be78b42..00000000 --- a/versioned_docs/version-1.8/installation/webhook/self-hosted.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: webhook-self-hosted -title: "Outgoing webhook for self-hosted Botkube" -slug: self-hosted -sidebar_position: 1 ---- - -## Install Botkube in Kubernetes cluster - -Botkube can be integrated with external apps via Webhooks. A webhook is essentially a POST request sent to a callback URL. So you can configure Botkube to send events on specified URL. - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export WEBHOOK_URL={url} - -botkube install --version v1.8.0 \ ---set communications.default-group.webhook.enabled=true \ ---set communications.default-group.webhook.url=${WEBHOOK_URL} \ ---set settings.clusterName=${CLUSTER_NAME} -``` - -where: - -- **WEBHOOK_URL** is an outgoing webhook URL to which Botkube will POST the events, -- **CLUSTER_NAME** is the cluster name set in the incoming messages. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.8/operation/_category_.json b/versioned_docs/version-1.8/operation/_category_.json deleted file mode 100644 index 7ae2cbda..00000000 --- a/versioned_docs/version-1.8/operation/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Operations", - "position": 9 -} diff --git a/versioned_docs/version-1.8/operation/common-problems.md b/versioned_docs/version-1.8/operation/common-problems.md deleted file mode 100644 index 0c927060..00000000 --- a/versioned_docs/version-1.8/operation/common-problems.md +++ /dev/null @@ -1,119 +0,0 @@ -# Common problems - -This document describes how to identify and resolve common Botkube problems that might occur. - -## Incompatible plugin API version - -**Symptoms** - -- Botkube agent Pod is restarting -- In [Botkube agent logs](diagnostics.mdx#agent-logs), you see such entry: - - ```text - while running application: while waiting for goroutines to finish gracefully: 1 error occurred: - * while starting plugins manager: while creating executor plugins: Incompatible API version with plugin. Plugin version: 2, Client versions: [1] - ``` - -**Debugging steps** - -- [Check Botkube agent version](diagnostics.mdx#agent-version). - -- [Check plugin repository version](diagnostics.mdx#check-configured-plugin-repositories). - -**Solution** - -In order to fix the problem, you need to make sure that the agent version is the same as the plugin repository version. For example, for agent image `ghcr.io/kubeshop/botkube:v1.5.0` you need to configure official plugin repository in version `v1.5.0`: `https://github.com/kubeshop/botkube/releases/download/v1.5.0/plugins-index.yaml`. -To change the repository URL, run: - -```bash -helm upgrade botkube botkube/botkube -n botkube --reuse-values --set plugins.repositories.botkube.url="https://github.com/kubeshop/botkube/releases/download/v1.5.0/plugins-index.yaml" -``` - -## Helm chart loading error - -**Symptoms** - -- You encounter the following errors when running the `botkube install` command: - - ```text - Error: while loading Helm chart: Chart.yaml file is missing - ``` - - or - - ```text - Error: while loading Helm chart: file 'botkube' does not appear to be a gzipped archive; got 'application/octet-stream' - ``` - -**Solution** - -If you're experiencing these errors, it means that there is a conflict with a file or directory named `botkube` in the location where you executed the `botkube install` command. To resolve this issue, follow these steps: - -1. **rename or remove 'botkube':** You cannot have a file or directory named `botkube` in the same location where you are trying to install Botkube. You should either rename or remove the conflicting `botkube` file or directory. - -2. **Change Directory:** Alternatively, you can navigate to a different directory in your command line interface before executing the `botkube install` command. Ensure that the directory where you run the command does not contain any conflicting `botkube` files or directories. - -## Network connections - -Botkube can work in private clusters where inbound connections are limited. However, you need to allow outgoing connections to all configured plugin repositories and API endpoints, depending on the communication platform you intend to use. - -### Botkube official plugins - -The official Botkube plugin index and binaries are hosted on [GitHub releases](https://github.com/kubeshop/botkube/releases). For instance, for the version `v1.5.0` the following URLs are used: - -- Plugin index URL: https://github.com/kubeshop/botkube/releases/download/v1.5.0/plugins-index.yaml -- Helm plugin binary for `linux/amd64`: https://github.com/kubeshop/botkube/releases/download/v1.5.0/executor_helm_linux_amd64.tar.gz - -As a result, you need to allow outbound connections for Botkube to successfully download GitHub assets. - -Additionally, each plugin may define additional dependencies that the [plugin manager](../architecture/index.md#plugin-manager) downloads on startup. For example, the Helm plugin for `linux/amd64` requires `https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz`. -To learn more about all URLs that need to be accessible, you can download a plugin index and check all plugin definitions that you want to enable. - -### Socket Slack - -For the Slack communication platform, we use the [Socket mode](https://api.slack.com/apis/connections/socket) approach. -In order to make this integration work, you need to allow all Slack API URLs defined under https://my.slack.com/help/urls, especially: - -- api.slack.com -- upload.slack.com -- universal-upload-edge.slack.com -- global-upload-edge.slack.com -- wss://wss-backup.slack.com -- wss://wss-mobile.slack.com -- wss://wss-primary.slack.com - -Visit [Slack official guide](https://slack.com/help/articles/360001603387-Manage-Slack-connection-issues#network-settings) for troubleshooting your Slack connection. - -### Cloud Slack - -Cloud Slack integration communicates via gRPC with the Botkube control-plane. In order to make this integration work, you need to allow access to `api.botkube.io`. - -## Plugin's permissions - -If you experience problems while configuring RBAC (Role-Based Access Control) for plugins, you can refer to the [troubleshooting](../configuration/rbac.md#troubleshooting) guide for assistance. - -## I can't see my Slack private channels in Cloud Dashboard - -To comply with Slack's privacy policy, private channels won't be visible until you create a public alias for the respective channel. Refer to the provided instructions for guidance on completing this process: [Setting Public Alias for Private Channels](../installation/slack/cloud-slack#setting-public-alias-for-private-channels) - -## Air-Gap installation - -**Please note that we do not support air-gap installations.** However, here are some suggestions that you may find helpful: - -- Mirror Botkube images to your private registry: - - - [`ghcr.io/kubeshop/botkube:{botkube_version}`](https://github.com/kubeshop/botkube/pkgs/container/botkube), e.g., `ghcr.io/kubeshop/botkube:v1.5.0` - - [`ghcr.io/kubeshop/k8s-sidecar:in-cluster-config`](https://github.com/orgs/kubeshop/packages/container/package/k8s-sidecar) - -- During startup, Botkube downloads repository indexes and all enabled plugins. All of them are stored under the `/tmp` folder. To ensure that the [plugin manager](../architecture/index.md#plugin-manager) does not make external calls, all required plugins must be present. You can achieve this by mounting a Persistent Volume Claim (PVC) at this path. By default, we use [`emptyDir`](https://github.com/kubeshop/botkube/blob/9d0627794078d519987309271b64c94047cd65d9/helm/botkube/templates/deployment.yaml#L176-L177). Later, you can mount your Persistent Volume (PV) with cached plugins in your air-gapped environment. - -- Select a communication platform that can be installed in the air-gapped environment, such as [Mattermost](../installation/mattermost/index.md). - -## Others - -Having trouble finding a solution to your problem? No problem at all! We will help you to get your Botkube up and running. First, follow these steps: - -1. [Export the Botkube agent configuration](diagnostics.mdx#agent-configuration) -2. [Export the Botkube agent logs](diagnostics.mdx#agent-logs) - -After that, come join our Slack community workspace at https://join.botkube.io. Head over to the [`#helping-hands`](https://slack.com/app_redirect?team=TG7TTBLJ0&channel=helping-hands) channel and share the assets you exported along with a description of your issue. Our team is ready to assist you! diff --git a/versioned_docs/version-1.8/operation/diagnostics.mdx b/versioned_docs/version-1.8/operation/diagnostics.mdx deleted file mode 100644 index 33810004..00000000 --- a/versioned_docs/version-1.8/operation/diagnostics.mdx +++ /dev/null @@ -1,157 +0,0 @@ -# Basic diagnostics - -Here you can find the list of basic diagnostic actions that may help you look for bug causes. - -In order to run the suggested commands, make sure that you have installed: - -- [`helm`](https://helm.sh/docs/intro/install/) -- [`kubectl`](https://kubernetes.io/docs/tasks/tools/) - -## Agent - -This section describes [Botkube agent](../architecture/index.md) related diagnostic. - -### Agent version - -The easiest way to check the Agent version is to get the Docker image: - -```bash -kubectl get deploy botkube -n botkube -o=jsonpath="{'Used images\n'}{range .spec.template.spec.containers[*]}{.name}{':\t'}{.image}{'\n'}{end}" -``` - -You should get an output similar to this: - -```bash -Used images -botkube: ghcr.io/kubeshop/botkube:v1.5.0 -cfg-watcher: ghcr.io/kubeshop/k8s-sidecar:in-cluster-config -``` - -The `botkube` is the agent image. The container image tag (`v1.5.0`) is the version in which it was deployed on the cluster. - -### Agent health - -To check if the Agent Pods are in the `Running` state, run: - -```bash -kubectl get pod -n botkube -l app=botkube -``` - -All the containers from Pods should be in the `Running` status. Restarts' number higher than one may also indicate problems, e.g. not enough resource, lack of permissions, network timeouts, etc. - -### Agent logs - -If the Botkube Agent is [healthy](#agent-health), you should be able to track any bug by checking the logs. To check the logs, run: - -```bash -kubectl logs -n botkube -l app=botkube -c botkube -``` - -To get all logs specify `--tail=-1`, otherwise only 10 last lines are displayed. - -To check the logs since a given time, use the `--since-time` or `--since` flag, for example: - -```bash ---since-time=2020-03-30T10:02:08Z -``` - -```bash ---since=3h -``` - -### Agent configuration - -Select a tab to use a tool of your choice for getting Botkube configuration: - - - - -:::note -The `botkube config get` command is available from the `v1.4.0` version. -::: - -Install [Botkube CLI](../cli/getting-started.mdx#installation) and run: - -```bash -botkube config get > /tmp/bk-config.yaml -``` - - - - - -1. Download export-config-job-tpl definition into `/tmp/export-config-job-tpl`. -2. Make sure that the previous job is deleted: - ```bash - kubectl delete job botkube-migration -n botkube - ``` -3. Run a new export config Job based on the configuration from installed Botkube deployment: - ```bash - kubectl get deploy botkube -n botkube -o=go-template-file=/tmp/export-config-job-tpl | kubectl create -f - - ``` -4. Get configuration data: - ```bash - kubectl get cm botkube-config-exporter -ojsonpath='{ .data.config\.yaml }' - ``` - - - - - -### Agent restart - -When Pods are unhealthy, or if the operation processing is stuck, you can restart the Pod using this command: - -``` -kubectl delete po -n botkube -l app=botkube -``` - -### Agent debug logging - -In order to change the logging level to `debug`, run: - -```bash -helm upgrade botkube botkube/botkube -n botkube --set settings.log.level="debug" --reuse-values -``` - -If the Botkube agent Pod isn't restarted automatically, [restart it manually](#agent-restart). - -### Check configured plugin repositories - -Select a tab to use a tool of your choice for checking plugin repository configuration: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -Install [`yq`](https://github.com/mikefarah/yq) and run: - -```bash -helm get values botkube --all -oyaml | yq '.plugins' -``` - - - - - -Install [`jq`](https://stedolan.github.io/jq/download/) and run: - -```bash -helm get values botkube --all -ojson | jq '{ plugins }' -``` - - - - - -```bash -helm get values botkube --all -oyaml | grep -A 10 'plugins:' -``` - -The output may contain more occurrence of a plugin section, so you need to fine the one that has the `repositories` defined. - - - - diff --git a/versioned_docs/version-1.8/plugin/assets/btns-desc.png b/versioned_docs/version-1.8/plugin/assets/btns-desc.png deleted file mode 100644 index 214135f4..00000000 Binary files a/versioned_docs/version-1.8/plugin/assets/btns-desc.png and /dev/null differ diff --git a/versioned_docs/version-1.8/plugin/assets/btns-inline.png b/versioned_docs/version-1.8/plugin/assets/btns-inline.png deleted file mode 100644 index caf54e14..00000000 Binary files a/versioned_docs/version-1.8/plugin/assets/btns-inline.png and /dev/null differ diff --git a/versioned_docs/version-1.8/plugin/assets/demo-msg.gif b/versioned_docs/version-1.8/plugin/assets/demo-msg.gif deleted file mode 100644 index c6aeaf31..00000000 Binary files a/versioned_docs/version-1.8/plugin/assets/demo-msg.gif and /dev/null differ diff --git a/versioned_docs/version-1.8/plugin/assets/echo-demo.gif b/versioned_docs/version-1.8/plugin/assets/echo-demo.gif deleted file mode 100644 index d8accb06..00000000 Binary files a/versioned_docs/version-1.8/plugin/assets/echo-demo.gif and /dev/null differ diff --git a/versioned_docs/version-1.8/plugin/assets/ticker-demo.gif b/versioned_docs/version-1.8/plugin/assets/ticker-demo.gif deleted file mode 100644 index c4ba4b84..00000000 Binary files a/versioned_docs/version-1.8/plugin/assets/ticker-demo.gif and /dev/null differ diff --git a/versioned_docs/version-1.8/plugin/assets/use-tpl.png b/versioned_docs/version-1.8/plugin/assets/use-tpl.png deleted file mode 100644 index 7d64b5fa..00000000 Binary files a/versioned_docs/version-1.8/plugin/assets/use-tpl.png and /dev/null differ diff --git a/versioned_docs/version-1.8/plugin/custom-executor.md b/versioned_docs/version-1.8/plugin/custom-executor.md deleted file mode 100644 index 75289b8a..00000000 --- a/versioned_docs/version-1.8/plugin/custom-executor.md +++ /dev/null @@ -1,260 +0,0 @@ ---- -id: custom-executor -title: "Custom executor" -sidebar_position: 2 ---- - -You can extend Botkube functionality by writing custom executor plugin. An executor allows you to run a given command directly in the chat window of each communication platform. For example, running `kubectl` or `helm` commands. - -Plugin executor is a binary that implements the [executor](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) Protocol Buffers contract. - -## Goal - -This tutorial shows you how to build a custom `echo` executor that responds with a command that was specified by the user in a chat window. - -![echo-demo](./assets/echo-demo.gif) - -For a final implementation, see the [Botkube template repository](./quick-start.md). - -## Prerequisites - -- Basic understanding of the Go language. -- [Go](https://golang.org/doc/install) at least 1.18. - - See [go.mod](https://github.com/kubeshop/botkube/blob/main/go.mod#L1) for the recommended version used by Botkube team. -- [GoReleaser](https://goreleaser.com/) at least 1.13. - -### Develop plugin business logic - -1. Create an executor plugin directory: - - ```bash - mkdir botkube-plugins && cd botkube-plugins - ``` - -2. Initialize the Go module: - - ```bash - go mod init botkube-plugins - ``` - -3. Create the `main.go` file for the `echo` executor with the following template: - - ```go - cat << EOF > main.go - package main - - import ( - "context" - "fmt" - - "github.com/MakeNowJust/heredoc" - "github.com/hashicorp/go-plugin" - "github.com/kubeshop/botkube/pkg/api" - "github.com/kubeshop/botkube/pkg/api/executor" - ) - - // EchoExecutor implements the Botkube executor plugin interface. - type EchoExecutor struct{} - - func main() { - executor.Serve(map[string]plugin.Plugin{ - "echo": &executor.Plugin{ - Executor: &EchoExecutor{}, - }, - }) - } - EOF - ``` - - This template code imports required packages and registers `EchoExecutor` as the gRPC plugin. At this stage, the `EchoExecutor` service doesn't implement the required [Protocol Buffers](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) contract. We will add the required methods in the next steps. - -4. Download imported dependencies: - - ```bash - go mod tidy - ``` - -5. Add the required `Metadata` method: - - ```go - // Metadata returns details about the Echo plugin. - func (*EchoExecutor) Metadata(context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - Version: "1.0.0", - Description: "Echo sends back the command that was specified.", - JSONSchema: api.JSONSchema{ - Value: heredoc.Doc(`{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "echo", - "description": "Example echo plugin", - "type": "object", - "properties": { - "formatOptions": { - "description": "Options to format echoed string", - "type": "array", - "items": { - "type": "string", - "enum": [ "bold", "italic" ] - } - } - }, - "additionalProperties": false - }`), - }, - }, nil - } - ``` - - The `Metadata` method returns basic information about your plugin. This data is used when the plugin index is generated in an automated way. You will learn more about that in the next steps. - - Ąs a part of the `Metadata` method, you can define the plugin dependencies. To learn more about them, see the [Dependencies](./dependencies.md) document. - -6. Add the required `Execute` method: - - ```go - // Execute returns a given command as a response. - func (*EchoExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - return executor.ExecuteOutput{ - Message: api.NewCodeBlockMessage(response, true), - }, nil - } - ``` - - The `Execute` method is the heart of your executor plugin. This method runs your business logic and returns the execution output. Next, the Botkube core sends back the response to a given communication platform. - If the communication platform supports interactivity, you can construct and return interactive messages containing buttons, dropdowns, input text, and more complex formatting. To learn more about it, see the [Interactive Messages](./interactivity.md) guide. - - For each `Execute` method call, Botkube attaches the list of associated configurations. You will learn more about that in the [**Passing configuration to your plugin**](#passing-configuration-to-your-plugin) section. - -7. Add the required `Help` method: - - ```go - // Help returns help message - func (EchoExecutor) Help(context.Context) (api.Message, error) { - btnBuilder := api.NewMessageButtonBuilder() - return api.Message{ - Sections: []api.Section{ - { - Base: api.Base{ - Header: "Run `echo` commands", - Description: description, - }, - Buttons: []api.Button{ - btnBuilder.ForCommandWithDescCmd("Run", "echo 'hello world'"), - }, - }, - }, - }, nil - } - ``` - - You can use `api.NewCodeBlockMessage` or `api.NewPlaintextMessage` helper functions, or construct your own message. - -## Build plugin binaries - -Now 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 your needs. - -:::note -Instead of GoReleaser, you can use another tool of your choice. -::: - -1. Create the GoReleaser configuration file: - - ```yaml - cat << EOF > .goreleaser.yaml - project_name: botkube-plugins - before: - hooks: - - go mod download - - builds: - - id: echo - binary: executor_echo_{{ .Os }}_{{ .Arch }} - - no_unique_dist_dir: true - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - goarch: - - amd64 - - arm64 - goarm: - - 7 - - snapshot: - name_template: 'v{{ .Version }}' - EOF - ``` - -2. Build the binaries: - - ```bash - goreleaser build --rm-dist --snapshot - ``` - -Congrats! You just created your first Botkube executor plugin! :tada: - -Now it's time to [test it locally with Botkube](local-testing.md). Once you're done testing, see how to [distribute it](repository.md). - -## Passing configuration to your plugin - -Sometimes your executor plugin requires a configuration specified by the end-user. Botkube supports such requirement and provides an option to specify plugin configuration under `config`. An example Botkube configuration looks like this: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - name: "all-teams" - bindings: - executors: - - echo-team-a - - echo-team-b - -executors: - "echo-team-a": # executor configuration group name - botkube/echo: - enabled: true - config: - formatOptions: ["italic"] - "echo-team-b": # executor configuration group name - botkube/echo: - enabled: true - config: - formatOptions: ["bold"] -``` - -This means that two different `botkube/echo` plugin configurations were bound to the `all-teams` Slack channel. Under `executor.ExecuteInput{}.Configs`, you will find the list of configurations in the YAML format as specified under the `config` property for each bound and enabled executor. The order of the configuration is the same as specified under the `bindings.executors` property. It's up to the plugin author to merge the passed configurations. You can use our helper function from the plugin extension package (`pluginx`). - -```go -import ( - "context" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -// Config holds the executor configuration. -type Config struct { - FormatOptions []string `yaml:"options,omitempty"` -} - -func (EchoExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - var cfg Config - err := pluginx.MergeExecutorConfigs(in.Configs, &cfg) - if err != nil { - return executor.ExecuteOutput{}, err - } - // rest logic -} -``` - -:::caution -Botkube starts only one process of a given executor plugin, and the list of configuration YAMLs can be different per gRPC call, so you shouldn't cache the merged configuration. -::: - -## Notes - -- Streaming command response is not supported. As a result, commands like `helm install --wait` doesn't work well, as the response won't be sent until the command finishes. It's recommended to return the response as soon as possible. -- The interactive message is not yet supported. diff --git a/versioned_docs/version-1.8/plugin/custom-source.md b/versioned_docs/version-1.8/plugin/custom-source.md deleted file mode 100644 index 9107a8d0..00000000 --- a/versioned_docs/version-1.8/plugin/custom-source.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -id: custom-source -title: "Custom source" -sidebar_position: 3 ---- - -You can extend Botkube functionality by writing custom source plugin. A source allows you to get asynchronous streaming of domain-specific events. For example, streaming Kubernetes or Prometheus events . - -Source is a binary that implements the [source](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) Protocol Buffers contract. - -## Goal - -This tutorial shows you how to build a custom `ticker` source that emits an event at a specified interval. - -![ticker-demo](./assets/ticker-demo.gif) - -For a final implementation, see the [Botkube template repository](./quick-start.md). - -## Prerequisites - -- Basic understanding of the Go language. -- [Go](https://golang.org/doc/install) at least 1.18. - - See [go.mod](https://github.com/kubeshop/botkube/blob/main/go.mod#L1) for the recommended version used by Botkube team. -- [GoReleaser](https://goreleaser.com/) at least 1.13. - -### Develop plugin business logic - -1. Create a source plugin directory: - - ```bash - mkdir botkube-plugins && cd botkube-plugins - ``` - -2. Initialize the Go module: - - ```bash - go mod init botkube-plugins - ``` - -3. Create the `main.go` file for the `ticker` source with the following template: - - ```go - cat << EOF > main.go - package main - - import ( - "context" - "fmt" - "time" - - "github.com/hashicorp/go-plugin" - "github.com/kubeshop/botkube/pkg/api" - "github.com/kubeshop/botkube/pkg/api/source" - "gopkg.in/yaml.v3" - ) - - // Config holds source configuration. - type Config struct { - Interval time.Duration - } - - // Ticker implements the Botkube source plugin interface. - type Ticker struct{} - - func main() { - source.Serve(map[string]plugin.Plugin{ - "ticker": &source.Plugin{ - Source: &Ticker{}, - }, - }) - } - EOF - ``` - - This template code imports required packages and registers `Ticker` as the gRPC plugin. At this stage, the `Ticker` service doesn't implement the required [Protocol Buffers](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) contract. We will add the required methods in the next steps. - -4. Download imported dependencies: - - ```bash - go mod tidy - ``` - -5. Add the required `Metadata` method: - - ```go - // Metadata returns details about the Ticker plugin. - func (Ticker) Metadata(_ context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - Version: "0.1.0", - Description: "Emits an event at a specified interval.", - }, nil - } - ``` - - The `Metadata` method returns basic information about your plugin. This data is used when the plugin index is generated in an automated way. You will learn more about that in the next steps. - - Ąs a part of the `Metadata` method, you can define the plugin dependencies. To learn more about them, see the [Dependencies](./dependencies.md) document. - -6. Add the required `Stream` method: - - ```go - // Stream sends an event after configured time duration. - func (Ticker) Stream(ctx context.Context, in source.StreamInput) (source.StreamOutput, error) { - cfg, err := mergeConfigs(in.Configs) - if err != nil { - return source.StreamOutput{}, err - } - - ticker := time.NewTicker(cfg.Interval) - out := source.StreamOutput{ - Event: make(chan source.Event), - } - - go func() { - for { - select { - case <-ctx.Done(): - ticker.Stop() - case <-ticker.C: - out.Event <- source.Event{ - Message: api.NewPlaintextMessage("Ticker Event", true), - } - } - } - }() - - return out, nil - } - - // mergeConfigs merges all input configuration. In our case we don't have complex merge strategy, - // the last one that was specified wins :) - func mergeConfigs(configs []*source.Config) (Config, error) { - // default config - finalCfg := Config{ - Interval: time.Minute, - } - - for _, inputCfg := range configs { - var cfg Config - err := yaml.Unmarshal(inputCfg.RawYAML, &cfg) - if err != nil { - return Config{}, fmt.Errorf("while unmarshalling YAML config: %w", err) - } - - if cfg.Interval != 0 { - finalCfg.Interval = cfg.Interval - } - } - - return finalCfg, nil - } - ``` - - The `Stream` method is the heart of your source plugin. This method runs your business logic and push events into the `out.Output` channel. Next, the Botkube core sends the event to a given communication platform. - - The `Stream` method is called only once. Botkube attaches the list of associated configurations. You will learn more about that in the [**Passing configuration to your plugin**](#passing-configuration-to-your-plugin) section. - -7. Implement `HandleExternalRequest` method: - - Plugins can handle external requests from Botkube incoming webhook. Any external system can call the webhook and trigger a given source plugin. By default, the path of the incoming webhook is `http://botkube.botkube.svc.cluster.local:2115/sources/v1/{sourceName}` and it supports POST requests in JSON payload format. - - - If you don't want to handle external events from incoming webhook, simply nest the `source.HandleExternalRequestUnimplemented` under your struct: - - ```go - // Ticker implements the Botkube executor plugin interface. - type Ticker struct { - // specify that the source doesn't handle external requests - source.HandleExternalRequestUnimplemented - } - ``` - - - To handle such requests, you need to implement the `HandleExternalRequest` method. In this case, the `message` property from payload is outputted to the bound communication platforms: - - ```go - // HandleExternalRequest handles incoming payload and returns an event based on it. - func (Forwarder) HandleExternalRequest(_ context.Context, in source.ExternalRequestInput) (source.ExternalRequestOutput, error) { - var p payload - err := json.Unmarshal(in.Payload, &p) - if err != nil { - return source.ExternalRequestOutput{}, fmt.Errorf("while unmarshaling payload: %w", err) - } - - if p.Message == "" { - return source.ExternalRequestOutput{}, fmt.Errorf("message cannot be empty") - } - - msg := fmt.Sprintf("*Incoming webhook event:* %s", p.Message) - return source.ExternalRequestOutput{ - Event: source.Event{ - Message: api.NewPlaintextMessage(msg, true), - }, - }, nil - } - ``` - -## Build plugin binaries - -Now it's time to build your plugin. For that purpose we will use GoReleaser. It simplifies building Go binaries for different architectures. - -:::note -Instead of GoReleaser, you can use another tool of your choice. The important thing is to produce the binaries for the architecture of the host platform where Botkube is running. -::: - -1. Create the GoReleaser configuration file: - - ```yaml - cat << EOF > .goreleaser.yaml - project_name: botkube-plugins - before: - hooks: - - go mod download - - builds: - - id: ticker - binary: source_ticker_{{ .Os }}_{{ .Arch }} - - no_unique_dist_dir: true - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - goarch: - - amd64 - - arm64 - goarm: - - 7 - - snapshot: - name_template: 'v{{ .Version }}' - EOF - ``` - -2. Build the binaries: - - ```bash - goreleaser build --rm-dist --snapshot - ``` - -Congrats! You just created your first Botkube source plugin! :tada: - -Now it's time to [test it locally with Botkube](local-testing.md). Once you're done testing, see how to [distribute it](repository.md). - -## Passing configuration to your plugin - -Sometimes your source plugin requires a configuration specified by the end-user. Botkube supports such requirement and provides an option to specify plugin configuration under `config`. An example Botkube configuration looks like this: - -```yaml -communications: - "default-group": - slack: - channels: - "default": - name: "all-teams" - bindings: - sources: - - ticker-team-a - - ticker-team-b - -sources: - "ticker-team-a": - botkube/ticker: - enabled: true - config: - interval: 1s - "ticker-team-b": - botkube/ticker: - enabled: true - config: - interval: 2m -``` - -This means that two different `botkube/ticker` plugin configurations were bound to the `all-teams` Slack channel. For each bound configuration [Botkube source dispatcher](../architecture/index.md#plugin-source-bridge) calls `Stream` method with the configuration specified under the `bindings.sources` property. diff --git a/versioned_docs/version-1.8/plugin/debug.md b/versioned_docs/version-1.8/plugin/debug.md deleted file mode 100644 index 1f2a8de0..00000000 --- a/versioned_docs/version-1.8/plugin/debug.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: debugging -title: "Debugging" -sidebar_position: 10 ---- - -Embedded logging allows you to access more information about the runtime operations of Botkube plugins. - -By default: - -- the gRPC client log level is set to `info`, -- the standard error ([`stderr`]()) of a plugin binary is logged at `error` level, -- the standard output ([`stdout`]()) of a plugin binary is ignored. - -To change the default log level, export a dedicated environment variable following this pattern `LOG_LEVEL_{pluginType}_{pluginRepo}_{pluginName}`, e.g., `LOG_LEVEL_EXECUTOR_BOTKUBE_KUBECTL`. The possible log level values are: - -- `trace` -- `debug` -- `info` -- `warning` -- `error` -- `fatal` -- `panic` - -The plugin standard output is logged only if `debug` level is set. - -:::info -The plugin name is normalized and all characters different from letters, digits, and the underscore (`_`) are replaced with underscore (`_`). -::: - -To change the log level for a given plugin directly in the Botkube deployment, specify `extraEnv` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. For example: - -```yaml -extraEnv: - - name: LOG_LEVEL_EXECUTOR_BOTKUBE_HELM - value: "debug" -``` diff --git a/versioned_docs/version-1.8/plugin/dependencies.md b/versioned_docs/version-1.8/plugin/dependencies.md deleted file mode 100644 index f60c50e1..00000000 --- a/versioned_docs/version-1.8/plugin/dependencies.md +++ /dev/null @@ -1,104 +0,0 @@ ---- -id: dependencies -title: "Dependencies" -sidebar_position: 6 ---- - -Plugins can depend on other binaries, which are then downloaded by Botkube along with a given plugin. This is supported for both executor and source plugins. - -## Define dependencies for plugin index generation - -As a part of the `Metadata` method, define the `Dependencies` property. The key is the name of the dependency, and the value is a structure with links to binaries for each platform. - -:::info -For downloading plugins and theirs dependencies, Botkube uses `go-getter` library. It supports multiple URL formats (such as HTTP, Git repositories or S3), and is able to unpack archives and extract binaries from them. For more details, see the documentation on the [`go-getter`](https://github.com/hashicorp/go-getter) GitHub repository. -::: - -```go -// Metadata returns details about Helm plugin. -func (e *Executor) Metadata(context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - // ... - Dependencies: map[string]api.Dependency{ - "helm": { - // Links source: https://github.com/helm/helm/releases/tag/v3.6.3 - // Using go-getter syntax to unwrap the underlying directory structure. - // Read more on https://github.com/hashicorp/go-getter#subdirectories - URLs: map[string]string{ - "darwin/amd64": "https://get.helm.sh/helm-v3.6.3-darwin-amd64.tar.gz//darwin-amd64", - "darwin/arm64": "https://get.helm.sh/helm-v3.6.3-darwin-arm64.tar.gz//darwin-arm64", - "linux/amd64": "https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz//linux-amd64", - "linux/arm": "https://get.helm.sh/helm-v3.6.3-linux-arm.tar.gz//linux-arm", - "linux/arm64": "https://get.helm.sh/helm-v3.6.3-linux-arm64.tar.gz//linux-arm64", - "linux/386": "https://get.helm.sh/helm-v3.6.3-linux-386.tar.gz//linux-386", - "linux/ppc64le": "https://get.helm.sh/helm-v3.6.3-linux-ppc64le.tar.gz//linux-ppc64le", - "linux/s390x": "https://get.helm.sh/helm-v3.6.3-linux-s390x.tar.gz//linux-s390x", - "windows/amd64": "https://get.helm.sh/helm-v3.6.3-windows-amd64.zip//windows-amd64", - } - }, - }, - }, nil -} -``` - -Such a definition will result in the following `dependencies` section in the plugin index: - -```yaml -- name: helm - # ... - urls: - - url: "..." # URL to darwin/amd64 plugin binary - platform: - os: darwin - architecture: amd64 - dependencies: - helm: - url: https://get.helm.sh/helm-v3.6.3-darwin-amd64.tar.gz//darwin-amd64 - - url: "..." # URL to darwin/amd64 plugin binary - platform: - os: darwin - architecture: arm64 - dependencies: - helm: - url: https://get.helm.sh/helm-v3.6.3-darwin-arm64.tar.gz//darwin-arm64 - - url: "..." # URL to linux/amd64 plugin binary - platform: - os: linux - architecture: amd64 - dependencies: - helm: - url: https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz//linux-amd64 - - url: "..." # URL to linux/arm64 plugin binary - platform: - os: linux - architecture: arm64 - dependencies: - helm: - url: https://get.helm.sh/helm-v3.6.3-linux-arm64.tar.gz//linux-arm64 -``` - -Read how to use the plugin index in the [Repository](./repository.md) document. - -## Using dependencies - -During Botkube startup, Botkube plugin manager fetches the plugin binaries along with all dependencies. Each dependency binary is named exactly as specified in the [plugin index](#define-dependencies-for-plugin-index-generation). The dependency is fetched to a directory specified in the `PLUGIN_DEPENDENCY_DIR` environment variable passed to the plugin. - -For example, in case of Helm executor, to run the Helm binary fetched by Botkube plugin manager, the plugin uses the following code: - -```go - commandName := "helm" // name of the binary specified in Dependencies - // Check if PLUGIN_DEPENDENCY_DIR environment variable is set; if not, Go will try to lookup for `helm` binary - depDir, found := os.LookupEnv("PLUGIN_DEPENDENCY_DIR") - if found { - // Use exactly the binary from the $PLUGIN_DEPENDENCY_DIR directory - commandName = fmt.Sprintf("%s/%s", depDir, commandName) - } - - // Execute the command and return output - cmd := exec.CommandContext(ctx, commandName, args...) - out, err := cmd.CombinedOutput() -``` - -## Example - -To get familiar with the full example, see the [Helm plugin](https://github.com/kubeshop/botkube/tree/main/cmd/executor/helm) in the Botkube repository. The Helm plugin depends on the official [Helm CLI](https://helm.sh) binary, which is defined as a part of the `Metadata` method. diff --git a/versioned_docs/version-1.8/plugin/index.md b/versioned_docs/version-1.8/plugin/index.md deleted file mode 100644 index 4cb341bd..00000000 --- a/versioned_docs/version-1.8/plugin/index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -id: plugin -title: "Plugin Development" -sidebar_position: 6 ---- - -The Botkube plugin system allows you to extend the Botkube core with custom logic. For example, call or receive events from third-party services. - -To learn more about the Botkube plugin system, follow the recommended steps: - -- Get familiar with the Botkube [architecture](../architecture). -- Enable and configure the [Helm](../configuration/executor/helm.md) executor. -- Use the [template repository](./quick-start.md). -- Learn how to develop a custom [executor](custom-executor.md) or [source](custom-source.md) plugin. -- [Distribute the plugins](repository.md) that you built. - -Share feedback with us via [Slack](https://join.botkube.io/) or [GitHub](https://github.com/kubeshop/botkube/issues)! diff --git a/versioned_docs/version-1.8/plugin/interactivity.md b/versioned_docs/version-1.8/plugin/interactivity.md deleted file mode 100644 index 8b2bd964..00000000 --- a/versioned_docs/version-1.8/plugin/interactivity.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -id: interactive-messages -title: "Interactive messages" -sidebar_position: 5 ---- - -Some of our communication platforms support interactive messages. If interactivity is supported the `IsInteractivitySupported` property under source or execution context is set to **true**. - -In this guide, we describe how interactivity applies to messages, and show you how to build ones. - -:::tip -For an example implementation, see the [`msg` executor source-code](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/msg/main.go). -::: - -![demo](./assets/demo-msg.gif) - -## Primitives - -You can construct and return interactive messages containing buttons, dropdowns, input text, and more complex formatting. For that reason, we introduced a generic `api.Messages` model. - -- [Buttons](#buttons) -- [Dropdowns](#dropdowns) -- [Input text](#input-text-fields) - -For all primitives you need to attach the proper command that will be executed by Botkube. The pattern is: - -```go -import "github.com/kubeshop/botkube/pkg/api" - -command := api.MessageBotNamePlaceholder + " " + " " -``` - -The `api.MessageBotNamePlaceholder` constant, is our cross-platform placeholder that is replaced by Botkube core with a proper bot name. It's mandatory, otherwise Botkube core will ignore a given command, e.g. a button click. - -The `` and `` should be replaced based on your needs. You replace `` with your own plugin name, or other plugin name, like `kubectl`, `helm`, etc. However, if you use other plugin name, a given command won't work if plugin is not enabled. - -### Buttons - -You can define a list of buttons under `Section` object. To construct a given button you can use our helper `api.NewMessageButtonBuilder` builder. For example: - -```go -const pluginName = "msg" - -btnBuilder := api.NewMessageButtonBuilder() - -msg := api.Message{ - Sections: []api.Section{ - { - Buttons: []api.Button{ - btnBuilder.ForCommandWithDescCmd("Run act1", fmt.Sprintf("%s buttons act1", pluginName)), - btnBuilder.ForCommandWithDescCmd("Run act2", fmt.Sprintf("%s buttons act2", pluginName), api.ButtonStylePrimary), - btnBuilder.ForCommandWithDescCmd("Run act3", fmt.Sprintf("%s buttons act3", pluginName), api.ButtonStyleDanger), - }, - }, - }, -} -``` - -When a button is clicked, Botkube runs an associated command. For **Run act1** it's `msg buttons act1`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -If you use only `ForCommandWithoutDesc`, all buttons are render in the same line. -![btns-desc](./assets/btns-desc.png) - -Otherwise, each button is rendered in new line with the description on the left side and button on the right side. -![btns-inline](./assets/btns-inline.png) - -### Dropdowns - -You can define dropdowns under `Section` object. You can split options into groups. Optionally, you can define the initial option. It must be included also under `OptionsGroups`. - -```go -cmdPrefix := func(cmd string) string { - return fmt.Sprintf("%s %s %s", api.MessageBotNamePlaceholder, pluginName, cmd) -} - -msg := api.Message{ - Sections: []api.Section{ - { - Selects: api.Selects{ - ID: "select-id", - Items: []api.Select{ - { - Name: "two-groups", - Command: cmdPrefix("selects two-groups"), - OptionGroups: []api.OptionGroup{ - { - Name: cmdPrefix("selects two-groups/1"), - Options: []api.OptionItem{ - {Name: "BAR", Value: "BAR"}, - {Name: "BAZ", Value: "BAZ"}, - {Name: "XYZ", Value: "XYZ"}, - }, - }, - { - Name: cmdPrefix("selects two-groups/2"), - Options: []api.OptionItem{ - {Name: "123", Value: "123"}, - {Name: "456", Value: "456"}, - {Name: "789", Value: "789"}, - }, - }, - }, - // MUST be defined also under OptionGroups.Options slice. - InitialOption: &api.OptionItem{ - Name: "789", Value: "789", - }, - }, - }, - }, - }, - }, -} -``` - -When user select a given option, Botkube runs an associated command and appends selected option at the end. For **BAR** it's `msg selects two-gropus BAR`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -### Input text fields - -```go -msg := api.Message{ - PlaintextInputs: []api.LabelInput{ - { - Command: fmt.Sprintf("%s %s input-text", api.MessageBotNamePlaceholder, pluginName), - DispatchedAction: api.DispatchInputActionOnEnter, - Placeholder: "String pattern to filter by", - Text: "Filter output", - }, - }, -} -``` - -When user types an input string and clicks enter, Botkube runs an associated command and appends input text in quotes. For example, for input **"text"** it's `msg input-text "test"`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -## Message visibility - -If the interactivity is enabled, you can change the default message visibility options: - -- The `OnlyVisibleForYou` property allows you to display the message only to the user who clicked a given button or dropdown. It's taken into account only if respond to the interactive message. It cannot be used initial messages that are automatically sent to a given channel. -- The `ReplaceOriginalMessage` property allows you to replace the message which triggered interactive command. You cannot change `OnlyVisibleForYou` as the message retains its initial visibility. diff --git a/versioned_docs/version-1.8/plugin/local-testing.md b/versioned_docs/version-1.8/plugin/local-testing.md deleted file mode 100644 index 0d21a40a..00000000 --- a/versioned_docs/version-1.8/plugin/local-testing.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -id: local-testing -title: "Local testing" -sidebar_position: 7 ---- - -This document describes steps for running Botkube core locally together with a local file server for serving your plugins during development phase. - -**Prerequisite** - -- [Node.js](https://nodejs.org/en/download/), to use `npx` - -**Steps** - -1. Follow steps from [`CONTRIBUTING.md`](https://github.com/kubeshop/botkube/blob/main/CONTRIBUTING.md#build-and-run-locally) about running Botkube locally. - -2. Create a file with your plugins' repository, plugin configuration and bindings for enabled communication platform: - - ```yaml - plugins: - repositories: - local-repo: - url: http://localhost:8080/plugins-index.yaml - - executors: - "plugins": - local-repo/executor-name: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. - sources: - "plugins": - local-repo/source-name: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. - - communications: - # Enable a given communication platform and define bindings to a given executor and source plugins. - ``` - - For example, for Slack and example `echo` and `ticker` plugins, provide `appToken` and `botToken` and run the script: - -
- Create /tmp/config-values.yaml - - ```yaml - cat << EOF > /tmp/config-values.yaml - plugins: - repositories: - local-repo: - url: http://localhost:8080/plugins-index.yaml - - executors: - "plugins": - local-repo/echo: - enabled: true - config: - transformResponseToUpperCase: true - sources: - "plugins": - local-repo/ticker: - enabled: true - config: - interval: 5s - communications: - default-group: - socketSlack: - enabled: true - channels: - default: - name: random - bindings: - executors: - - 'plugins' - sources: - - 'plugins' - appToken: "" # provide your token starting with xapp-1- - botToken: "" # provide your token starting with xoxb- - settings: - clusterName: local-dev - EOF - ``` - -
- -3. In your plugin project directory, start a static plugin server: - - ```bash - # Use https://github.com/vercel/serve - npx serve --listen 8080 - ``` - - :::note - If Botkube runs on external Kubernetes cluster, you can use the tunneling software, for example [`ngrok`](https://ngrok.com/). It creates an externally addressable URL for a port you open locally on your machine. - ::: - -4. In your plugin project directory open a new terminal window. -5. Export Botkube plugins cache directory: - - ```bash - export BOTKUBE_PLUGINS_CACHE__DIR="/tmp/plugins" - ``` - -6. Export Botkube repository path cloned in the first step: - - ```bash - export BOTKUBE_REPO_PATH={botkube_repo_path} - ``` - -7. Export configuration files: - - ```bash - export BOTKUBE_CONFIG_PATHS="${BOTKUBE_REPO_PATH}/helm/botkube/values.yaml,/tmp/config-values.yaml" - ``` - -8. Build plugins and start Botkube: - - :::note - Each time you change a plugin source code, re-run the above command. - ::: - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -
- - - -1. Download index builder: - -```bash -go get github.com/kubeshop/botkube/hack -``` - -2. Build plugins and run Botkube: - -```bash -# rebuild plugins only for current GOOS and GOARCH -goreleaser build --rm-dist --snapshot --single-target && -# regenerate index -go run github.com/kubeshop/botkube/hack -binaries-path "./dist" -url-base-path "http://localhost:8080/dist" -use-archive=false && -# remove cached plugins -rm -rf $BOTKUBE_PLUGINS_CACHE__DIR && -# start Botkube -${BOTKUBE_REPO_PATH}/botkube -``` - - - - -```bash -# rebuild plugins only for current GOOS and GOARCH -make build-plugins-single && -# regenerate index -env PLUGIN_DOWNLOAD_URL_BASE_PATH="http://localhost:8080/dist" make gen-plugin-index && -# remove cached plugins -rm -rf $BOTKUBE_PLUGINS_CACHE__DIR && -# start Botkube -${BOTKUBE_REPO_PATH}/botkube -``` - - - -
diff --git a/versioned_docs/version-1.8/plugin/quick-start.md b/versioned_docs/version-1.8/plugin/quick-start.md deleted file mode 100644 index e4abb5f5..00000000 --- a/versioned_docs/version-1.8/plugin/quick-start.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: quick-start -title: "Quick start" -sidebar_position: 1 ---- - -Botkube provides a quick start repository to start developing Botkube [source](../architecture/index.md#source) and [executor](../architecture/index.md#executor) plugins in Go. It has all batteries included; example plugins: - -- The [`echo`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/echo/main.go) executor that sends back the command that was specified, -- The [`ticker`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/ticker/main.go) source that emits an event each time the configured time duration elapses, -- The [`forwarder`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/forwarder/main.go) source that echos the message sent as an incoming webhook request. - -and two example release jobs: - -- [GitHub releases](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/release.yml) -- [GitHub Pages](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/pages-release.yml) - -## Use template - -1. Navigate to [`botkube-plugins-template`](https://github.com/kubeshop/botkube-plugins-template). - -2. Click **"Use this template"**, next **"Create a new repository"** - - ![Create Repo](./assets/use-tpl.png) - - This creates your own plugin repository with a single commit. - -3. After a few seconds, the `.github/workflows/setup.yml` job will create a new commit. This job removes Kubeshop related files, such as: - - - `CONTRIBUTING.md` - - `CODE_OF_CONDUCT.md` - - `LICENSE` - - `SECURITY.md` - - `.github/CODEOWNERS` - - Additionally, it updates links in README.md to point to your own repository instead of Kubeshop's one. In case of job failure, you need to make and commit those changes manually. - - This job runs only once, later you can remove it or disable it. - -4. Decide which release job you prefer, the GitHub releases, or GitHub pages. Once decided, remove one the above workflow in your new repository: - - - GitHub releases, defined at `.github/workflows/release.yml` in your GitHub repository. - - GitHub Pages, defined at `.github/workflows/pages-release.yml` in your GitHub repository. - - If you pick the GitHub Pages, a further configuration is needed: - - 1. In project settings, enable [publishing GitHub Pages via GitHub Action](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow). - 2. Adjust the `github-pages` deployment environment. You can either: - - remove the deployment environment if you don't need any protection rules - - add an environment protection rule so that you can deploy pages on each new tag. If you use tagging like `vX.Y.Z`, you can add the `v*` rule. As an alternative, can select **All branches** from the dropdown. - -5. Add LICENSE file and update the README.md file to describe the plugins that you created. diff --git a/versioned_docs/version-1.8/plugin/repository.md b/versioned_docs/version-1.8/plugin/repository.md deleted file mode 100644 index 52635cc2..00000000 --- a/versioned_docs/version-1.8/plugin/repository.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -id: repo -title: "Repository" -sidebar_position: 8 ---- - -A plugin repository is a place where you store your plugin binaries. This repository must be publicly available and supports downloading assets via HTTP(s). This document explains how to create Botkube plugin repositories by providing examples based on GitHub functionality. However, any static file server can be used, for instance: `s3`, `gcs`, etc. - -This document describes how to set up such repository. If you use or plan to use GitHub you can adapt the [template repository](quick-start.md) that has batteries included to start developing and hosting Botkube plugins right away. - -## Index file - -Your plugin repository must contain at least one index file and one plugin binary. Depending on your needs and preferences, you can create one or more index files to categorize your plugins. You can host both the executor and source plugins in a single repository. You can also include them in the same index file. - -In the index file, provide an entry for every plugin from your plugin repository. The index file must have the following syntax: - -```yaml -entries: - - name: { plugin_name } - type: { plugin_type } # executor or source - description: { plugin_description } - version: { plugin_version } - urls: - - url: { url_to_plugin_binary } - platform: - os: { plugin_operating_system } # darwin or linux - architecture: { plugin_architecture } # amd64 or arm64 - dependencies: # optional dependencies - { dependency_name }: - url: { url_to_dependency_binary } -``` - -It is not required to host a plugin or dependency binary on the same server as the index file. - -### Generate index file - -You can create the index file by yourself our use our tool to generate it automatically based on the directory with plugins binaries. The binaries must be named according to the following pattern: - -- For executors, `executor_{plugin_name}_{os}_{arch}`; for example, `executor_kubectl_darwin_amd64`. -- For sources, `source_{plugin_name}_{os}_{arch}`; for example, `source_kubernetes_darwin_amd64`. - -**Steps** - -1. In your plugin repository, add `tools.go`: - - ```go - cat << EOF > tools.go - //go:build tools - - package tools - - import ( - _ "github.com/kubeshop/botkube/hack" - ) - EOF - ``` - - :::note - We use the `tools.go` file, which is the [recommended way of tracking tool dependencies](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module). - ::: - -2. Refresh dependencies: - - ```bash - go mod tidy - ``` - -3. Build all your plugins. See [**Build plugin binaries**](custom-executor.md). - -4. Generate an index file: - - ```bash - go run github.com/kubeshop/botkube/hack -binaries-path "./dist" -url-base-path "https://example.com" - ``` - - :::info - Replace the `-url-base-path` flag with the base path of your HTTP server. See [Hosting plugins](#host-plugins) for some examples. - ::: - -## Host plugins - -This section describes example ways for serving Botkube plugins. - -### GitHub releases - -A GitHub release allows you to upload additional assets that are later accessible with a predictable URL. When you generate the index file, specify the `-url-base-path` flag as `https://github.com/{owner}/{repo}/releases/download/{release_tag}`, for example, `https://github.com/kubeshop/botkube/releases/download/v1.0.0`. - -Once the plugin binaries are built and the index file is generated, you can create a GitHub release using [GitHub CLI](https://cli.github.com/). For example: - -```bash -gh release create v1.0.0 \ - ./dist/source_* \ - ./dist/executor_* \ - ./plugins-index.yaml -``` - -#### Automation - -You can use [GitHub Actions](https://docs.github.com/en/actions) to publish Botkube plugins automatically each time a new tag is pushed. See the [`release` workflow](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/release.yml) on the `botkube-plugins-template` repository for the out-of-the-box solution, which you can use and modify if needed. - -### GitHub pages - -GitHub allows you to serve static pages via GitHub Pages. When you generate the index file, specify the `-url-base-path` flag as `https://{user}.github.io/{repository}`, for example, `https://kubeshop.github.io/botkube-plugins`. - -**Initial setup** - -1. Navigate to the Git repository with your plugins. - -2. Create the `gh-pages` branch: - - ```bash - git switch --orphan gh-pages - git commit --allow-empty -m "Initialization commit" - git push -u origin gh-pages - ``` - -3. Follow [this](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch) guide to make sure your `gh-pages` branch is set as the source for GitHub Pages. - -**Publishing steps** - -1. Clone `gh-pages` into `/tmp/botkube-plugins`: - - ```bash - git clone -b gh-pages "https://github.com/{owner}/{repo}.git" /tmp/botkube-plugins - ``` - -2. Move built binaries and generated index file: - - ```bash - mv dist/executor_* /tmp/botkube-plugins/ - mv dist/source_* /tmp/botkube-plugins/ - mv plugins-index.yaml /tmp/botkube-plugins - ``` - -3. Commit and push copied files: - - ```bash - cd /tmp/botkube-plugins - git add -A - git commit -m "Release Botkube plugins" - git push - ``` - -4. Remove cloned `gh-pages`: - - ```bash - cd - - rm -rf /tmp/botkube-charts - ``` - -In such setup, you can use your default branch to store your plugins code, and the `gh-pages` branch as a plugin repository. - -#### Automation - -You can use [GitHub Actions](https://docs.github.com/en/actions) to publish Botkube plugins automatically each time a new tag is pushed. See the [`pages-release` workflow](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/pages-release.yml) on the `botkube-plugins-template` repository for the out-of-the-box solution, which you can use and modify if needed. - -### Use hosted plugins - -To use the plugins that you published, add your repository under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file for a given Botkube deployment. For example: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Once the plugin repository is added, you can refer to it in the `executor` or `sources` section. - -```yaml -executors: - "plugins": - repo-name/executor-name@v1.0.0: # Plugin name syntax: {repo}/{plugin}[@{version}]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. -sources: - "plugins": - repo-name/source-name@v1.0.0: # Plugin name syntax: {repo}/{plugin}[@{version}]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. -``` diff --git a/versioned_docs/version-1.8/plugin/troubleshooting.md b/versioned_docs/version-1.8/plugin/troubleshooting.md deleted file mode 100644 index 5cfa36ef..00000000 --- a/versioned_docs/version-1.8/plugin/troubleshooting.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -id: troubleshooting.md -title: "Troubleshooting" -sidebar_position: 9 ---- - -This document describes how to identify and resolve issues that might occur. - -### Missing source events - -**Symptoms** - -You don't get event message on a given communication platform even though the event occurred in your 3rd party service. - -**Debugging steps** - -- [Enable debugging mode for a given plugin](debug.md). - Once enabled, check the Botkube logs. You can filter them by your plugin name. You should see information about downloading and starting your source. For example: - - ```bash - INFO[2023-01-09T21:21:24+01:00] Starting Plugin Manager for all enabled plugins component="Plugin Manager" enabledSources=botkube/cm-watcher - INFO[2023-01-09T21:21:24+01:00] Downloading plugin. binPath=/tmp/plugins/botkube/source_v0.13.0_cm-watcher component="Plugin Manager" url="http://host.k3d.internal:3000/static/source_cm-watcher_darwin_amd64" - INFO[2023-01-09T21:21:24+01:00] source plugin registered successfully. binPath=/tmp/plugins/botkube/source_v0.13.0_cm-watcher component="Plugin Manager" plugin=botkube/cm-watcher version=v0.13.0 - INFO[2023-01-09T21:21:25+01:00] Start source streaming... pluginName=botkube/cm-watcher sources="[plugin-based]" - ``` - - If you don't see any of the above log messages: - - - Make sure that `source.{group_name}.{plugin_name}.enabled` property is set to `true` - - Make sure that a given source configuration (`sources.{group_name}`) is bind to a given communication platform (`bindings.sources: [{group_name}]`) - - If the source is not bound to any communication platform Botkube will not download and start such plugin. Even if it's enabled. - -- [Make sure that your plugin didn't crash](#plugin-process-exited). - -### Missing executor response - -**Symptoms** - -You run a given executor command in a chat window, but you don't get any response. - -**Debugging steps** - -- [Enable debugging mode for a given plugin](debug.md). - Once enabled, run a given executor command once again, and check the Botkube logs. You can filter them by your plugin name. You should see information about downloading and registering your executor. For example: - - ```bash - INFO[2023-01-09T21:21:24+01:00] Starting Plugin Manager for all enabled plugins component="Plugin Manager" enabledExecutors=botkube/echo - INFO[2023-01-09T21:21:24+01:00] Downloading plugin. binPath=/tmp/plugins/botkube/executor_v0.13.0_echo component="Plugin Manager" url="http://host.k3d.internal:3000/static/executor_echo_darwin_amd64" - INFO[2023-01-09T21:21:24+01:00] executor plugin registered successfully. binPath=/tmp/plugins/botkube/executor_v0.13.0_echo component="Plugin Manager" plugin=botkube/echo version=v0.13.0 - ``` - - If you don't see any of the above log messages: - - - Make sure that `executors.{group_name}.{plugin_name}.enabled` property is set to `true` - - Make sure that a given executor configuration (`executors.{group_name}`) is bind to a given communication platform (`bindings.executors: [{group_name}]`) - - If the executor is not bound to any communication platform Botkube will not download and start such plugin. Even if it's enabled. - -- [Make sure that your plugin didn't crash](#plugin-process-exited). - -### Plugin process exited - -**Symptoms** - -In Botkube logs, you see an error similar to: - -```bash -ERRO[2023-01-09T21:21:25+01:00] plugin process exited error="exit status 1" path=/tmp/plugins/botkube/executor_v0.13.0_echo pid=71127 plugin=botkube/echo -``` - -**Solution** - -It means that your plugin exited once it was started by Botkube [plugin manager](../architecture/index.md#plugin-manager). To start your plugin again, you need to restart the Botkube core process, as crashed plugins aren't restarted automatically. This issue is tracked in [botkube#878](https://github.com/kubeshop/botkube/issues/878). You need to make sure that our plugin doesn't exit once it's started. You should return each error on Botkube plugin interface, instead of crashing your application. To see your plugin standard output [set the `debug` for a given plugin](debug.md). - -### Plugin not found error - -**Symptoms** - -In Botkube logs, you see an error similar to: - -```bash -2023/01/09 21:37:04 while starting plugins manager: not found source plugin called "cm-test" in "botkube" repository -``` - -**Debugging steps** - -- Make sure that a given repository is defined under `plugins.repository`. -- Check that a given entry is defined in a given repository index file. You should find under `entries` a plugin with a given name, version and type (source or executor). - -### Botkube is killed by readiness probe while downloading plugins - -**Symptoms** - -In environments with low internet bandwidth Botkube might get killed by the readiness probe before it finishes downloading all plugins. -The solution to this problem is to increase the wait time of the readiness probe. - -**Solution** - -To increase the wait time of the readiness probe, you need to set the `initialDelaySeconds` property in -[values.yaml](https://github.com/kubeshop/botkube/blob/9e450fb63666b03118ee51fcf9b7eb6c3b74cbcf/helm/botkube/values.yaml#L794-L821) -to a higher value. For example: - -``` ---set deployment.readinessProbe.initialDelaySeconds=180 -``` diff --git a/versioned_docs/version-1.8/plugin/using-kubeconfig.md b/versioned_docs/version-1.8/plugin/using-kubeconfig.md deleted file mode 100644 index e958119b..00000000 --- a/versioned_docs/version-1.8/plugin/using-kubeconfig.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -id: using-kubeconfig -title: Using kubeconfig -sidebar_position: 4 ---- - -You can request Botkube to generate and pass kubeconfig file to your plugin by adding RBAC section -to your plugin configuration. The following example requests a kubeconfig that impersonates -user **User.rbac.authorization.k8s.io** `read-only-user`. For more information refer to the -[RBAC section](../configuration/rbac.md). The example is for executor plugins, source plugins -can access kubeconfig in their `Stream()` function in `source.StreamInput`. - -RBAC config for an example plugin: - -```yaml -executors: - "reader-team-a": - kube-reader: - enabled: true - context: - user: - type: Static - static: - value: read-only-user -``` - -The kubeconfig is available in `executor.ExecuteInput` as a slice of bytes. -There are two options to instantiate a Kubernetes Go client with this config. - -1. From bytes - -```go -import ( - "context" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/kubernetes" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -func (ReaderExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - config, err := clientcmd.RESTConfigFromKubeConfig(in.Context.KubeConfig) - if err != nil { - return executor.ExecuteOutput{}, err - } - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return executor.ExecuteOutput{}, err - } - ... -} -``` - -2. From file - -```go -import ( - "context" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/kubernetes" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -func (ReaderExecutor) Execute(ctx context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - kubeConfigPath, deleteFn, err := pluginx.PersistKubeConfig(ctx, in.Context.KubeConfig) - if err != nil { - return executor.ExecuteOutput{}, fmt.Errorf("while writing kubeconfig file: %w", err) - } - defer func() { - if deleteErr := deleteFn(ctx); deleteErr != nil { - fmt.Fprintf(os.Stderr, "failed to delete kubeconfig file %s: %v", kubeConfigPath, deleteErr) - } - }() - config, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath) - if err != nil { - return executor.ExecuteOutput{}, err - } - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return executor.ExecuteOutput{}, err - } - ... -} -``` diff --git a/versioned_docs/version-1.8/usage/assets/actionable-notifications.png b/versioned_docs/version-1.8/usage/assets/actionable-notifications.png deleted file mode 100644 index dd7f7656..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/actionable-notifications.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/disable-action.png b/versioned_docs/version-1.8/usage/assets/disable-action.png deleted file mode 100644 index ffb1c33d..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/disable-action.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/enable-action.png b/versioned_docs/version-1.8/usage/assets/enable-action.png deleted file mode 100644 index 6fcc249a..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/enable-action.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/flag_filter_kubectl_get_nodes.png b/versioned_docs/version-1.8/usage/assets/flag_filter_kubectl_get_nodes.png deleted file mode 100644 index 96deecce..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/flag_filter_kubectl_get_nodes.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/flag_filter_kubectl_logs.png b/versioned_docs/version-1.8/usage/assets/flag_filter_kubectl_logs.png deleted file mode 100644 index b2a8106e..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/flag_filter_kubectl_logs.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/list-actions.png b/versioned_docs/version-1.8/usage/assets/list-actions.png deleted file mode 100644 index 5bb5238f..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/list-actions.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/long-notification.png b/versioned_docs/version-1.8/usage/assets/long-notification.png deleted file mode 100644 index 68569f3e..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/long-notification.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/mm_notifier_start.png b/versioned_docs/version-1.8/usage/assets/mm_notifier_start.png deleted file mode 100644 index 63e8837d..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/mm_notifier_start.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/output-filtering-filter-response.png b/versioned_docs/version-1.8/usage/assets/output-filtering-filter-response.png deleted file mode 100644 index e34474b6..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/output-filtering-filter-response.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/output-filtering-get-pods-metrics.png b/versioned_docs/version-1.8/usage/assets/output-filtering-get-pods-metrics.png deleted file mode 100644 index 48a30c39..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/output-filtering-get-pods-metrics.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/output-filtering-get-pods.png b/versioned_docs/version-1.8/usage/assets/output-filtering-get-pods.png deleted file mode 100644 index 08793408..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/output-filtering-get-pods.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/output-filtering-logs-response.png b/versioned_docs/version-1.8/usage/assets/output-filtering-logs-response.png deleted file mode 100644 index 576dabf5..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/output-filtering-logs-response.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/output-filtering-metrics-logs-filter.png b/versioned_docs/version-1.8/usage/assets/output-filtering-metrics-logs-filter.png deleted file mode 100644 index d1fd07d3..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/output-filtering-metrics-logs-filter.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/output-filtering-metrics-logs.png b/versioned_docs/version-1.8/usage/assets/output-filtering-metrics-logs.png deleted file mode 100644 index 643d0334..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/output-filtering-metrics-logs.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/assets/short-notification.png b/versioned_docs/version-1.8/usage/assets/short-notification.png deleted file mode 100644 index 3234ac3e..00000000 Binary files a/versioned_docs/version-1.8/usage/assets/short-notification.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/automated-actions.md b/versioned_docs/version-1.8/usage/automated-actions.md deleted file mode 100644 index d6f1a7fa..00000000 --- a/versioned_docs/version-1.8/usage/automated-actions.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -id: automated-actions -title: "Automated actions" -sidebar_position: 3 ---- - -# Automated actions - -Actions allow you to automate your workflows by executing custom commands based on specific events. To read how to configure actions, see the [Action](../configuration/action.md) configuration document. - -## Manage actions - -Botkube allows you to manage actions using `@Botkube` commands. - -### List available actions - -Run `@Botkube list actions` to get list of configured actions and their running status: - -![List available actions](./assets/list-actions.png) - -### Disable action - -Run `@Botkube disable action {action-name}` to disable an action named `{action-name}`. The action settings are persisted across Botkube app restarts. - -![Disable action](./assets/disable-action.png) - -When you disable an action, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. - -### Enable action - -Run `@Botkube enable action {action-name}` to enable an action named `{action-name}`. The action settings are persisted across Botkube app restarts. - -![Enable action](./assets/enable-action.png) - -When you enable an action, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. diff --git a/versioned_docs/version-1.8/usage/event-notifications.md b/versioned_docs/version-1.8/usage/event-notifications.md deleted file mode 100644 index 941b21e8..00000000 --- a/versioned_docs/version-1.8/usage/event-notifications.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: event-notifications -title: "Event notifications" -sidebar_position: 1 ---- - -# Event notifications - -Botkube sends notifications according to the [sources](../configuration/source/index.md) configuration. - -## Actionable notifications - -If you have [`kubectl` executor enabled](../configuration/executor/kubectl.md) for a given channel, you can run commands related to a resource from the notification itself. Use the dropdown on the left to select and run a given command: - -![Actionable notifications](./assets/actionable-notifications.png) - -The command dropdown is disabled for resource deletion events. It uses executor bindings to determine which commands are available for a given resource. - -:::info -Actionable notifications are only available for the [Slack integration](../installation/slack/index.md) that supports interactive messages. Currently, only a selected list of commands are supported, such as `describe`, `get`, or `logs`. -::: - -## Managing notifications - -Depending upon your configuration, you will receive notifications about Kubernetes resources lifecycle events and their health. -Botkube bot allows you to enable/disable notifications on each configured channel separately. Run `@Botkube help`, the bot will reply with the help message about the supported message formats. - -### View Botkube configuration - -Run `@Botkube show config` message from the configured channel where Botkube is added. The bot will reply to you with the configuration with which the controller is running. - -To see how to update the configuration, see the [Updating the configuration](../configuration/index.mdx#updating-the-configuration) section in the Configuration document. - -### Change notification sources - -To change the notification sources, you can either run the `helm upgrade` command as described in [**View Botkube configuration**](#view-botkube-configuration) or run `@Botkube edit SourceBindings`. - -When you save the new notification sources, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. - -### Disable notifications - -If you want to stop receiving notifications from Botkube, run `@Botkube disable notifications` from the configured channel where Botkube is added. You will no longer receive notifications from the Botkube in a given communication platform. - -The notification settings are persisted across Botkube app restarts. - -### Enable notifications - -If you want to receive Botkube notifications again, run `@Botkube enable notifications` from the configured channel where Botkube is added. - -The notification settings are persisted across Botkube app restarts. - -:::note -For MS Teams integration notifications are disabled by default. You need to turn them on manually using this command. -::: - -### Check notifications status - -Run `@Botkube status notifications` to check if notifications are enabled for a given communication platform. diff --git a/versioned_docs/version-1.8/usage/executor/assets/demo-x.gif b/versioned_docs/version-1.8/usage/executor/assets/demo-x.gif deleted file mode 100644 index 572a0fd7..00000000 Binary files a/versioned_docs/version-1.8/usage/executor/assets/demo-x.gif and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/executor/assets/flux-diff.gif b/versioned_docs/version-1.8/usage/executor/assets/flux-diff.gif deleted file mode 100644 index 6ffc20bd..00000000 Binary files a/versioned_docs/version-1.8/usage/executor/assets/flux-diff.gif and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/executor/assets/flux-interactivity.gif b/versioned_docs/version-1.8/usage/executor/assets/flux-interactivity.gif deleted file mode 100644 index 083a6bff..00000000 Binary files a/versioned_docs/version-1.8/usage/executor/assets/flux-interactivity.gif and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/executor/assets/helm-install-filter.png b/versioned_docs/version-1.8/usage/executor/assets/helm-install-filter.png deleted file mode 100644 index 9502e61e..00000000 Binary files a/versioned_docs/version-1.8/usage/executor/assets/helm-install-filter.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/executor/assets/kc-cmd-builder.gif b/versioned_docs/version-1.8/usage/executor/assets/kc-cmd-builder.gif deleted file mode 100644 index 63f672b5..00000000 Binary files a/versioned_docs/version-1.8/usage/executor/assets/kc-cmd-builder.gif and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/executor/assets/parsed-space-table.png b/versioned_docs/version-1.8/usage/executor/assets/parsed-space-table.png deleted file mode 100644 index 9d523779..00000000 Binary files a/versioned_docs/version-1.8/usage/executor/assets/parsed-space-table.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/executor/assets/x-quickstart.png b/versioned_docs/version-1.8/usage/executor/assets/x-quickstart.png deleted file mode 100644 index a5b7d60a..00000000 Binary files a/versioned_docs/version-1.8/usage/executor/assets/x-quickstart.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/executor/doctor.md b/versioned_docs/version-1.8/usage/executor/doctor.md deleted file mode 100644 index b2a43520..00000000 --- a/versioned_docs/version-1.8/usage/executor/doctor.md +++ /dev/null @@ -1,22 +0,0 @@ ---- -id: doctor -title: "Doctor" -sidebar_position: 4 ---- - -Botkube allows you to execute `doctor` commands on your Kubernetes cluster. By default, `doctor` command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/doctor.md#enabling-plugin) section from the `doctor` configuration documentation. - -To execute the `doctor` commands, send message in following formats in the channel where Botkube is already added: - -- Kubernetes native prompt: - ``` - @Botkube doctor --namespace=[namespace] --resource=[resource] --error=[error] - ``` -- Free-form question: - ``` - @Botkube doctor "[free-form question]" - ``` - -By default, `chatgpt` is configured as alias for the `doctor` command. You can use them on par with the `doctor` command. To read more about aliases configuration, see the [Alias](../../configuration/alias.md) section. - -This command needs to be executed from configured channel. diff --git a/versioned_docs/version-1.8/usage/executor/exec.mdx b/versioned_docs/version-1.8/usage/executor/exec.mdx deleted file mode 100644 index c6812e4e..00000000 --- a/versioned_docs/version-1.8/usage/executor/exec.mdx +++ /dev/null @@ -1,210 +0,0 @@ ---- -id: exec -title: "Exec" -sidebar_position: 3 ---- - -The `exec` executor plugin allows you to install and run CLI applications directly from chat (e.g., Slack, Discord, or Mattermost) without any hassle. - -It supports interactivity in the form of buttons and dropdowns. You can easily use all your favorite tools without typing, even from your mobile phone! - -![x-demo](./assets/demo-x.gif) - -:::note -To shorten the command, the `x` alias is used in all examples. Make sure you have it configured for your Botkube installation according to [Alias configuration](../../configuration/alias) document. - -```yaml -aliases: - x: - command: exec - displayName: "Exec alias" -``` - -In this context, the `x` stands for `extension` or `execution`. -::: - -# Usage - -## Install CLI - -To install a given CLI binary directly from a chat window, run: - -``` -@Botkube x install {source} -``` - -For downloading binaries, the `eget` library is used. It supports multiple URL formats and is able to unpack archives and extract binaries from them. For more details, see the documentation on the [`eget`](https://github.com/zyedidia/eget) GitHub repository. - -### Examples - -- `@Botkube x install https://get.helm.sh/helm-v3.10.3-linux-amd64.tar.gz --file helm` -- `@Botkube x install github.com/fluxcd/flux2` -- `@Botkube x install https://github.com/rikatz/kubepug --asset kubepug_darwin_amd64.tar.gz` - -## Execute CLI - -To execute a CLI command, run: - -``` -@Botkube x run {command} -``` - -### Examples - -- `@Botkube x run helm list -A` -- `@Botkube x run flux get sources git` - -:::tip -For convenience, you can configure a Botkube alias to simplify running `flux` commands: - -```yaml -aliases: - flux: - command: x run flux - displayName: "Flux CLI alias" -``` - -Later, you can simply type `@Botkube flux get sources git`. -::: - -# Templates - -The `exec` plugin supports defining templates for executed commands. As a result, you can specify how to process the CLI output or define your own message response. - -```yaml -# An array of templates that define how to convert the command output into an interactive message. -templates: - - trigger: - command: - # Specifies the prefix of the command that triggers the template and the parser used to parse the output. - # If specified, it has higher priority than the regex field. - prefix: "helm list" - # Specifies the regex that should match a given command - # If specified, it has lower priority than the prefix field. - regex: "regex: '^helm list(?:\s+(-A|-a))*\s?$'" - # Specifies the message template type. - type: "" - # Message template depending on the selected type. - message: { } -``` - -Supported template types: - -- [`parser:table:space`](#table-parser) -- [`wrapper`](#wrapper) -- [`tutorial`](#tutorial) - -Navigate to the [`exec`](https://github.com/kubeshop/botkube/tree/main/cmd/executor/x/templates) plugin directory to see official examples. - -## Table parser - -The `parser:table:space` template knows how to convert space-separated tables into an interactive message. This allows you to select a single item from a dropdown and perform additional actions in the context of the selected item without typing anything. - -For example, such a table: - -```shell -NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION -psql default 1 2023-04-27 19:30:48.042056 +0200 CEST deployed postgresql-12.2.7 15.2.0 -traefik kube-system 1 2023-04-19 20:58:57.709052559 +0000 UTC deployed traefik-10.19.300 2.6.2 -traefik-crd kube-system 1 2023-04-19 20:58:56.564578223 +0000 UTC deployed traefik-crd-10.19.300 -``` - -is displayed as: - -![](./assets/parsed-space-table.png) - -The table output is parsed with the following rules: - -- All headers are normalized using the [`Title`](https://pkg.go.dev/golang.org/x/text/cases#Title) function. For example: - - - `APP VERSION` is `AppVersion` - - `NAME` is `Name` - - `namespace` is `Namespace` - -- Empty cells are allowed, and they are printed as an empty string. - -By default, the first row is selected and displayed in the message. The `actions` and `preview` properties are rendered in the context of the selected row. - -### Syntax - -Here is an example syntax that converts the `helm list -A` command into an interactive message: - -```yaml -type: "parser:table:space" -message: - # Creates a dropdown menu with a given name, where the items are generated using the `keyTpl` parameter. - selects: - - name: "Release" - keyTpl: "{{ .Namespace }}/{{ .Name }}" - - # Defines additional actions that can be performed in the context of the selected item. In this example, the user can view notes, values, or delete the selected release. - # optional - actions: - notes: "helm get notes {{ .Name }} -n {{ .Namespace }}" - values: "helm get values {{ .Name }} -n {{ .Namespace }}" - delete: "helm delete {{ .Name }} -n {{ .Namespace }}" - - # Displays a preview of the selected item. Fields `Name`, `Namespace`, `Status`, and `Chart` are generated using the output of the command. It's useful to display only important context. - # optional - preview: | - Name: {{ .Name }} - Namespace: {{ .Namespace }} - Status: {{ .Status }} - Chart: {{ .Chart }} -``` - -## Wrapper - -The wrapper template allows adding extra buttons to the CLI output without modifying the output itself. It's useful to attach some pre-defined commands. - -### Syntax - -Here is an example syntax to add two predefined buttons to a given output message: - -```yaml -type: "wrapper" -message: - buttons: - - # Button name - name: "Get Help" - # URL to open on click. - url: "https://example.com/help" - - # Button name - name: "Initialize" - # Button command to run. Use `{{BotName}}` placeholder for commands that should be executed by Botkube - command: "{{BotName}} x run flux install" - # Button style, supported values: primary, danger - style: "primary" -``` - -## Tutorial - -The tutorial template allows you to define a custom response for a given command. For example, when the trigger command is set to `trigger.comand.prefix: "quickstart helm"` and a user types `@Botkube x run quickstart helm`, the command itself is not executed. Instead, a defined tutorial message is returned. - -![quickstart](./assets/x-quickstart.png) - -### Syntax - -Here is an example syntax to return tutorial with two predefined buttons: - -```yaml -type: "tutorial" -message: - # Pagination rules - paginate: - # Maximum number of rendered buttons per page - page: 5 - # Message header - header: "Helm Quick Start tutorial" - # Tutorial steps that are rendered in a given order. - buttons: - - # Button name - name: "Global Help" - # Button description to display on the left side of the button. - description: "{{BotName}} helm help" - # Button command to run. Use `{{BotName}}` placeholder for commands that should be executed by Botkube - command: "{{BotName}} x run helm help" - - name: "Version" - description: "{{BotName}} helm version" - command: "{{BotName}} x run helm version" -``` diff --git a/versioned_docs/version-1.8/usage/executor/flux.md b/versioned_docs/version-1.8/usage/executor/flux.md deleted file mode 100644 index 9a7ce276..00000000 --- a/versioned_docs/version-1.8/usage/executor/flux.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -id: flux -title: "Flux" -sidebar_position: 5 ---- - -Botkube offers seamless execution of Flux CLI commands within your Kubernetes cluster. By default, Flux command execution is disabled. To enable it, refer to the [Enabling plugin](../../configuration/executor/flux.md#enabling-plugin) section. - -To execute the `flux` CLI commands, send a message in the channel where Botkube is present. For example: - -``` -@Botkube flux tutorial -``` - -## Interactive Usage - -We have also incorporated interactivity (tables, etc.) to simplify running Flux CLI commands e.g. from mobile devices. - -![flux-interactivity](./assets/flux-interactivity.gif) - -## Simplified Kustomization Diffing Flow - -With the Botkube Flux executor, you can execute a single command to perform a diff between a specific pull request and the cluster state. For instance: - -``` -@Botkube flux diff kustomization podinfo --path ./kustomize --github-ref [PR Number| URL | Branch] -``` - -![flux-diff](./assets/flux-diff.gif) - -This command automates several tasks: - -- Automatically discovering the associated GitHub repository for the given kustomization. -- Cloning the repository. -- Checking out a given pull request. -- Comparing pull request changes with the current cluster state. -- Sharing the diff report. - -The diff results are posted on the Slack channel, making it easy for team members to review and discuss the changes. Additionally, the returned message provides additional contextual actions: - -- Posting the diff report as a GitHub comment on the corresponding pull request. -- Approving the pull request. -- Viewing the pull request. - -### GitHub automation - -To enhance your workflow's efficiency, you can use the [GitHub Events](../../configuration/source/github-events.md) source for automatic notification of pull request events, complete with an integrated `flux diff` button. - -```yaml -sources: - github-events: - displayName: "GitHub Events" - botkube/github-events: - enabled: true - config: - github: - auth: - accessToken: "ghp_" # GitHub PAT - - repositories: - - name: { owner }/{name} - on: - pullRequests: - - types: [ "open" ] - paths: - # Patterns for included file changes in pull requests. - include: [ 'kustomize/.*' ] - notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " -``` - -Don't forget to incorporate the `github-events` source into your communication platform bindings. For instance: - -```yaml -communications: - default-group: - socketSlack: - enabled: true - channels: - default: - name: random - bindings: - sources: - - github-events - executors: - - flux -``` diff --git a/versioned_docs/version-1.8/usage/executor/helm.md b/versioned_docs/version-1.8/usage/executor/helm.md deleted file mode 100644 index 4b156750..00000000 --- a/versioned_docs/version-1.8/usage/executor/helm.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -id: helm -title: "Helm" -sidebar_position: 3 ---- - -Botkube allows you to execute `helm` commands on your Kubernetes cluster. By default, `helm` command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/helm.md#enabling-plugin) section from the `helm` configuration documentation. - -To execute `helm` commands, send message in the following format in the channel where Botkube is already added: - -``` -@Botkube helm [command] [flags] -``` - -At least one `helm` executor needs to be enabled and bound to a given channel. - -:::caution -Using the interactive filter input field causes the Helm command to be re-executed. Be careful when using it for read-write commands. - -![Interactive Helm install filtering](./assets/helm-install-filter.png) - -This issue is tracked in [botkube#907](https://github.com/kubeshop/botkube/issues/907). -::: - -## Supported commands - -The Helm executor plugin has the exact same syntax as the Helm CLI. However, not all commands and flags are supported. If an unsupported flag is specified, you will get a dedicated error, e.g: - -``` -The "--wait" flag is not supported by the Botkube Helm plugin. Please remove it. -``` - -Additionally, the following flag syntax is not supported: - -- No whitespace between short flag name and its value. Instead of `-oyaml`, use `-o yaml`. -- Merging multiple short flags together. Instead of `-Aa`, use `-A -a`. - -### Read-only commands - -List of the read-only commands: - -- `@Botkube helm help` - shows the general Helm plugin help message. -- `@Botkube helm list` - lists all releases on cluster where Botkube is installed. - - The `--filter` flag is reserved by Botkube. As a result, to use the Helm filter functionality use `-f` instead, e.g. `helm list -f 'ara[a-z]+'`. -- `@Botkube helm status` - displays the status of the named release. -- `@Botkube helm version` - shows the version of the Helm CLI used by this Botkube plugin. - -### Read-write commands - -For the read-write commands the Botkube RBAC needs to be adjusted. For more information, see the [**Enabling plugin**](../../configuration/executor/helm.md#enabling-plugin) section. - -List of the read-write commands: - -- `@Botkube helm rollback` - rolls back a given release to a previous revision. -- `@Botkube helm test` - runs tests for a given release. -- `@Botkube helm uninstall` - uninstalls a given release. -- `@Botkube helm upgrade` - upgrades a given release. -- `@Botkube helm install` - installs a given chart to cluster where Botkube is installed. There are two different ways you to install a Helm chart: - - By absolute URL: `helm install mynginx https://example.com/charts/nginx-1.2.3.tgz` - - By chart reference and repository URL: `helm install --repo https://example.com/charts/ mynginx nginx` diff --git a/versioned_docs/version-1.8/usage/executor/index.md b/versioned_docs/version-1.8/usage/executor/index.md deleted file mode 100644 index b4f7614c..00000000 --- a/versioned_docs/version-1.8/usage/executor/index.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: executor -title: "Executor" -sidebar_position: 1 ---- - -While deploying Botkube, you can specify which [executors](../../configuration/executor) you want to enable. - -To check which executors are enabled, and get the aliases configured for them, run `@Botkube list executors`. - -## Aliases - -Alias is a shortcut for a longer command or just a part of it. It can be defined for all commands, including executor plugins and built-in Botkube commands. When you use an alias, the command is replaced with the underlying command before executing it. For example, `@Botkube k get pods` is replaced with `@Botkube kubectl get pods` before executing it. - -Once you configured aliases, you can use them interchangeably with a full command. For example: - -- `k` as `kubectl`, -- `kgp` as `kubectl get pods`, -- `kgpa` as `kubectl get pods -A`, -- `hh` as `helm history`, -- `a` as `list actions`, the built-in Botkube command, - -and so on. Your imagination is the limit! - -Aliases are defined globally for the whole Botkube installation. To see which aliases are available for current conversation, run `@Botkube list aliases`. - -To learn how to configure aliases and see the default configuration, see the [Alias](../../configuration/alias.md) section. - -## Specify cluster name - -:::warning -Multi-cluster approach is supported only for the Mattermost and Discord integrations. Slack and Microsoft Teams integrations require separate Slack or Microsoft Teams apps for each Botkube installation. -::: - -If you have installed Botkube backend on multiple clusters, you can pass `--cluster-name` flag to execute kubectl command on specific cluster. - -To get the list of all clusters configured in botkube, you can use the ping command. - -For cluster-specific response, use `--cluster-name` flag to specify the cluster's name on which command needs to be executed. -Use of this flag allows you to get response from any channel or group where Botkube is added. -The flag is ignored in notifier commands as they can be executed from the configured channel only. - -## Filtering text output - -Use the `--filter` flag to filter the output of Botkube executor commands. This returns any lines matching the flag's provided value. - -The `--filter` flag uses simple string matching. And, only works for Botkube executor commands that return text output, e.g. `kubectl` or `list executors` commands. - -### Filtering `kubectl` output - -![flag_filter_kubectl_get_nodes](../assets/flag_filter_kubectl_get_nodes.png) -![flag_filter_kubectl_logs](../assets/flag_filter_kubectl_logs.png) diff --git a/versioned_docs/version-1.8/usage/executor/kubectl.md b/versioned_docs/version-1.8/usage/executor/kubectl.md deleted file mode 100644 index 5434171e..00000000 --- a/versioned_docs/version-1.8/usage/executor/kubectl.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: kubectl -title: "Kubectl" -sidebar_position: 2 ---- - -Botkube allows you to execute `kubectl` commands on your Kubernetes cluster. By default, kubectl command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/kubectl.md#enabling-plugin) section from the `kubectl` configuration documentation. - -To execute the `kubectl` commands, send message in following format in the channel where Botkube is already added: - -``` -@Botkube kubectl [verb] [resource] [flags] -``` - -By default, `k` and `kc` are configured as aliases for the `kubectl` command. You can use them on par with the `kubectl` command. To read more about aliases configuration, see the [Alias](../../configuration/alias.md) section. - -This command needs to be executed from configured channel. - -## Interactive kubectl commands builder - -Use the interactive `kubectl` command builder to construct a `kubectl` command just by selecting items from dropdowns. This is especially useful on mobile when typing the command is harder. - -The builder includes a resource name dropdown list. This is pre-populated with all the relevant resource names. It's great for discovering resources with the option to select them. E.g. Just grab a Pod name without needing to type or copy-and-paste. - -To start the interactive `kubectl` command builder, run `@Botkube kubectl` from the configured channel where Botkube is added. -You can also use any of the [configured aliases](../../configuration/alias.md) - for example, the default `k` one, as illustrated below: - -![kubectl command builder](./assets/kc-cmd-builder.gif) - -### Limitations - -Keep in mind that the interactive command builder may not support all the commands that you can run just by typing them directly in a chat window. The following policies are applied: - -- Under verbs' dropdown, we display verbs that are defined under the `interactiveBuilder.allowed.verbs` configuration. - :::tip - The default verbs for the `kubectl` plugin found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - If you ServiceAccount allow running other actions such as `delete`, you can add them directly under [`interactiveBuilder.allowed.verbs`](../../configuration/executor/kubectl.md#syntax). - ::: - -- Under resources' dropdown, we display resources that are defined under the `interactiveBuilder.allowed.resources` configuration and are allowed for already selected verb. For example, for the `logs` verb we display only `pods`, `statefulsets`, `deployments`, and `daemonsets`. - :::tip - The default resources for the `kubectl` plugin found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - - If you ServiceAccount allow access to more resources, you can add them directly under [`interactiveBuilder.allowed.resources`](../../configuration/executor/kubectl.md#syntax). - ::: - -- For resources that are namespace-scoped, under namespaces' dropdown, we display `interactiveBuilder.allowed.namespaces` if defined. If static namespaces are not specified, plugin needs to have access to fetch all Namespaces, otherwise Namespace dropdown won't be visible at all. - -- The `kubectl` command preview is displayed only if the command that you built is valid, and you have permission to run it. diff --git a/versioned_docs/version-1.8/usage/index.md b/versioned_docs/version-1.8/usage/index.md deleted file mode 100644 index d226cf77..00000000 --- a/versioned_docs/version-1.8/usage/index.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -id: usage -title: "Usage" -sidebar_position: 4 ---- - -# Usage - -Botkube allows you to monitor your Kubernetes cluster, as well as debug and troubleshoot your workloads. - -## See all available commands - -Run `@Botkube help` to find information about the supported commands. - -## Check Botkube status - -Run `@Botkube ping` to the channel where Botkube is added. The Botkube will respond you with the **pong** message from all the configured clusters. - -For [multi-cluster configuration](./executor/index.md#specify-cluster-name), use the `--cluster-name` flag to get response from the cluster mentioned in the flag. Else check the deployment in Kubernetes cluster in the **botkube** namespace. diff --git a/versioned_docs/version-1.8/usage/interactive-output-filtering.md b/versioned_docs/version-1.8/usage/interactive-output-filtering.md deleted file mode 100644 index ba96ae2f..00000000 --- a/versioned_docs/version-1.8/usage/interactive-output-filtering.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -id: interactive-output-filtering -title: "Interactive output filtering" -sidebar_position: 4 ---- - -:::info -Interactive output filtering is only available for the [Slack integration](../installation/slack/index.md) that supports interactive messages. -::: - -:::caution -Using the interactive filter input field causes the command to be re-executed. Be careful when using it for read-write commands. -This issue is tracked in [botkube#907](https://github.com/kubeshop/botkube/issues/907). -::: - -Sometimes you can get long response from a certain command and you may want to filter that to see a subset of the actual result. -For each communication platform, you can use the `--filter` flag at the end of your command. To learn more, see the [Flags](executor/index.md#filtering-kubectl-output) section. - -If you use the [Slack integration](../installation/slack/index.md) that supports interactive messages, there is another option to handle that: interactive output filtering. -Interactivity is achieved via an input action text box where you can add your filter criteria as text and press the **Enter** button. - -### Long response filtering - -Output Filter input text box will be attached to your command response if response has more than 15 lines. Let's see an example for this situation. - -1. List pods with `@Botkube kubectl get pods -n kube-system` - ![metrics_pods](assets/output-filtering-get-pods-metrics.png) -2. Let's check the logs of `metrics-server` with `@Botkube kubectl logs -f metrics-server-7cd5fcb6b7-hzvq8 -n kube-system` - ![metrics_logs](assets/output-filtering-metrics-logs.png) -3. Notice that Filter Output is attached to response. Type `RequestHeaderAuthRequestController` to filter and press `Enter`. - ![metrics_filter_logs](assets/output-filtering-metrics-logs-filter.png) - -## Attachment response filtering - -Command response is uploaded as text file once the actual size of response message reaches the limit of messaging platform. Let's take a look how Filter Output behaves for this situation. - -1. List the pods with `@Botkube kubectlc get pods -n kube-system` - ![get_pods](assets/output-filtering-get-pods.png) -2. Let's check the logs of Traefik with command `@Botkube kubectl logs -f traefik-df4ff85d6-f2mkz -n kube-system`. Notice that, you might have different pod list, so please select a suitable one for your case. - ![pod_logs](assets/output-filtering-get-pods.png) -3. Since the response is big, it is uploaded as file and you can realize a reply thread. Please expand it to see filter output. -4. Assume we want to see log lines only containing `Configuration` word. Type `Configuration` in the Filter Output input box and click enter. You will see filtered result as a response. - ![filter_response](assets/output-filtering-filter-response.png) diff --git a/versioned_docs/version-1.8/usage/source/argocd.md b/versioned_docs/version-1.8/usage/source/argocd.md deleted file mode 100644 index c8b9786b..00000000 --- a/versioned_docs/version-1.8/usage/source/argocd.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -id: argocd -title: ArgoCD -sidebar_position: 5 ---- - -Botkube allows you to consume ArgoCD events on your Kubernetes cluster. By default, `argocd` plugin is disabled. See the [**Enabling source**](../../configuration/source/argocd#enabling-plugin) section from the `argocd` configuration documentation. - -Once it is enabled, the ArgoCD plugin will configure ArgoCD notifications so that Botkube receives them on its incoming webhook. Then, Botkube will send them to configured platforms as shown below. - -![ArgoCD events](./assets/argocd-events.png) - -## Interactive events - -For platforms that support interactivity, such as Socket Slack and Cloud Slack, Botkube sends interactive messages for ArgoCD events, that allow you to perform actions on the event. By default, the following actions are supported: - -- Run commands on the Application: - - `get` - - `describe` -- View the Application in the ArgoCD UI -- Open the source repository in the browser - -Interactive buttons and commands can be configured. See the [Configuration](../../configuration/source/argocd.md) document for more details. diff --git a/versioned_docs/version-1.8/usage/source/assets/argocd-events.png b/versioned_docs/version-1.8/usage/source/assets/argocd-events.png deleted file mode 100644 index 11447ddb..00000000 Binary files a/versioned_docs/version-1.8/usage/source/assets/argocd-events.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/source/assets/keptn-events.png b/versioned_docs/version-1.8/usage/source/assets/keptn-events.png deleted file mode 100644 index 755dbf69..00000000 Binary files a/versioned_docs/version-1.8/usage/source/assets/keptn-events.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/source/assets/pod-created.png b/versioned_docs/version-1.8/usage/source/assets/pod-created.png deleted file mode 100644 index cd8acde7..00000000 Binary files a/versioned_docs/version-1.8/usage/source/assets/pod-created.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/source/assets/prometheus-alerts.png b/versioned_docs/version-1.8/usage/source/assets/prometheus-alerts.png deleted file mode 100644 index 0fa8fef5..00000000 Binary files a/versioned_docs/version-1.8/usage/source/assets/prometheus-alerts.png and /dev/null differ diff --git a/versioned_docs/version-1.8/usage/source/index.md b/versioned_docs/version-1.8/usage/source/index.md deleted file mode 100644 index 206b1667..00000000 --- a/versioned_docs/version-1.8/usage/source/index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -id: source -title: "Source" -sidebar_position: 1 ---- - -While deploying Botkube, you can specify which [sources](../../configuration/source) you want to enable. - -To check which sources are enabled, run `@Botkube list sources` diff --git a/versioned_docs/version-1.8/usage/source/keptn.md b/versioned_docs/version-1.8/usage/source/keptn.md deleted file mode 100644 index aac65a5c..00000000 --- a/versioned_docs/version-1.8/usage/source/keptn.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -id: keptn -title: "Keptn" -sidebar_position: 4 ---- - -Botkube allows you to consume `keptn` events on your Kubernetes cluster. By default, `keptn` plugin is disabled. See the [**Enabling plugin**](../../configuration/source/keptn#enabling-plugin) section from the `keptn` configuration documentation. - -Once it is enabled, Botkube Keptn plugin will consume Keptn events and send them to configured platforms as shown below. - -![Keptn Events](./assets/keptn-events.png) diff --git a/versioned_docs/version-1.8/usage/source/kubernetes.md b/versioned_docs/version-1.8/usage/source/kubernetes.md deleted file mode 100644 index a47f9d9a..00000000 --- a/versioned_docs/version-1.8/usage/source/kubernetes.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -id: kubernetes -title: "Kubernetes" -sidebar_position: 2 ---- - -Botkube allows you to consume `kubernetes` events on your Kubernetes cluster. By default, `kubernetes` plugin is disabled. See the [**Enabling source**](../../configuration/source/kubernetes#enabling-source) section from the `kubernetes` configuration documentation. - -Once it is enabled, Botkube Kubernetes plugin will consume Kubernetes events and send them to configured platforms as shown below. - -![Pod Created](./assets/pod-created.png) diff --git a/versioned_docs/version-1.8/usage/source/prometheus.md b/versioned_docs/version-1.8/usage/source/prometheus.md deleted file mode 100644 index 27dfd7af..00000000 --- a/versioned_docs/version-1.8/usage/source/prometheus.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -id: prometheus -title: "Prometheus" -sidebar_position: 3 ---- - -Botkube allows you to consume `prometheus` alerts on your Kubernetes cluster. By default, `prometheus` plugin is disabled. See the [**Enabling plugin**](../../configuration/source/prometheus#enabling-plugin) section from the `prometheus` configuration documentation. - -Once it is enabled, Botkube Prometheus plugin will consume Prometheus alerts and send them to configured platforms as shown below. - -![Prometheus Alerts](./assets/prometheus-alerts.png) diff --git a/versioned_docs/version-1.9/architecture/assets/arch-dark.svg b/versioned_docs/version-1.9/architecture/assets/arch-dark.svg deleted file mode 100644 index e844b875..00000000 --- a/versioned_docs/version-1.9/architecture/assets/arch-dark.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
K8s events
K8s events
User
User
starts gRPC
streaming
starts gRPC...
Plugin Source
Bridge
Plugin Source...
Botkube core
Botkube core
interacts with
interacts with
kubectl
kubectl
helm
helm
Bot (bidirectional)
Bot (bidirectional)
Sink (unidirectional)
Sink (unidirectional)
Executors
Executors
executes gRPC
call
executes gRPC...
Plugin Executor
Bridge
Plugin Executor...
K8s events
K8s events
Prometheus
Prometheus
Sources
Sources
Communications
Communications
Downloaded plugins
Downloaded plugins
downloads and starts
plugin binaries
downloads and starts...
reads index file with 
available plugins
reads index file with...
Plugin
Manager
Plugin...
Filter Engine
Filter Engine
Plugin Index File
Plugin Index File
Plugin Index File
Plugin Index File
Plugins repository
Plugins repository
helm
helm
argo
argo
Prometheus
Prometheus
kubectl
kubectl
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.9/architecture/assets/arch-light.svg b/versioned_docs/version-1.9/architecture/assets/arch-light.svg deleted file mode 100644 index 098e469a..00000000 --- a/versioned_docs/version-1.9/architecture/assets/arch-light.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
K8s events
K8s events
User
User
starts gRPC
streaming
starts gRPC...
Plugin Source
Bridge
Plugin Source...
Botkube core
Botkube core
interacts with
interacts with
kubectl
kubectl
helm
helm
Bot (bidirectional)
Bot (bidirectional)
Sink (unidirectional)
Sink (unidirectional)
Executors
Executors
executes gRPC
call
executes gRPC...
Plugin Executor
Bridge
Plugin Executor...
K8s events
K8s events
Prometheus
Prometheus
Sources
Sources
Communications
Communications
Downloaded plugins
Downloaded plugins
downloads and starts
plugin binaries
downloads and starts...
reads index file with 
available plugins
reads index file with...
Plugin
Manager
Plugin...
Filter Engine
Filter Engine
Plugin Index File
Plugin Index File
Plugin Index File
Plugin Index File
Plugins repository
Plugins repository
helm
helm
argo
argo
Prometheus
Prometheus
kubectl
kubectl
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.9/architecture/assets/teams-cloud.png b/versioned_docs/version-1.9/architecture/assets/teams-cloud.png deleted file mode 100644 index 0c4aef5c..00000000 Binary files a/versioned_docs/version-1.9/architecture/assets/teams-cloud.png and /dev/null differ diff --git a/versioned_docs/version-1.9/architecture/index.md b/versioned_docs/version-1.9/architecture/index.md deleted file mode 100644 index eb9923b1..00000000 --- a/versioned_docs/version-1.9/architecture/index.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: architecture -title: "Architecture" -sidebar_position: 7 ---- - -This document describes high-level Botkube architecture, all components in the system and interactions between them. - -Botkube is split into two main parts: - -- Botkube agent: Botkube binary that serves as a bridge between communication platforms (e.g. Slack, Discord) and Botkube plugins (sources and executors). -- [Botkube plugins](../plugin/index.md): The executable binaries that communicate with Botkube agent over an RPC interface. Botkube supports two types of plugins, respectively called Source plugins and Executor plugins. - -## Components - -The following diagram visualizes all main components in the system. - -![Architecture](assets/arch-light.svg#gh-light-mode-only)![Architecture](assets/arch-dark.svg#gh-dark-mode-only) - -### Plugin repository - -A plugin repository is a place where plugin binaries and index file are stored. This repository must be publicly available and supports downloading assets via HTTP(s). Any static file server can be used, for instance: GitHub Pages, `s3`, `gcs`, etc. - -### Plugin manager - -Plugin manager takes care of downloading enabled and bound plugins, running a given plugin binary and maintaining the gRPC connection. Under the hood, the [`go-plugin`](https://github.com/hashicorp/go-plugin/) library is used. Plugin manager is responsible both for the executor and source plugins. - -### Plugin executor bridge - -Plugin executor bridge is resolving the received Botkube command, calling the respective plugin, and sending back the response to a given communication platform. - -### Executor - -Executor is a binary that implements the [executor](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) Protocol Buffers contract. Executor runs a given command, such as `kubectl` one, and returns the response in a synchronous way. - -Streaming command response is not supported. As a result, commands which take a lot of time doesn't work well, as the response won't be sent until the command is finished. - -### Plugin source bridge - -Plugin source bridge is dispatching received source events to all configured communication channels. - -### Source - -Source is a binary that implements the [source](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) Protocol Buffers contract. Source starts asynchronous streaming of domain-specific events. For example, streaming Kubernetes events. - -### Bot - -Bot represents a bidirectional communication platform. Each bot is responsible for authenticating, managing connections, and providing an interface for receiving and sending messages for a given platform like Slack, Discord, etc. Connection is mostly done via WebSocket. - -### Sink - -Sink represents a unidirectional communication platform. Each sink is responsible for authenticating, managing connections, and providing an interface for sending messages for a given platform like Elasticsearch, outgoing webhook, etc. diff --git a/versioned_docs/version-1.9/architecture/teams.md b/versioned_docs/version-1.9/architecture/teams.md deleted file mode 100644 index b5b7c4d6..00000000 --- a/versioned_docs/version-1.9/architecture/teams.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -id: cloud-teams -title: "Cloud Teams connections overview" ---- - -# Cloud Teams connections overview - -This document describes the communication between the Botkube Cloud control-plane and the Botkube Agent configured with the Cloud Teams platform enabled. - -![teams-cloud.svg](assets/teams-cloud.png) - -### Agent outbound connections - -- HTTPS: `https://api.segment.io/*` -- HTTPS: `https://api.botkube.io/*` -- HTTPS: `https://github.com/kubeshop/botkube/releases/download/*` -- HTTP/2: `teams.botkube.io:50054` -- Docker images: https://ghcr.io more about required ports you can on [About GitHub's IP addresses](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/about-githubs-ip-addresses): - - `*.github.com` - - `*.pkg.github.com` - - `*.ghcr.io` - - `*.githubusercontent.com` - -### Agent inbound - -The Botkube Agent doesn't export any endpoints. - -# Components details - -## Agent - -The Botkube Agent Docker image is hosted on the GitHub Container registry, which uses the package namespace https://ghcr.io. The image format link: - -- [`ghcr.io/kubeshop/botkube:{botkube_version}`](https://github.com/kubeshop/botkube/pkgs/container/botkube), e.g., `ghcr.io/kubeshop/botkube:v1.8.0` - -### Plugin manager - -The index and archives for open source plugins are stored under a given Botkube GitHub release as [its assets](https://github.com/kubeshop/botkube/releases/tag/v1.8.0): - -- Plugin index: `https://github.com/kubeshop/botkube/releases/download/{botkube_version}/plugins-index.yaml`, e.g., https://github.com/kubeshop/botkube/releases/download/v1.8.0/plugins-index.yaml -- Plugin archive: `https://github.com/kubeshop/botkube/releases/download/{botkube_version}/{plugin_name_and_arch}.tar.gz` e.g., https://github.com/kubeshop/botkube/releases/download/v1.8.0/executor_kubectl_linux_amd64.tar.gz - - Plugin links can also be found in the `plugins-index.yaml` file. - -For the Botkube Cloud exclusive plugins, we serve plugin index via the Botkube Cloud API (`api.botkube.io`). As we use Google Cloud Storage as the storage provider, all the plugins are fetched from the `https://storage.googleapis.com` origin. - -During startup, the Botkube Agent downloads plugins index and all enabled plugins. They are stored under the `/tmp` folder mounted as the [`emptyDir`](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/templates/deployment.yaml#L146-L147). There is no Persistent Volume (PV), meaning that when the Agent Pod is, for example, rescheduled to another node, it downloads all dependencies again. To ensure that the [plugin manager](index.md#plugin-manager) does not make external calls, all required plugins must be present. You can achieve this by mounting a Persistent Volume Claim (PVC) at this path. Later, you can mount your Persistent Volume (PV) with cached plugins. - -### Plugin dependencies - -Each plugin may define required external dependencies that are downloaded by the [Plugin manager](#plugin-manager) at Agent startup. For now, those dependencies are taken from the official sources and are not mirrored to the Botkube Cloud registry. Here are the links that describe external dependencies for each officially supported plugin: - -- [`kubectl`](../configuration/executor/kubectl.md) executor: https://github.com/kubeshop/botkube/blob/release-1.9/internal/executor/kubectl/executor.go#L33-L42 - -`helm` plugin: - -- `helm` dependency: - - https://get.helm.sh/helm-v3.6.3-darwin-amd64.tar.gz//darwin-amd64 - - https://get.helm.sh/helm-v3.6.3-darwin-arm64.tar.gz//darwin-arm64 - - https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz//linux-amd64 - - https://get.helm.sh/helm-v3.6.3-linux-arm64.tar.gz//linux-arm64 -- `exec` plugin: - - `eget` dependency: - - https://github.com/zyedidia/eget/releases/download/v1.3.3/eget-1.3.3-darwin_amd64.tar.gz//eget-1.3.3-darwin_amd64 - - https://github.com/zyedidia/eget/releases/download/v1.3.3/eget-1.3.3-darwin_arm64.tar.gz//eget-1.3.3-darwin_arm64 - - https://github.com/zyedidia/eget/releases/download/v1.3.3/eget-1.3.3-linux_amd64.tar.gz//eget-1.3.3-linux_amd64 - - https://github.com/zyedidia/eget/releases/download/v1.3.3/eget-1.3.3-linux_arm64.tar.gz//eget-1.3.3-linux_arm64 -- `flux` plugin: - - `flux` dependency: - - https://github.com/fluxcd/flux2/releases/download/v2.0.1/flux_2.0.1_darwin_amd64.tar.gz - - https://github.com/fluxcd/flux2/releases/download/v2.0.1/flux_2.0.1_darwin_arm64.tar.gz - - https://github.com/fluxcd/flux2/releases/download/v2.0.1/flux_2.0.1_linux_amd64.tar.gz - - https://github.com/fluxcd/flux2/releases/download/v2.0.1/flux_2.0.1_linux_arm64.tar.gz - - `gh` dependency: - - https://github.com/cli/cli/releases/download/v2.32.1/gh_2.32.1_macOS_amd64.zip//gh_2.32.1_macOS_amd64/bin - - https://github.com/cli/cli/releases/download/v2.32.1/gh_2.32.1_macOS_arm64.zip//gh_2.32.1_macOS_arm64/bin - - https://github.com/cli/cli/releases/download/v2.32.1/gh_2.32.1_linux_amd64.tar.gz//gh_2.32.1_linux_amd64/bin - - https://github.com/cli/cli/releases/download/v2.32.1/gh_2.32.1_linux_arm64.tar.gz//gh_2.32.1_linux_arm64/bin - -If a plugin is not listed here, then it doesn't have any external dependencies. - -### Analytics - -The Agent uses the official [Go SDK](https://github.com/segmentio/analytics-go) to send anonymous analytics to https://segment.io. This library is sending a POST request on the `https://api.segment.io` endpoint. - -### Control-plane connection - -The Agent communicates with the Cloud control-plane using GraphQL. All requests are executed as a `POST` request on the `https://api.botkube.io/graphql` endpoint. We use that connection to: - -- Fetch Agent's configuration -- Send audit logs -- Periodically send Agent heartbeat -- Watch configuration changes - - all changes e.g., changing plugin configuration done on the Cloud UI Dashboard triggers Agent restart with 1 min (polling is used) - -#### Security - -The `https://api.botkube.io/graphql` endpoint is protected by JWT tokens. For the Agent, we use machine API tokens that are issued separately for each [Botkube Instance](#botkube-instance). This token allows you to work only in the context of a given Instance. - -### Cloud Teams connection - -The Cloud Teams platform communicates only with the Botkube control-plane using gRPC (HTTP/2 connection). For gRPC, TLS is enabled. We use [bidirectional streaming RPC](https://grpc.io/docs/what-is-grpc/core-concepts/#bidirectional-streaming-rpc}) to send the user `@Botkube` commands to the Agent and send Agent responses back to the Cloud control-plane. - -#### Security - -The `teams.botkube.io:50054` connection is protected by machine API tokens that are issued separately for each [Botkube Instance](#botkube-instance). This token allows you to work only in the context of a given Instance. - -## Concurrency Limits - -Concurrency limits restrict the number of simultaneous connections to our Cloud Teams router. You are allowed a maximum of 2 concurrent connections to support rollback updates. - -## Rate Limiting - -Rate limiting controls the frequency of requests that a component can send or receive. Rate limiting protects the Cloud Teams Router from misconfigured installations that may overload the system. Rate limiting is based on the Agent’s Instance ID. **We drop any messages that exceed the limit and do not push them into Pub/Sub.** You are allowed a maximum of 20 requests per second. - -## Cloud Dashboard - -Such constrains applies in the context of the Cloud organization: - -1. The organization has exactly one owner -2. The organization owner cannot be removed. -3. The organization owner is also a billing person. -4. All organization members have the same full permission. They can add and remove members and update organization information. -5. A user can be a member of multiple organizations. -6. Instances are always scoped to a given organization. - -## Useful links - -- [Botkube Agent architecture](https://docs.botkube.io/architecture/) -- [Cloud Teams installation tutorial](https://docs.botkube.io/installation/teams/) - -## Terminology - -### Botkube Instance - -A Botkube Instance is created on the Botkube Cloud side and holds the Botkube Agent configuration. diff --git a/versioned_docs/version-1.9/cli/_category_.json b/versioned_docs/version-1.9/cli/_category_.json deleted file mode 100644 index 3f09750c..00000000 --- a/versioned_docs/version-1.9/cli/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "CLI", - "position": 5 -} diff --git a/versioned_docs/version-1.9/cli/commands/_category_.json b/versioned_docs/version-1.9/cli/commands/_category_.json deleted file mode 100644 index 053c6e32..00000000 --- a/versioned_docs/version-1.9/cli/commands/_category_.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "label": "Commands" -} diff --git a/versioned_docs/version-1.9/cli/commands/botkube.md b/versioned_docs/version-1.9/cli/commands/botkube.md deleted file mode 100644 index 2738598c..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube.md +++ /dev/null @@ -1,44 +0,0 @@ ---- -title: botkube ---- - -## botkube - -Botkube CLI - -### Synopsis - -botkube - Botkube CLI - -A utility that simplifies working with Botkube. - -Quick Start: - - $ botkube install # Install Botkube - $ botkube uninstall # Uninstall Botkube - -Botkube Cloud: - - $ botkube login # Login into Botkube Cloud - $ botkube migrate # Automatically migrates Open Source installation into Botkube Cloud - -``` -botkube [flags] -``` - -### Options - -``` - -h, --help help for botkube - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube config](botkube_config.md) - This command consists of multiple subcommands for working with Botkube configuration -- [botkube install](botkube_install.md) - install or upgrade Botkube in k8s cluster -- [botkube login](botkube_login.md) - Login to a Botkube Cloud -- [botkube migrate](botkube_migrate.md) - Automatically migrates Botkube installation into Botkube Cloud -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics -- [botkube uninstall](botkube_uninstall.md) - uninstall Botkube from cluster -- [botkube version](botkube_version.md) - Print the CLI version diff --git a/versioned_docs/version-1.9/cli/commands/botkube_config.md b/versioned_docs/version-1.9/cli/commands/botkube_config.md deleted file mode 100644 index 2d0e7e77..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube_config.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -title: botkube config ---- - -## botkube config - -This command consists of multiple subcommands for working with Botkube configuration - -### Options - -``` - -h, --help help for config -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI -- [botkube config get](botkube_config_get.md) - Displays Botkube configuration diff --git a/versioned_docs/version-1.9/cli/commands/botkube_config_get.md b/versioned_docs/version-1.9/cli/commands/botkube_config_get.md deleted file mode 100644 index 56660f62..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube_config_get.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -title: botkube config get ---- - -## botkube config get - -Displays Botkube configuration - -``` -botkube config get [flags] -``` - -### Examples - -``` -# Show configuration for currently installed Botkube -botkube config get - -# Show configuration in JSON format -botkube config get -ojson - -# Save configuration in file -botkube config get > config.yaml - -``` - -### Options - -``` - --cfg-exporter-image-registry string Registry for the Config Exporter job image (default "ghcr.io") - --cfg-exporter-image-repo string Repository for the Config Exporter job image (default "kubeshop/botkube-config-exporter") - --cfg-exporter-image-tag string Tag of the Config Exporter job image (default "v9.99.9-dev") - --cfg-exporter-poll-period duration Interval used to check if Config Exporter job was finished (default 1s) - --cfg-exporter-timeout duration Maximum execution time for the Config Exporter job (default 1m0s) - --cloud-env-api-key string API key environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_API_KEY") - --cloud-env-endpoint string Endpoint environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_ENDPOINT") - --cloud-env-id string Identifier environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_IDENTIFIER") - -h, --help help for get - -l, --label string Label used for identifying the Botkube pod (default "app=botkube") - -n, --namespace string Namespace of Botkube pod (default "botkube") - --omit-empty-values Omits empty keys from printed configuration (default true) - -o, --output string Output format. One of: json | yaml (default "yaml") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube config](botkube_config.md) - This command consists of multiple subcommands for working with Botkube configuration diff --git a/versioned_docs/version-1.9/cli/commands/botkube_install.md b/versioned_docs/version-1.9/cli/commands/botkube_install.md deleted file mode 100644 index 6301e659..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube_install.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -title: botkube install ---- - -## botkube install - -install or upgrade Botkube in k8s cluster - -### Synopsis - -Use this command to install or upgrade the Botkube agent. - -``` -botkube install [OPTIONS] [flags] -``` - -### Examples - -``` -# Install latest stable Botkube version -botkube install - -# Install Botkube 0.1.0 version -botkube install --version 0.1.0 - -# Install Botkube from local git repository. Needs to be run from the main directory. -botkube install --repo @local -``` - -### Options - -``` - --atomic If set, process rolls back changes made in case of failed install/upgrade. The --wait flag will be set automatically if --atomic is used - -y, --auto-approve Skips interactive approval when upgrade is required. - --chart-name string Botkube Helm chart name. (default "botkube") - --dependency-update Update dependencies if they are missing before installing the chart - --description string add a custom description - --disable-openapi-validation If set, it will not validate rendered templates against the Kubernetes OpenAPI Schema - --dry-run Simulate an installation - --force Force resource updates through a replacement strategy - -h, --help help for install - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - --namespace string Botkube installation namespace. (default "botkube") - --no-hooks Disable pre/post install/upgrade hooks - --release-name string Botkube Helm chart release name. (default "botkube") - --render-subchart-notes If set, render subchart notes along with the parent - --repo string Botkube Helm chart repository location. It can be relative path to current working directory or URL. Use @stable tag to select repository which holds the stable Helm chart versions. (default "https://charts.botkube.io/") - --reset-values When upgrading, reset the values to the ones built into the chart - --reuse-values When upgrading, reuse the last release's values and merge in any overrides from the command line via --set and -f. If '--reset-values' is specified, this is ignored - --set stringArray Set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --set-file stringArray Set values from respective files specified via the command line (can specify multiple or separate values with commas: key1=path1,key2=path2) - --set-json stringArray Set JSON values on the command line (can specify multiple or separate values with commas: key1=jsonval1,key2=jsonval2) - --set-literal stringArray Set a literal STRING value on the command line - --set-string stringArray Set STRING values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) - --skip-crds If set, no CRDs will be installed. - --timeout duration Maximum time during which the Botkube installation is being watched, where "0" means "infinite". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default 10m0s) - -f, --values strings Specify values in a YAML file or a URL (can specify multiple) - --version string Botkube version. Possible values @latest, 1.2.0, ... (default "@latest") - -w, --watch --timeout Watches the status of the Botkube installation until it finish or the defined --timeout occurs. (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.9/cli/commands/botkube_login.md b/versioned_docs/version-1.9/cli/commands/botkube_login.md deleted file mode 100644 index 6dbc9943..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube_login.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -title: botkube login ---- - -## botkube login - -Login to a Botkube Cloud - -``` -botkube login [OPTIONS] [flags] -``` - -### Examples - -``` -# start interactive setup -botkube login - -``` - -### Options - -``` - --cloud-dashboard-url string Botkube Cloud URL (default "https://app.botkube.io") - -h, --help help for login - --local-server-addr string Address of a local server which is used for the login flow (default "localhost:8085") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.9/cli/commands/botkube_migrate.md b/versioned_docs/version-1.9/cli/commands/botkube_migrate.md deleted file mode 100644 index 661f5aa3..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube_migrate.md +++ /dev/null @@ -1,69 +0,0 @@ ---- -title: botkube migrate ---- - -## botkube migrate - -Automatically migrates Botkube installation into Botkube Cloud - -### Synopsis - -Automatically migrates Botkube installation to Botkube Cloud. -This command will create a new Botkube Cloud instance based on your existing Botkube configuration, and upgrade your Botkube installation to use the remote configuration. - -Supported Botkube bot platforms for migration: - -- Socket Slack -- Discord -- Mattermost - -Limitations: - -- Plugins are sourced from Botkube repository - -Use label selector to choose which Botkube pod you want to migrate. By default it's set to app=botkube. - -Examples: - - $ botkube migrate --label app=botkube --instance-name botkube-slack # Creates new Botkube Cloud instance with name botkube-slack and migrates pod with label app=botkube to it - -``` -botkube migrate [OPTIONS] [flags] -``` - -### Options - -``` - -y, --auto-approve Skips interactive approval for upgrading Botkube installation. - --cfg-exporter-image-registry string Registry for the Config Exporter job image (default "ghcr.io") - --cfg-exporter-image-repo string Repository for the Config Exporter job image (default "kubeshop/botkube-config-exporter") - --cfg-exporter-image-tag string Tag of the Config Exporter job image (default "v9.99.9-dev") - --cfg-exporter-poll-period duration Interval used to check if Config Exporter job was finished (default 1s) - --cfg-exporter-timeout duration Maximum execution time for the Config Exporter job (default 1m0s) - --cloud-api-url string Botkube Cloud API URL (default "https://api.botkube.io/graphql") - --cloud-dashboard-url string Botkube Cloud URL (default "https://app.botkube.io") - --cloud-env-api-key string API key environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_API_KEY") - --cloud-env-endpoint string Endpoint environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_ENDPOINT") - --cloud-env-id string Identifier environment variable name specified under Deployment for cloud installation. (default "CONFIG_PROVIDER_IDENTIFIER") - -h, --help help for migrate - --image-tag string Botkube image tag, e.g. "latest" or "v1.7.0" - --instance-name string Botkube Cloud Instance name that will be created - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - -l, --label string Label used for identifying the Botkube pod (default "app=botkube") - -n, --namespace string Namespace of Botkube pod (default "botkube") - -q, --skip-connect Skips connecting to Botkube Cloud after migration - --skip-open-browser Skips opening web browser after migration - --timeout duration Maximum time during which the Botkube installation is being watched, where "0" means "infinite". Valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default 10m0s) - --token string Botkube Cloud authentication token - -w, --watch --timeout Watches the status of the Botkube installation until it finish or the defined --timeout occurs. (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.9/cli/commands/botkube_telemetry.md b/versioned_docs/version-1.9/cli/commands/botkube_telemetry.md deleted file mode 100644 index 00e22bea..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube_telemetry.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -title: botkube telemetry ---- - -## botkube telemetry - -Configure collection of anonymous analytics - -### Options - -``` - -h, --help help for telemetry -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI -- [botkube telemetry disable](botkube_telemetry_disable.md) - Disable Botkube telemetry -- [botkube telemetry enable](botkube_telemetry_enable.md) - Enable Botkube telemetry diff --git a/versioned_docs/version-1.9/cli/commands/botkube_telemetry_disable.md b/versioned_docs/version-1.9/cli/commands/botkube_telemetry_disable.md deleted file mode 100644 index 65da8f3d..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube_telemetry_disable.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: botkube telemetry disable ---- - -## botkube telemetry disable - -Disable Botkube telemetry - -``` -botkube telemetry disable [flags] -``` - -### Examples - -``` -# To improve the user experience, Botkube collects anonymized data. -# It does not collect any identifying information, and all analytics -# are used only as aggregated collection of data to improve Botkube -# and adjust its roadmap. -# Read our privacy policy at https://docs.botkube.io/privacy - -# The Botkube CLI tool collects anonymous usage analytics. -# This data is only available to the Botkube authors and helps us improve the tool. - -# Disable Botkube telemetry -botkube telemetry disable - - - -``` - -### Options - -``` - -h, --help help for disable -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics diff --git a/versioned_docs/version-1.9/cli/commands/botkube_telemetry_enable.md b/versioned_docs/version-1.9/cli/commands/botkube_telemetry_enable.md deleted file mode 100644 index 0f2aa6db..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube_telemetry_enable.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: botkube telemetry enable ---- - -## botkube telemetry enable - -Enable Botkube telemetry - -``` -botkube telemetry enable [flags] -``` - -### Examples - -``` -# To improve the user experience, Botkube collects anonymized data. -# It does not collect any identifying information, and all analytics -# are used only as aggregated collection of data to improve Botkube -# and adjust its roadmap. -# Read our privacy policy at https://docs.botkube.io/privacy - -# Enable Botkube telemetry -botkube telemetry enable - - - -``` - -### Options - -``` - -h, --help help for enable -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube telemetry](botkube_telemetry.md) - Configure collection of anonymous analytics diff --git a/versioned_docs/version-1.9/cli/commands/botkube_uninstall.md b/versioned_docs/version-1.9/cli/commands/botkube_uninstall.md deleted file mode 100644 index cfcd752d..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube_uninstall.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -title: botkube uninstall ---- - -## botkube uninstall - -uninstall Botkube from cluster - -### Synopsis - -Use this command to uninstall the Botkube agent. - -``` -botkube uninstall [OPTIONS] [flags] -``` - -### Examples - -``` -# Uninstall default Botkube Helm release -botkube uninstall - -# Uninstall specific Botkube Helm release -botkube uninstall --release-name botkube-dev -``` - -### Options - -``` - -y, --auto-approve Skips interactive approval for deletion. - --cascade string Must be "background", "orphan", or "foreground". Selects the deletion cascading strategy for the dependents. Defaults to background. (default "background") - --description string add a custom description - --dry-run Simulate an uninstallation - -h, --help help for uninstall - --keep-history remove all associated resources and mark the release as deleted, but retain the release history - --kubeconfig string Paths to a kubeconfig. Only required if out-of-cluster. - --namespace string Botkube namespace. (default "botkube") - --no-hooks prevent hooks from running during uninstallation - --release-name string Botkube Helm release name. (default "botkube") - --timeout duration time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s) - --wait if set, will wait until all the resources are deleted before returning. It will wait for as long as --timeout (default true) -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.9/cli/commands/botkube_version.md b/versioned_docs/version-1.9/cli/commands/botkube_version.md deleted file mode 100644 index 4603edb5..00000000 --- a/versioned_docs/version-1.9/cli/commands/botkube_version.md +++ /dev/null @@ -1,39 +0,0 @@ ---- -title: botkube version ---- - -## botkube version - -Print the CLI version - -``` -botkube version [flags] -``` - -### Examples - -``` - -botkube version -botkube version -o=json -botkube version -o=yaml -botkube version -o=short - -``` - -### Options - -``` - -h, --help help for version - -o, --output string Output format. One of: json | pretty | short | yaml (default "pretty") -``` - -### Options inherited from parent commands - -``` - -v, --verbose int/string[=simple] Prints more verbose output. Allowed values: 0 - disable, 1 - simple, 2 - trace (default 0 - disable) -``` - -### SEE ALSO - -- [botkube](botkube.md) - Botkube CLI diff --git a/versioned_docs/version-1.9/cli/getting-started.mdx b/versioned_docs/version-1.9/cli/getting-started.mdx deleted file mode 100644 index 417948a4..00000000 --- a/versioned_docs/version-1.9/cli/getting-started.mdx +++ /dev/null @@ -1,135 +0,0 @@ ---- -id: getting-started -title: "Getting Started" -sidebar_position: 1 ---- - -# Getting Started - -Botkube includes a command-line interface (CLI) that you can use to interact with Botkube and Botkube Cloud from your terminal, or from a script. - -## Installation - -Select tab depending on the system you use: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -Use Homebrew to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- -Alternatively, download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.9.1/botkube-darwin-arm64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -
- - - -Use Homebrew to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- -Alternatively, download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.9.1/botkube-darwin-amd64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -
- - - -Download the Botkube CLI binary and move it to a directory under your `$PATH`: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.9.1/botkube-linux-amd64 -chmod +x botkube && mv botkube /usr/local/bin/botkube -``` - -:::note -You may need to use `sudo` to run the `mv` command as it moves the binary file to the `/usr/local/bin/` directory. -::: - -
- -Alternatively, if you use Homebrew, you can use it to install the latest Botkube CLI: - -```shell -brew install kubeshop/botkube/botkube -``` - -
- - - -Use curl to download the Botkube CLI binary: - -```shell -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.9.1/botkube-windows-amd64.exe -``` - -Move the binary to a directory under your `%PATH%`. - - - - - -Use curl to download the Botkube CLI binary: - -```shell -export OS="" # allowed values: darwin, linux, windows -export ARCH="" # allowed values: amd64, arm64, armv7 -#export SUFFIX=".exe" # uncomment if OS is 'windows' -curl -Lo botkube https://github.com/kubeshop/botkube/releases/download/v1.9.1/botkube-${OS}-${ARCH}${SUFFIX} -``` - -Move the binary to a directory under your `PATH`. - - - -
- -## First use - -For the commands that are nested under `cloud` command you first need to authenticate with Botkube cloud by running: - -```bash -botkube login -``` - -If credentials are valid, the output is: - -```shell -Login Succeeded -``` - -All available commands you can simply discover by running `botkube --help` or `botkube -h` to see the help output which corresponds to a given command. - -## Autocompletion - -To learn how to enable autocompletion for your shell, run: - -```bash -botkube completion --help -``` - -> **NOTE:** Be sure to **restart your shell** after installing autocompletion. - -When you start typing a `botkube` command, press the `` character to show a list of available completions. Type `-` to show available flag completions. diff --git a/versioned_docs/version-1.9/cli/migrate.md b/versioned_docs/version-1.9/cli/migrate.md deleted file mode 100644 index 6b434328..00000000 --- a/versioned_docs/version-1.9/cli/migrate.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -id: migrating-installation-to-botkube-cloud -title: "Migrating installation to Botkube Cloud" -sidebar_position: 2 ---- - -## Migrating installation to Botkube Cloud - -If you have started using Botkube with the Open Source installation, you have the option to migrate this instance to be managed using [Botkube Cloud](https://app.botkube.io/). - -To make the migration process easier, we provide a dedicated `botkube cloud migrate` command that seamlessly transfers your Botkube installation to Botkube Cloud. - -Supported Botkube platforms: - -- Socket Slack -- Discord -- Mattermost - -## Steps - -1. [Install Botkube CLI](./getting-started.mdx#installation) -2. [Login into Botkube Cloud](./getting-started.mdx#first-use) -3. Run Botkube migrate: - - ```bash - botkube cloud migrate - ``` - -## Limitations - -The following list contains current limitations that we will address in the near future: - -- `extraObjects` in Botkube [helm configurations](https://github.com/kubeshop/botkube/blob/593746a70d9eb23469c28e5c0274c9a40a7b651d/helm/botkube/values.yaml#L1040) are ignored. If you have any extra resources under `extraObjects` section, you need to migrate them on your own. -- Custom `rbac.groups` are ignored. -- All 3rd-party plugins are ignored. -- Minimal supported Botkube version is v1.0.0. - -## See more - -To learn more about `botkube cloud migrate` and all supported settings, visit the [Botkube migrate](./commands/botkube_migrate.md) document. diff --git a/versioned_docs/version-1.9/configuration/action.md b/versioned_docs/version-1.9/configuration/action.md deleted file mode 100644 index 147f96bf..00000000 --- a/versioned_docs/version-1.9/configuration/action.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -id: action -title: Action -sidebar_position: 5 ---- - -The action configuration allows you to automate your workflow by defining commands that are executed on an incoming event. Similar to communication platforms, actions use [source bindings](source/index.md) to define the event sources (command triggers) and [executor bindings](../configuration/executor) to run a given command. - -The actions can be disabled and enabled using dedicated commands. See the [Automated actions](../usage/automated-actions.md) usage document for more details. - -## Predefined actions - -There are two predefined actions available: - -- `describe-created-resource` - describes a newly created resource, -- `show-logs-on-error` - prints logs on Pod/StatefulSet/DaemonSet/Deployment error. - -Both of them are disabled by default. See details in the [Syntax](#syntax) section. - -## Action output - -The command output is sent to the communication platforms that define the same source bindings. If there is no communication platform defined with the same source bindings, the action is still executed, but the output is ignored. - -To learn more how to configure sources for communicators, read the [communication](./communication/index.md) documentation. - -## Command templates - -Each action defines the `command` property which defines a command to be executed. It supports [Go template](https://golang.org/pkg/text/template/) syntax. The command template is rendered before actual execution. - -The following variables are available: - -- `{{ .Event }}` - the event object that triggered the action. See all available event properties in the [`event.go`](https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go) file. - -There are multiple helper functions supported by the templating engine. To learn more, read the documentation on the [`slim-sprig`](https://go-task.github.io/slim-sprig/) library page. - -## Syntax - -```yaml -# Map of actions. Action contains configuration for automation based on observed events. -# The property name under `actions` object is an alias for a given configuration. You can define multiple actions configuration with different names. -# -# Format: actions.{alias} -actions: - "describe-created-resource": - # If true, enables the action. - enabled: false - # Action display name posted in the channels bound to the same source bindings. - displayName: "Describe created resource" - # Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). - # You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. - command: "kubectl describe {{ .Event.TypeMeta.Kind | lower }}{{ if .Event.Namespace }} -n {{ .Event.Namespace }}{{ end }} {{ .Event.Name }}" - - # Bindings for a given action. - bindings: - # Event sources that trigger a given action. - sources: - - k8s-create-events - # Executors configuration used to execute a configured command. - executors: - - k8s-default-tools - "show-logs-on-error": - # If true, enables the action. - enabled: false - - # Action display name posted in the channels bound to the same source bindings. - displayName: "Show logs on error" - # Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). - # You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available event properties on https://github.com/kubeshop/botkube/blob/main/pkg/event/event.go. - command: "kubectl logs {{ .Event.TypeMeta.Kind | lower }}/{{ .Event.Name }} -n {{ .Event.Namespace }}" - - # Bindings for a given action. - bindings: - # Event sources that trigger a given action. - sources: - - k8s-err-with-logs-events - # Executors configuration used to execute a configured command. - executors: - - k8s-default-tools -``` - -## RBAC - -The `ChannelName` RBAC policy is not supported for automated actions at this time. -Use the `Static` RBAC policy instead. For more information read the [RBAC](./rbac.md) documentation. diff --git a/versioned_docs/version-1.9/configuration/alias.md b/versioned_docs/version-1.9/configuration/alias.md deleted file mode 100644 index fb47775f..00000000 --- a/versioned_docs/version-1.9/configuration/alias.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -id: alias -title: Alias -sidebar_position: 4 ---- - -Botkube can define multiple aliases for arbitrary commands. The aliases are replaced with the underlying command before executing it. Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. - -Aliases work for all commands, including executor plugins and Botkube built-in ones. To learn more about how to configure Executors, see the [Executor](./executor/index.md) section. - -Aliases are defined globally for the whole Botkube installation. Once they are configured, read the [Aliases](../usage/executor/index.md#aliases) section in Usage document. - -## Botkube Cloud - -You can configure aliases in the Botkube Cloud dashboard. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click the **Aliases** link in the top right corner. -3. Click **Create new** button. -4. Provide display name, alias and command. - - For example, for `exec` plugin, you can provide display name as `Exec alias`, alias as `x`, and command as `exec`. - -5. Select instances for which you want to enable the alias. -6. Click **Apply** button. - -## Self-hosted Botkube syntax - -To configure the aliases for the self-hosted Botkube installation, use the following syntax: - -```yaml -# Custom aliases for given commands. -# The aliases are replaced with the underlying command before executing it. -# Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. -# -## Format: aliases.{alias} -aliases: - kc: - command: kubectl - displayName: "Kubectl alias" - k: - command: kubectl - displayName: "Kubectl alias" -## Multi-word alias example: -# kgp: -# command: kubectl get pods -# displayName: "Get pods" -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.9/configuration/assets/botkube-read-only.svg b/versioned_docs/version-1.9/configuration/assets/botkube-read-only.svg deleted file mode 100644 index d396ca54..00000000 --- a/versioned_docs/version-1.9/configuration/assets/botkube-read-only.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - -
dispatch
command
dispatch...
runs kubectl 
command
runs kubectl...
Slack
Slack
#general
#general
Kubernetes
Kubernetes
API Server
API Server
runs plugin
with dedicate
kubeconfig 
runs plugin...
resolves mapping
and generates
kubeconfig
resolves mapping...
#kubeconfig
group: general
#kubeconfiggroup...
uses
attached kubeconfig
uses...
kubectl plugin
kubectl plugin
# RBAC config mapping
botkube/kubectl:

context:
rbac:
group:
type: ChannelName
# RBAC config mapping...
Botkube Core
Botkube Core
Channels:
Channels:
Text is not SVG - cannot display
\ No newline at end of file diff --git a/versioned_docs/version-1.9/configuration/assets/cloud-rbac-default.png b/versioned_docs/version-1.9/configuration/assets/cloud-rbac-default.png deleted file mode 100644 index d8882292..00000000 Binary files a/versioned_docs/version-1.9/configuration/assets/cloud-rbac-default.png and /dev/null differ diff --git a/versioned_docs/version-1.9/configuration/communication/index.md b/versioned_docs/version-1.9/configuration/communication/index.md deleted file mode 100644 index 4ac172a7..00000000 --- a/versioned_docs/version-1.9/configuration/communication/index.md +++ /dev/null @@ -1,243 +0,0 @@ ---- -id: communication -title: "Communication" -sidebar_position: 1 ---- - -The communication settings contain: - -- Configuration for communication platforms scoped in separate communication groups, -- Platform-specific options, such as multichannel configuration for platforms that support channels. - -The settings are applicable only for self-hosted Botkube installation. Cloud Slack and Microsoft Teams platforms are exclusive to Botkube Cloud. - -## Communication groups - -Communication group is a way to aggregate separate configurations for a set of communication platforms. You can specify multiple communication groups, and, in a result, support multiple Slack or Mattermost workspaces, Discord servers, or Elasticsearch server instances. - -Also, most platforms also support another level of multiple configurations within a workspace. For example, Slack supports multichannel configuration. To learn more about platform-specific options, see the [Syntax](#syntax) section. - -:::note -The purpose of the communication group is to allow using multiple workspaces, e.g. for Slack or Mattermost. To use multiple channels inside the same workspace, don't define separate communication groups, but use `channels` property under a given communication platform instead. -::: - -### Example - -Consider the following configuration: - -```yaml -communications: - "first-group": # Your own alias of a given communication group - socketSlack: - enabled: true - botToken: "{SLACK_BOT_TOKEN_1}" # Bot token for Botkube Slack app installed in Workspace 1 - appToken: "{SLACK_APP_TOKEN_1}" # App token for Botkube Slack app installed in Workspace 1 - channels: - "general": # Your own alias for the channel configuration - name: general - bindings: - executors: # Executors configuration for a given channel - - k8s-default-tools - sources: # Notification sources configuration for a given channel - - k8s-events - "random": # Your own alias for the channel configuration - name: random - bindings: - executors: [] # Executors configuration for a given channel - sources: # Notification sources configuration for a given channel - - k8s-events - "second-group": # Your own alias of a given communication group - socketSlack: - enabled: true - botToken: "{SLACK_BOT_TOKEN_2}" # Bot token for Botkube Slack app installed in Workspace 2 - appToken: "{SLACK_APP_TOKEN_2}" # App token for Botkube Slack app installed in Workspace 2 - channels: - "primary-channel": # Your own alias for the channel configuration - name: general - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: true - bindings: - executors: # Executors configuration for a given channel - - k8s-default-tools - sources: # Notification sources configuration for a given channel - - k8s-events -``` - -The example YAML configuration definition results in the following configuration. - -For Slack **Workspace 1**, as defined by the first communication group (`first-group`): - -- Notifications from `k8s-events` source are sent to the `general` and `random` channels. -- Commands from the `k8s-default-tools` configuration can be executed in the `general` channel. On `random` channel executors are not configured. - -For Slack **Workspace 2**, as defined by the second communication group (`second-group`): - -- Notifications are configured to be sent from the `k8s-events` source to the `general` channel. They are disabled by default, and can be enabled with `@Botkube` command or during Botkube upgrade. -- Commands from the `k8s-default-tools` configuration can be executed in the `general` channel. - -## Source and Executor Bindings - -Most of the communication platforms support executor and source bindings, which allows fine-tuning the notifications and allowed Botkube commands inside a given channel. - -With executor bindings you can configure which executors are allowed in a given channel. To read more about executor configuration, see the [Executor](../executor) document. - -With source bindings, you can specify which events are sent to a given channel (or, in case of Elasticsearch, index). To read more about source configuration, see the [Source](../source) document. - -## Syntax - -Each communication platform has specific options, however they share a similar syntax for consistency. -For example, bot integrations such as Slack, Mattermost or Discord have multichannel support, that is you can configure multiple channels with separate bindings. Same with Elasticsearch - you can forward notifications to multiple Elasticsearch indices, according to the sources configuration. - -```yaml -# Map of communication groups. Communication group contains settings for multiple communication platforms. -# The property name under `communications` object is an alias for a given configuration group. You can define multiple communication groups with different names. -# @default -- See the `values.yaml` file for full object. -# -## Format: communications.{alias} -communications: - "default-group": - ## Settings for Slack with Socket Mode. - socketSlack: - # If true, enables Slack bot. - enabled: false - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - ## Format: channels.{alias} - channels: - "default": - # Slack channel name without '#' prefix where you have added Botkube and want to receive notifications in. - name: "SLACK_CHANNEL" - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-err-events - - k8s-recommendation-events - # Slack bot token for your own Slack app. - # [Ref doc](https://api.slack.com/authentication/token-types). - botToken: "" - # Slack app-level token for your own Slack app. - # [Ref doc](https://api.slack.com/authentication/token-types). - appToken: "" - ## Settings for Mattermost. - mattermost: - # If true, enables Mattermost bot. - enabled: false - # User in Mattermost which belongs the specified Personal Access token. - botName: "Botkube" - # The URL (including http/https schema) where Mattermost is running. e.g https://example.com:9243 - url: "MATTERMOST_SERVER_URL" - # Personal Access token generated by Botkube user. - token: "MATTERMOST_TOKEN" - # The Mattermost Team name where Botkube is added. - team: "MATTERMOST_TEAM" - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - ## Format: channels.{alias} - channels: - "default": - # The Mattermost channel name for receiving Botkube alerts. - # The Botkube user needs to be added to it. - name: "MATTERMOST_CHANNEL" - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: false - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-err-events - - k8s-recommendation-events - - ## Settings for Discord. - discord: - # If true, enables Discord bot. - enabled: false - # Botkube Bot Token. - token: "DISCORD_TOKEN" - # Botkube Application Client ID. - botID: "DISCORD_BOT_ID" - # Map of configured channels. The property name under `channels` object is an alias for a given configuration. - # - ## Format: channels.{alias} - channels: - "default": - # Discord channel ID for receiving Botkube alerts. - # The Botkube user needs to be added to it. - id: "DISCORD_CHANNEL_ID" - notification: - # If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. - disabled: false - bindings: - # Executors configuration for a given channel. - executors: - - k8s-default-tools - # Notification sources configuration for a given channel. - sources: - - k8s-err-events - - k8s-recommendation-events - - ## Settings for Elasticsearch. - elasticsearch: - # If true, enables Elasticsearch. - enabled: false - awsSigning: - # If true, enables awsSigning using IAM for Elasticsearch hosted on AWS. Make sure AWS environment variables are set. - # [Ref doc](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html). - enabled: false - # AWS region where Elasticsearch is deployed. - awsRegion: "us-east-1" - # AWS IAM Role arn to assume for credentials, use this only if you don't want to use the EC2 instance role or not running on AWS instance. - roleArn: "" - # The server URL, e.g https://example.com:9243 - server: "ELASTICSEARCH_ADDRESS" - # Basic Auth username. - username: "ELASTICSEARCH_USERNAME" - # Basic Auth password. - password: "ELASTICSEARCH_PASSWORD" - # If true, skips the verification of TLS certificate of the Elastic nodes. - # It's useful for clusters with self-signed certificates. - skipTLSVerify: false - # Specify the log level for Elasticsearch client. Leave empty to disable logging. - ## Possible values: "info", "error", "trace". - ## - "info": Logs information level messages. - ## - "error": Logs information and error level messages. - ## - "trace": Logs information, error, and trace level messages. - ## To disable logging, simply leave the logLevel empty or remove the line. - logLevel: "" - - # Map of configured indices. The `indices` property name is an alias for a given configuration. - # - ## Format: indices.{alias} - indices: - "default": - # Configures Elasticsearch index settings. - name: botkube - type: botkube-event - shards: 1 - replicas: 0 - bindings: - # Notification sources configuration for a given index. - sources: - - k8s-err-events - - k8s-recommendation-events - - ## Settings for Webhook. - webhook: - # If true, enables Webhook. - enabled: false - # The Webhook URL, e.g.: https://example.com:80 - url: "WEBHOOK_URL" - bindings: - # Notification sources configuration for the webhook. - sources: - - k8s-err-events - - k8s-recommendation-events -``` - -The default configuration for Helm chart can be found in [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml). diff --git a/versioned_docs/version-1.9/configuration/communication/vault-csi.md b/versioned_docs/version-1.9/configuration/communication/vault-csi.md deleted file mode 100644 index e9279d57..00000000 --- a/versioned_docs/version-1.9/configuration/communication/vault-csi.md +++ /dev/null @@ -1,168 +0,0 @@ ---- -id: vault-csi -title: "Tokens from Vault via CSI driver" -sidebar_position: 1 ---- - -This tutorial shows how to install Botkube which takes the configuration from Vault instance. - -## Prerequisites - -- Kubernetes Clusters that supports CSI. - - For example, to run [K3s](https://k3s.io/) using [Lima](https://github.com/lima-vm/lima), run: - - ```bash - limactl start template://k3s - ``` - -- [Socket Slack integration installed](../../installation/slack/socket-slack.md). -- [`helm`](https://helm.sh/docs/intro/install/) v3 installed. -- [`kubectl`](https://kubernetes.io/docs/tasks/tools/#kubectl) installed. - -## Steps - -This instruction guides you through the installation of Botkube and Vault on a Kubernetes cluster and configuring them together. - -1. Install Vault with CSI enabled: - - ```bash - helm repo add hashicorp https://helm.releases.hashicorp.com - helm repo update - helm install vault hashicorp/vault --namespace default \ - --set "server.dev.enabled=true" \ - --set "injector.enabled=false" \ - --set "csi.enabled=true" - ``` - -2. Add Slack token in Vault: - - ```bash - # Exec to pod - kubectl exec -n default -it vault-0 -- /bin/sh - ``` - - ```bash - # Write the token to Vault - vault kv put -mount=secret slack-app-token token=xapp-... - vault kv put -mount=secret slack-bot-token token=xoxb-... - ``` - -3. Enable Vault's Kubernetes authentication: - - ```bash - vault auth enable kubernetes - vault write auth/kubernetes/config \ - kubernetes_host="https://$KUBERNETES_PORT_443_TCP_ADDR:443" - ``` - - ```bash - vault policy write internal-app - < /tmp/values.yaml << ENDOFFILE - extraObjects: - - apiVersion: secrets-store.csi.x-k8s.io/v1 - kind: SecretProviderClass - metadata: - name: vault-database - spec: - provider: vault - parameters: - roleName: "database" - vaultAddress: "http://vault.default:8200" - objects: | - - objectName: "slack-app-token" - secretPath: "secret/data/slack-app-token" - secretKey: "token" - - objectName: "slack-bot-token" - secretPath: "secret/data/slack-bot-token" - secretKey: "token" - secretObjects: - - secretName: communication-slack - type: Opaque - data: - - objectName: "slack-app-token" - key: "slack-app-token" - - objectName: "slack-bot-token" - key: "slack-bot-token" - - communications: - 'default-group': - # Settings for SocketSlack - socketSlack: - enabled: true - channels: {} # configure your channels - # botToken - specified via env variable - # appToken - specified via env variable - - extraEnv: - - name: BOTKUBE_COMMUNICATIONS_DEFAULT-GROUP_SOCKET__SLACK_APP__TOKEN - valueFrom: - secretKeyRef: - name: communication-slack - key: slack-app-token - - name: BOTKUBE_COMMUNICATIONS_DEFAULT-GROUP_SOCKET__SLACK_BOT__TOKEN - valueFrom: - secretKeyRef: - name: communication-slack - key: slack-bot-token - - extraVolumeMounts: - - name: secrets-store-inline - mountPath: "/mnt/secrets-store" - readOnly: true - - extraVolumes: - - name: secrets-store-inline - csi: - driver: secrets-store.csi.k8s.io - readOnly: true - volumeAttributes: - secretProviderClass: "vault-database" - ENDOFFILE - ``` - -6. Install Botkube: - - :::note - You need to clone the https://github.com/kubeshop/botkube first. - ::: - - ```bash - helm install botkube --namespace default \ - -f /tmp/values.yaml \ - ./helm/botkube - ``` diff --git a/versioned_docs/version-1.9/configuration/executor/assets/flux-rbac.png b/versioned_docs/version-1.9/configuration/executor/assets/flux-rbac.png deleted file mode 100644 index 2f5cb08c..00000000 Binary files a/versioned_docs/version-1.9/configuration/executor/assets/flux-rbac.png and /dev/null differ diff --git a/versioned_docs/version-1.9/configuration/executor/doctor.md b/versioned_docs/version-1.9/configuration/executor/doctor.md deleted file mode 100644 index ca119f9d..00000000 --- a/versioned_docs/version-1.9/configuration/executor/doctor.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -id: doctor -title: Doctor -sidebar_position: 5 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The Botkube Doctor executor plugin allows you to run the `doctor` command directly in the chat window of each communication platform. Doctor is a ChatGPT integration project that knows how to diagnose Kubernetes problems and suggest solutions. - -The Doctor plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Doctor plugin. -6. Configure OpenAI API Key. - - Obtain it from the OpenAI website as described [here](https://help.openai.com/en/articles/4936850-where-do-i-find-my-secret-api-key) and set it as follows: - - ```yaml - apiKey: "" # Open AI API Key - ``` - -7. Click **Save** button. - -## Configuration Syntax - -The plugin supports the following configuration: - -```yaml -## Open API key for accessing the ChatGPT engine. You can get it at https://platform.openai.com/account/api-keys. -apiKey: "" -## OpenAI API Base URL. If empty, the default "https://api.openai.com/v1" value is used. -apiBaseUrl: "" -## Default engine to use. If empty, "text-davinci-003" engine is used. -defaultEngine: "" -## Optional organization ID for requests. -organizationID: "" -## User agent to use for requests. If empty, the default value is used ("go-gpt3"). -userAgent: "" -``` diff --git a/versioned_docs/version-1.9/configuration/executor/exec.md b/versioned_docs/version-1.9/configuration/executor/exec.md deleted file mode 100644 index 59c0f820..00000000 --- a/versioned_docs/version-1.9/configuration/executor/exec.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -id: exec -title: Exec -sidebar_position: 4 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The `exec` executor plugin allows you to install and run CLI applications directly from chat (e.g., Slack, Discord, or Mattermost) without any hassle. - -The `exec` plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -By default, the read-only `KUBECONFIG` is assigned. For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it from plugin's `context` configuration. To learn more refer to the [RBAC section](../rbac.md). - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the `exec` plugin. -6. Click **Save** button. - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# An array of templates that define how to convert the command output into an interactive message. -templates: - # Link to templates source - # It uses the go-getter library, which supports multiple URL formats (such as HTTP, Git repositories, or S3) and is able to unpack archives. - # For more details, see the documentation at https://github.com/hashicorp/go-getter. - - ref: github.com/kubeshop/botkube//cmd/executor/exec/templates?ref=release-1.8 -``` diff --git a/versioned_docs/version-1.9/configuration/executor/flux.md b/versioned_docs/version-1.9/configuration/executor/flux.md deleted file mode 100644 index 71bb2bcc..00000000 --- a/versioned_docs/version-1.9/configuration/executor/flux.md +++ /dev/null @@ -1,97 +0,0 @@ ---- -id: flux -title: Flux -sidebar_position: 6 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The Botkube Flux executor plugin allows you to run the [`flux`](https://fluxcd.io/) CLI commands directly within the chat window of your chosen communication platform. - -The Flux plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Prerequisite elevated RBAC permissions - -One of the plugin capabilities is the `flux diff` command. To use it, you need to update the Flux plugin RBAC configuration. This is necessary because the command performs a server-side dry run that requires patch permissions, as specified in the [Kubernetes documentation](https://kubernetes.io/docs/reference/using-api/api-concepts/#dry-run-authorization). - -First, create RBAC resources on your cluster: - -```shell -cat > /tmp/flux-rbac.yaml << ENDOFFILE ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: flux -rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list", "patch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: flux -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: flux -subjects: -- kind: Group - name: flux - apiGroup: rbac.authorization.k8s.io -ENDOFFILE - -kubectl apply -f /tmp/flux-rbac.yaml -``` - -Next, use the `flux` group in the plugin RBAC configuration: - -![Flux RBAC](./assets/flux-rbac.png) - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Flux plugin. -6. Click **Configure** button and then **Configuration as Code** tab. -7. Configure optional GitHub access token. - -The Flux plugin comes with integrated GitHub support. To enable it, you'll need a valid [GitHub token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token). Set the token with the following configuration: - -```yaml -github: - auth: - accessToken: "" # your GitHub access token -``` - -6. Click **Save** button. - -By default, the Flux plugin has read-only access. To perform actions like creating or deleting Flux-related sources, you'll need to customize the [RBAC](../rbac.md#configuration). - -## Configuration Syntax - -The plugin supports the following configuration: - -```yaml -github: - auth: - # GitHub access token. - # Instructions for token creation: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token. - # Lack of token may limit functionality, e.g., adding comments to pull requests or approving them. - accessToken: "" -log: - level: "info" -``` diff --git a/versioned_docs/version-1.9/configuration/executor/helm.md b/versioned_docs/version-1.9/configuration/executor/helm.md deleted file mode 100644 index 4830990d..00000000 --- a/versioned_docs/version-1.9/configuration/executor/helm.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: helm -title: Helm -sidebar_position: 3 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The Botkube Helm executor plugin allows you to run the `helm` command directly in the chat window of each communication platform. - -The Helm plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -By default, just the read-only `helm` commands are supported. For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it in the RBAC configuration. To learn more, refer to the [RBAC section](../rbac.md). - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Helm plugin. -6. Click **Save** button. - -## Configuration Syntax - -The plugin supports the following configuration: - -```yaml -# Configures the default Namespace for executing Botkube `helm` commands. If not set, uses 'default'. -defaultNamespace: "default" -# Allowed values are configmap, secret, memory. -helmDriver: "secret" -# Location for storing Helm configuration. -helmConfigDir: "/tmp/helm/" -config directory. -# Location for storing Helm cache. -helmCacheDir: "/tmp/helm/.cache" -``` - -## Merging strategy - -For all collected `helm` executors bindings, configuration properties are overridden based on the order of the binding list for a given channel. The priority is given to the last binding specified on the list. Empty properties are omitted. diff --git a/versioned_docs/version-1.9/configuration/executor/index.md b/versioned_docs/version-1.9/configuration/executor/index.md deleted file mode 100644 index e803e277..00000000 --- a/versioned_docs/version-1.9/configuration/executor/index.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -id: executor -title: Executor -sidebar_position: 3 ---- - -The executor configuration allows you to define multiple executor configurations that can be later referred in [communication](../communication) bindings. For example, take a look at such executor definition: - -```yaml -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: - -```yaml -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: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Next, you can configure executor from a given repository: - -```yaml -executors: - "plugins": - repo-name/executor-name@v1.0.0: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} -``` - -For all executor configuration properties, see the [**syntax**](#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. - -```yaml -# 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 - -```yaml -# 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/echo@v1.9.1: # Plugin name syntax: /[@]. 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.9.1/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](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.9/configuration/executor/kubectl.md b/versioned_docs/version-1.9/configuration/executor/kubectl.md deleted file mode 100644 index a70988c2..00000000 --- a/versioned_docs/version-1.9/configuration/executor/kubectl.md +++ /dev/null @@ -1,99 +0,0 @@ ---- -id: kubectl -title: Kubectl -sidebar_position: 2 ---- - -The Botkube Kubectl executor plugin allows you to run the `kubectl` command directly in the chat window of each communication platform. - -By default, just the read-only `kubectl` commands are supported. For enabling commands that require create, update or delete rules, you need to create specific (Cluster)Role and (Cluster)RoleBinding and reference it in the RBAC configuration. To learn more, refer to the [RBAC section](../rbac.md). - -## Enabling plugin - -### Self-hosted Botkube installation - -The Kubectl plugin is hosted by the official Botkube plugin repository. First, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.9.1/plugins-index.yaml -``` - -To enable Kubectl executor, add ``--set 'executors.k8s-default-tools.botkube/kubectl.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# Configures the default Namespace for executing Botkube `kubectl` commands. If not set, uses the 'default'. -defaultNamespace: "default" -# Configures the interactive kubectl command builder. -interactiveBuilder: - allowed: - # Configures which K8s namespace are displayed in namespace dropdown. - # If not specified, plugin needs to have access to fetch all Namespaces, otherwise Namespace dropdown won't be visible at all. - namespaces: ["default"] - # Configures which `kubectl` methods are displayed in commands dropdown. - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - # Configures which K8s resource are displayed in resources dropdown. - resources: ["deployments", "pods", "namespaces"] -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -## Merging strategy - -For all collected `kubectl` executors bindings, configuration properties are overridden based on the order of the binding list for a given channel. The priority is given to the last binding specified on the list. Empty properties are omitted. - -### Example - -Consider such configuration in the Botkube self-hosted installation: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - name: "random" - bindings: - executors: - - kubectl-one - - kubectl-two - - kubectl-three - -executors: - "kubectl-one": - kubectl: - enabled: true - config: - defaultNamespace: "default" - interactiveBuilder: - allowed: - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - resources: ["deployments", "pods", "namespaces"] - "kubectl-two": - kubectl: - enabled: true - config: - interactiveBuilder: - allowed: - namespaces: ["default"] - verbs: ["api-resources", "top"] - "kubectl-three": - kubectl: - enabled: false - config: - interactiveBuilder: - allowed: - namespaces: ["kube-system"] -``` - -We can see that: - -- Only the `default` namespace is displayed in the interactive command builder. This is a result of merging `kubectl-one` and `kubectl-two`. The `kubectl-three` binding is not taken into account as it's disabled. -- Only the `api-resources` and `top` verbs are displayed in the interactive command builder as they are overridden by the `kubectl-two`. -- All resources defined in `kubectl-one` are displayed in the interactive command builder as other enabled bindings don't override this property. diff --git a/versioned_docs/version-1.9/configuration/general.md b/versioned_docs/version-1.9/configuration/general.md deleted file mode 100644 index deb37cb8..00000000 --- a/versioned_docs/version-1.9/configuration/general.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: general -title: General -sidebar_position: 6 ---- - -The general settings holds a general configuration for the Botkube backend. For example, log level, disabling config watcher and similar. - -## Syntax - -```yaml -# General Botkube configuration. -settings: - # Cluster name to differentiate incoming messages. - clusterName: not-configured - # If true, notifies about new Botkube releases. - upgradeNotifier: true - # Botkube logging settings. - log: - # Sets one of the log levels. Allowed values: `info`, `warn`, `debug`, `error`, `fatal`, `panic`. - level: info - # Configures log format. Allowed values: `text`, `json`. - formatter: json - # If true, disable ANSI colors in logging. Ignored when `json` formatter is used. - disableColors: false - -# Parameters for the Config Watcher component which reloads Botkube on ConfigMap changes. -# It restarts Botkube when configuration data change is detected. It watches ConfigMaps and/or Secrets with the `botkube.io/config-watch: "true"` label from the namespace where Botkube is installed. -configWatcher: - # If true, restarts the Botkube Pod on config changes. - enabled: true - # In-cluster Config Watcher configuration. It is used when remote configuration is not provided. - inCluster: - # Resync period for the Config Watcher informers. - informerResyncPeriod: 10m -``` - -The default configuration for Helm chart can be found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.9/configuration/helm-chart-parameters.md b/versioned_docs/version-1.9/configuration/helm-chart-parameters.md deleted file mode 100644 index 74d58134..00000000 --- a/versioned_docs/version-1.9/configuration/helm-chart-parameters.md +++ /dev/null @@ -1,241 +0,0 @@ ---- -id: helm-chart-parameters -title: Helm chart parameters -sidebar_position: 8 ---- - -![Version: v1.9.1](https://img.shields.io/badge/Version-v1.9.1-informational?style=flat-square) ![AppVersion: v1.9.1](https://img.shields.io/badge/AppVersion-v1.9.1-informational?style=flat-square) - -Controller for the Botkube Slack app which helps you monitor your Kubernetes cluster, debug deployments and run specific checks on resources in the cluster. - -**Homepage:** [botkube.io](https://botkube.io) - -## Maintainers - -| Name | Email | -| ---------------- | --------------------- | -| Botkube Dev Team | `dev-team@botkube.io` | - -## Source Code - -- [github.com/kubeshop/botkube](https://github.com/kubeshop/botkube) - -## Parameters - -| Key | Type | Default | Description | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| [image.registry](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L14) | string | `"ghcr.io"` | Botkube container image registry. | -| [image.repository](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L16) | string | `"kubeshop/botkube"` | Botkube container image repository. | -| [image.pullPolicy](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L18) | string | `"IfNotPresent"` | Botkube container image pull policy. | -| [image.tag](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L20) | string | `"v1.9.1"` | Botkube container image tag. Default tag is `appVersion` from Chart.yaml. | -| [podSecurityPolicy](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L24) | object | `{"enabled":false}` | Configures Pod Security Policy to allow Botkube to run in restricted clusters. [Ref doc](https://kubernetes.io/docs/concepts/policy/pod-security-policy/). | -| [securityContext](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L30) | object | Runs as a Non-Privileged user. | Configures security context to manage user Privileges in Pod. [Ref doc](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-pod). | -| [containerSecurityContext](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L36) | object | `{"allowPrivilegeEscalation":false,"privileged":false,"readOnlyRootFilesystem":true}` | Configures container security context. [Ref doc](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/#set-the-security-context-for-a-container). | -| [rbac](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L43) | object | `{"create":true,"groups":{"botkube-plugins-default":{"create":true,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list"]}]}},"rules":[],"serviceAccountMountPath":"/var/run/7e7fd2f5-b15d-4803-bc52-f54fba357e76/secrets/kubernetes.io/serviceaccount","staticGroupName":""}` | Role Based Access for Botkube Pod and plugins. [Ref doc](https://kubernetes.io/docs/admin/authorization/rbac/). | -| [rbac.serviceAccountMountPath](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L47) | string | `"/var/run/7e7fd2f5-b15d-4803-bc52-f54fba357e76/secrets/kubernetes.io/serviceaccount"` | It is used to specify a custom path for mounting a service account to the Botkube deployment. This is important because we run plugins within the same Pod, and we want to avoid potential bugs when plugins rely on the default in-cluster K8s client configuration. Instead, they should always use kubeconfig specified directly for a given plugin. | -| [rbac.create](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L50) | bool | `true` | Configure RBAC resources for Botkube and (deprecated) `staticGroupName` subject with `rules`. For creating RBAC resources related to plugin permissions, use the `groups` property. | -| [rbac.rules](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L52) | list | `[]` | Deprecated. Use `rbac.groups` instead. | -| [rbac.staticGroupName](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L54) | string | `""` | Deprecated. Use `rbac.groups` instead. | -| [rbac.groups](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L56) | object | `{"botkube-plugins-default":{"create":true,"rules":[{"apiGroups":["*"],"resources":["*"],"verbs":["get","watch","list"]}]}}` | Use this to create RBAC resources for specified group subjects. | -| [kubeconfig.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L67) | bool | `false` | If true, enables overriding the Kubernetes auth. | -| [kubeconfig.base64Config](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L69) | string | `""` | A base64 encoded kubeconfig that will be stored in a Secret, mounted to the Pod, and specified in the KUBECONFIG environment variable. | -| [kubeconfig.existingSecret](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L74) | string | `""` | A Secret containing a kubeconfig to use. | -| [actions](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L81) | object | See the `values.yaml` file for full object. | Map of actions. Action contains configuration for automation based on observed events. The property name under `actions` object is an alias for a given configuration. You can define multiple actions configuration with different names. | -| [actions.describe-created-resource.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L84) | bool | `false` | If true, enables the action. | -| [actions.describe-created-resource.displayName](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L86) | string | `"Describe created resource"` | Action display name posted in the channels bound to the same source bindings. | -| [actions.describe-created-resource.command](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L91) | string | See the `values.yaml` file for the command in the Go template form. | Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available Kubernetes event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. | -| [actions.describe-created-resource.bindings](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L94) | object | `{"executors":["k8s-default-tools"],"sources":["k8s-create-events"]}` | Bindings for a given action. | -| [actions.describe-created-resource.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L96) | list | `["k8s-create-events"]` | Event sources that trigger a given action. | -| [actions.describe-created-resource.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L99) | list | `["k8s-default-tools"]` | Executors configuration used to execute a configured command. | -| [actions.show-logs-on-error.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L103) | bool | `false` | If true, enables the action. | -| [actions.show-logs-on-error.displayName](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L106) | string | `"Show logs on error"` | Action display name posted in the channels bound to the same source bindings. | -| [actions.show-logs-on-error.command](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L111) | string | See the `values.yaml` file for the command in the Go template form. | Command to execute when the action is triggered. You can use Go template (https://pkg.go.dev/text/template) together with all helper functions defined by Slim-Sprig library (https://go-task.github.io/slim-sprig). You can use the `{{ .Event }}` variable, which contains the event object that triggered the action. See all available Kubernetes event properties on https://github.com/kubeshop/botkube/blob/main/internal/source/kubernetes/event/event.go. | -| [actions.show-logs-on-error.bindings](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L113) | object | `{"executors":["k8s-default-tools"],"sources":["k8s-err-with-logs-events"]}` | Bindings for a given action. | -| [actions.show-logs-on-error.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L115) | list | `["k8s-err-with-logs-events"]` | Event sources that trigger a given action. | -| [actions.show-logs-on-error.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L118) | list | `["k8s-default-tools"]` | Executors configuration used to execute a configured command. | -| [sources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L127) | object | See the `values.yaml` file for full object. | Map of sources. Source contains configuration for Kubernetes events and sending recommendations. The property name under `sources` object is an alias for a given configuration. You can define multiple sources configuration with different names. Key name is used as a binding reference. | -| [sources.k8s-recommendation-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L132) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L135) | object | `{"group":{"prefix":"","static":{"values":["botkube-plugins-default"]},"type":"Static"}}` | RBAC configuration for this plugin. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.type](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L138) | string | `"Static"` | Static impersonation for a given username and groups. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.prefix](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L140) | string | `""` | Prefix that will be applied to .static.value[*]. | -| [sources.k8s-recommendation-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-err-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-all-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-create-events.botkube/kubernetes.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [executors.k8s-default-tools.botkube/kubectl.context.rbac.group.static.values](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L143) | list | `["botkube-plugins-default"]` | Name of group.rbac.authorization.k8s.io the plugin will be bound to. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L157) | object | `{"ingress":{"backendServiceValid":true,"tlsSecretValid":true},"pod":{"labelsSet":true,"noLatestImageTag":true}}` | Describes configuration for various recommendation insights. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L159) | object | `{"labelsSet":true,"noLatestImageTag":true}` | Recommendations for Pod Kubernetes resource. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod.noLatestImageTag](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L161) | bool | `true` | If true, notifies about Pod containers that use `latest` tag for images. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.pod.labelsSet](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L163) | bool | `true` | If true, notifies about Pod resources created without labels. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L165) | object | `{"backendServiceValid":true,"tlsSecretValid":true}` | Recommendations for Ingress Kubernetes resource. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress.backendServiceValid](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L167) | bool | `true` | If true, notifies about Ingress resources with invalid backend service reference. | -| [sources.k8s-recommendation-events.botkube/kubernetes.config.recommendations.ingress.tlsSecretValid](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L169) | bool | `true` | If true, notifies about Ingress resources with invalid TLS secret reference. | -| [sources.k8s-all-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L175) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L181) | object | See the `values.yaml` file for full object. | Filter settings for various sources. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters.objectAnnotationChecker](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L183) | bool | `true` | If true, enables support for `botkube.io/disable` resource annotation. | -| [sources.k8s-all-events.botkube/kubernetes.config.filters.nodeEventsChecker](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L185) | bool | `true` | If true, filters out Node-related events that are not important. | -| [sources.k8s-all-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L189) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-create-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L193) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-all-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L193) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-err-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L193) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.namespaces.include](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L193) | list | `[".*"]` | Include contains a list of allowed Namespaces. It can also contain regex expressions: `- ".*"` - to specify all Namespaces. | -| [sources.k8s-all-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L203) | object | `{"message":{"exclude":[],"include":[]},"reason":{"exclude":[],"include":[]},"types":["create","delete","error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L205) | list | `["create","delete","error"]` | Lists all event types to be watched. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L211) | object | `{"exclude":[],"include":[]}` | Optional list of exact values or regex patterns to filter events by event reason. Skipped, if both include/exclude lists are empty. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason.include](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L213) | list | `[]` | Include contains a list of allowed values. It can also contain regex expressions. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.reason.exclude](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L216) | list | `[]` | Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. Exclude list is checked before the Include list. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L219) | object | `{"exclude":[],"include":[]}` | Optional list of exact values or regex patterns to filter event by event message. Skipped, if both include/exclude lists are empty. If a given event has multiple messages, it is considered a match if any of the messages match the constraints. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message.include](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L221) | list | `[]` | Include contains a list of allowed values. It can also contain regex expressions. | -| [sources.k8s-all-events.botkube/kubernetes.config.event.message.exclude](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L224) | list | `[]` | Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. Exclude list is checked before the Include list. | -| [sources.k8s-all-events.botkube/kubernetes.config.annotations](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L228) | object | `{}` | Filters Kubernetes resources to watch by annotations. Each resource needs to have all the specified annotations. Regex expressions are not supported. | -| [sources.k8s-all-events.botkube/kubernetes.config.labels](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L231) | object | `{}` | Filters Kubernetes resources to watch by labels. Each resource needs to have all the specified labels. Regex expressions are not supported. | -| [sources.k8s-all-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L238) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources to watch. Resources are identified by its type in `{group}/{version}/{kind (plural)}` format. Examples: `apps/v1/deployments`, `v1/pods`. Each resource can override the namespaces and event configuration by using dedicated `event` and `namespaces` field. Also, each resource can specify its own `annotations`, `labels` and `name` regex. | -| [sources.k8s-err-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L352) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-err-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L359) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-err-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L363) | object | `{"types":["error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-err-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L365) | list | `["error"]` | Lists all event types to be watched. | -| [sources.k8s-err-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L370) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L396) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L403) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L407) | object | `{"types":["error"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L409) | list | `["error"]` | Lists all event types to be watched. | -| [sources.k8s-err-with-logs-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L414) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [sources.k8s-create-events.botkube/kubernetes](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L427) | object | See the `values.yaml` file for full object. | Describes Kubernetes source configuration. | -| [sources.k8s-create-events.botkube/kubernetes.config.namespaces](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L434) | object | `{"include":[".*"]}` | Describes namespaces for every Kubernetes resources you want to watch or exclude. These namespaces are applied to every resource specified in the resources list. However, every specified resource can override this by using its own namespaces object. | -| [sources.k8s-create-events.botkube/kubernetes.config.event](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L438) | object | `{"types":["create"]}` | Describes event constraints for Kubernetes resources. These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. | -| [sources.k8s-create-events.botkube/kubernetes.config.event.types](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L440) | list | `["create"]` | Lists all event types to be watched. | -| [sources.k8s-create-events.botkube/kubernetes.config.resources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L445) | list | See the `values.yaml` file for full object. | Describes the Kubernetes resources you want to watch. | -| [executors](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L463) | object | See the `values.yaml` file for full object. | Map of executors. Executor contains configuration for running `kubectl` commands. The property name under `executors` is an alias for a given configuration. You can define multiple executor configurations with different names. Key name is used as a binding reference. | -| [executors.k8s-default-tools.botkube/kubectl.config](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L472) | object | See the `values.yaml` file for full object including optional properties related to interactive builder. | Custom kubectl configuration. | -| [aliases](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L497) | object | See the `values.yaml` file for full object. | Custom aliases for given commands. The aliases are replaced with the underlying command before executing it. Aliases can replace a single word or multiple ones. For example, you can define a `k` alias for `kubectl`, or `kgp` for `kubectl get pods`. | -| [existingCommunicationsSecretName](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L518) | string | `""` | Configures existing Secret with communication settings. It MUST be in the `botkube` Namespace. To reload Botkube once it changes, add label `botkube.io/config-watch: "true"`. | -| [communications](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L525) | object | See the `values.yaml` file for full object. | Map of communication groups. Communication group contains settings for multiple communication platforms. The property name under `communications` object is an alias for a given configuration group. You can define multiple communication groups with different names. | -| [communications.default-group.socketSlack.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L530) | bool | `false` | If true, enables Slack bot. | -| [communications.default-group.socketSlack.channels](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L534) | object | `{"default":{"bindings":{"executors":["k8s-default-tools"],"sources":["k8s-err-events","k8s-recommendation-events"]},"name":"SLACK_CHANNEL"}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.socketSlack.channels.default.name](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L537) | string | `"SLACK_CHANNEL"` | Slack channel name without '#' prefix where you have added Botkube and want to receive notifications in. | -| [communications.default-group.socketSlack.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L540) | list | `["k8s-default-tools"]` | Executors configuration for a given channel. | -| [communications.default-group.socketSlack.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L543) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for a given channel. | -| [communications.default-group.socketSlack.botToken](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L548) | string | `""` | Slack bot token for your own Slack app. [Ref doc](https://api.slack.com/authentication/token-types). | -| [communications.default-group.socketSlack.appToken](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L551) | string | `""` | Slack app-level token for your own Slack app. [Ref doc](https://api.slack.com/authentication/token-types). | -| [communications.default-group.mattermost.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L555) | bool | `false` | If true, enables Mattermost bot. | -| [communications.default-group.mattermost.botName](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L557) | string | `"Botkube"` | User in Mattermost which belongs the specified Personal Access token. | -| [communications.default-group.mattermost.url](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L559) | string | `"MATTERMOST_SERVER_URL"` | The URL (including http/https schema) where Mattermost is running. e.g https://example.com:9243 | -| [communications.default-group.mattermost.token](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L561) | string | `"MATTERMOST_TOKEN"` | Personal Access token generated by Botkube user. | -| [communications.default-group.mattermost.team](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L563) | string | `"MATTERMOST_TEAM"` | The Mattermost Team name where Botkube is added. | -| [communications.default-group.mattermost.channels](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L567) | object | `{"default":{"bindings":{"executors":["k8s-default-tools"],"sources":["k8s-err-events","k8s-recommendation-events"]},"name":"MATTERMOST_CHANNEL","notification":{"disabled":false}}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.mattermost.channels.default.name](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L571) | string | `"MATTERMOST_CHANNEL"` | The Mattermost channel name for receiving Botkube alerts. The Botkube user needs to be added to it. | -| [communications.default-group.mattermost.channels.default.notification.disabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L574) | bool | `false` | If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. | -| [communications.default-group.mattermost.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L577) | list | `["k8s-default-tools"]` | Executors configuration for a given channel. | -| [communications.default-group.mattermost.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L580) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for a given channel. | -| [communications.default-group.discord.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L587) | bool | `false` | If true, enables Discord bot. | -| [communications.default-group.discord.token](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L589) | string | `"DISCORD_TOKEN"` | Botkube Bot Token. | -| [communications.default-group.discord.botID](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L591) | string | `"DISCORD_BOT_ID"` | Botkube Application Client ID. | -| [communications.default-group.discord.channels](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L595) | object | `{"default":{"bindings":{"executors":["k8s-default-tools"],"sources":["k8s-err-events","k8s-recommendation-events"]},"id":"DISCORD_CHANNEL_ID","notification":{"disabled":false}}}` | Map of configured channels. The property name under `channels` object is an alias for a given configuration. | -| [communications.default-group.discord.channels.default.id](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L599) | string | `"DISCORD_CHANNEL_ID"` | Discord channel ID for receiving Botkube alerts. The Botkube user needs to be added to it. | -| [communications.default-group.discord.channels.default.notification.disabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L602) | bool | `false` | If true, the notifications are not sent to the channel. They can be enabled with `@Botkube` command anytime. | -| [communications.default-group.discord.channels.default.bindings.executors](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L605) | list | `["k8s-default-tools"]` | Executors configuration for a given channel. | -| [communications.default-group.discord.channels.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L608) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for a given channel. | -| [communications.default-group.elasticsearch.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L615) | bool | `false` | If true, enables Elasticsearch. | -| [communications.default-group.elasticsearch.awsSigning.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L619) | bool | `false` | If true, enables awsSigning using IAM for Elasticsearch hosted on AWS. Make sure AWS environment variables are set. [Ref doc](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html). | -| [communications.default-group.elasticsearch.awsSigning.awsRegion](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L621) | string | `"us-east-1"` | AWS region where Elasticsearch is deployed. | -| [communications.default-group.elasticsearch.awsSigning.roleArn](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L623) | string | `""` | AWS IAM Role arn to assume for credentials, use this only if you don't want to use the EC2 instance role or not running on AWS instance. | -| [communications.default-group.elasticsearch.server](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L625) | string | `"ELASTICSEARCH_ADDRESS"` | The server URL, e.g https://example.com:9243 | -| [communications.default-group.elasticsearch.username](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L627) | string | `"ELASTICSEARCH_USERNAME"` | Basic Auth username. | -| [communications.default-group.elasticsearch.password](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L629) | string | `"ELASTICSEARCH_PASSWORD"` | Basic Auth password. | -| [communications.default-group.elasticsearch.skipTLSVerify](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L632) | bool | `false` | If true, skips the verification of TLS certificate of the Elastic nodes. It's useful for clusters with self-signed certificates. | -| [communications.default-group.elasticsearch.logLevel](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L639) | string | `""` | Specify the log level for Elasticsearch client. Leave empty to disable logging. | -| [communications.default-group.elasticsearch.indices](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L644) | object | `{"default":{"bindings":{"sources":["k8s-err-events","k8s-recommendation-events"]},"name":"botkube","replicas":0,"shards":1,"type":"botkube-event"}}` | Map of configured indices. The `indices` property name is an alias for a given configuration. | -| [communications.default-group.elasticsearch.indices.default.name](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L647) | string | `"botkube"` | Configures Elasticsearch index settings. | -| [communications.default-group.elasticsearch.indices.default.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L653) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for a given index. | -| [communications.default-group.webhook.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L660) | bool | `false` | If true, enables Webhook. | -| [communications.default-group.webhook.url](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L662) | string | `"WEBHOOK_URL"` | The Webhook URL, e.g.: https://example.com:80 | -| [communications.default-group.webhook.bindings.sources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L665) | list | `["k8s-err-events","k8s-recommendation-events"]` | Notification sources configuration for the webhook. | -| [communications.default-group.slack](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L675) | object | See the `values.yaml` file for full object. | Settings for deprecated Slack integration. **DEPRECATED:** Legacy Slack integration has been deprecated and removed from the Slack App Directory. Use `socketSlack` instead. Read more here: https://docs.botkube.io/installation/slack/ | -| [settings.clusterName](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L693) | string | `"not-configured"` | Cluster name to differentiate incoming messages. | -| [settings.healthPort](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L696) | int | `2114` | Health check port. | -| [settings.upgradeNotifier](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L698) | bool | `true` | If true, notifies about new Botkube releases. | -| [settings.log.level](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L702) | string | `"info"` | Sets one of the log levels. Allowed values: `info`, `warn`, `debug`, `error`, `fatal`, `panic`. | -| [settings.log.disableColors](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L704) | bool | `false` | If true, disable ANSI colors in logging. Ignored when `json` formatter is used. | -| [settings.log.formatter](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L706) | string | `"json"` | Configures log format. Allowed values: `text`, `json`. | -| [settings.systemConfigMap](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L709) | object | `{"name":"botkube-system"}` | Botkube's system ConfigMap where internal data is stored. | -| [settings.persistentConfig](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L714) | object | `{"runtime":{"configMap":{"annotations":{},"name":"botkube-runtime-config"},"fileName":"_runtime_state.yaml"},"startup":{"configMap":{"annotations":{},"name":"botkube-startup-config"},"fileName":"_startup_state.yaml"}}` | Persistent config contains ConfigMap where persisted configuration is stored. The persistent configuration is evaluated from both chart upgrade and Botkube commands used in runtime. | -| [ssl.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L729) | bool | `false` | If true, specify cert path in `config.ssl.cert` property or K8s Secret in `config.ssl.existingSecretName`. | -| [ssl.existingSecretName](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L735) | string | `""` | Using existing SSL Secret. It MUST be in `botkube` Namespace. | -| [ssl.cert](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L738) | string | `""` | SSL Certificate file e.g certs/my-cert.crt. | -| [service](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L741) | object | `{"name":"metrics","port":2112,"targetPort":2112}` | Configures Service settings for ServiceMonitor CR. | -| [serviceMonitor](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L748) | object | `{"enabled":false,"interval":"10s","labels":{},"path":"/metrics","port":"metrics"}` | Configures ServiceMonitor settings. [Ref doc](https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#servicemonitor). | -| [deployment.annotations](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L758) | object | `{}` | Extra annotations to pass to the Botkube Deployment. | -| [deployment.livenessProbe](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L760) | object | `{"failureThreshold":35,"initialDelaySeconds":1,"periodSeconds":2,"successThreshold":1,"timeoutSeconds":1}` | Liveness probe. | -| [deployment.livenessProbe.initialDelaySeconds](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L762) | int | `1` | The liveness probe initial delay seconds. | -| [deployment.livenessProbe.periodSeconds](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L764) | int | `2` | The liveness probe period seconds. | -| [deployment.livenessProbe.timeoutSeconds](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L766) | int | `1` | The liveness probe timeout seconds. | -| [deployment.livenessProbe.failureThreshold](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L768) | int | `35` | The liveness probe failure threshold. | -| [deployment.livenessProbe.successThreshold](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L770) | int | `1` | The liveness probe success threshold. | -| [deployment.readinessProbe](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L773) | object | `{"failureThreshold":35,"initialDelaySeconds":1,"periodSeconds":2,"successThreshold":1,"timeoutSeconds":1}` | Readiness probe. | -| [deployment.readinessProbe.initialDelaySeconds](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L775) | int | `1` | The readiness probe initial delay seconds. | -| [deployment.readinessProbe.periodSeconds](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L777) | int | `2` | The readiness probe period seconds. | -| [deployment.readinessProbe.timeoutSeconds](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L779) | int | `1` | The readiness probe timeout seconds. | -| [deployment.readinessProbe.failureThreshold](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L781) | int | `35` | The readiness probe failure threshold. | -| [deployment.readinessProbe.successThreshold](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L783) | int | `1` | The readiness probe success threshold. | -| [extraAnnotations](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L790) | object | `{}` | Extra annotations to pass to the Botkube Pod. | -| [extraLabels](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L792) | object | `{}` | Extra labels to pass to the Botkube Pod. | -| [priorityClassName](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L794) | string | `""` | Priority class name for the Botkube Pod. | -| [nameOverride](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L797) | string | `""` | Fully override "botkube.name" template. | -| [fullnameOverride](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L799) | string | `""` | Fully override "botkube.fullname" template. | -| [resources](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L805) | object | `{}` | The Botkube Pod resource request and limits. We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. [Ref docs](https://kubernetes.io/docs/user-guide/compute-resources/) | -| [extraEnv](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L817) | list | `[{"name":"LOG_LEVEL_SOURCE_BOTKUBE_KUBERNETES","value":"debug"}]` | Extra environment variables to pass to the Botkube container. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#environment-variables). | -| [extraVolumes](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L831) | list | `[]` | Extra volumes to pass to the Botkube container. Mount it later with extraVolumeMounts. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/config-and-storage-resources/volume/#Volume). | -| [extraVolumeMounts](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L846) | list | `[]` | Extra volume mounts to pass to the Botkube container. [Ref docs](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1). | -| [nodeSelector](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L864) | object | `{}` | Node labels for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/user-guide/node-selection/). | -| [tolerations](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L868) | list | `[]` | Tolerations for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/concepts/configuration/taint-and-toleration/). | -| [affinity](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L872) | object | `{}` | Affinity for Botkube Pod assignment. [Ref doc](https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity). | -| [serviceAccount.create](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L876) | bool | `true` | If true, a ServiceAccount is automatically created. | -| [serviceAccount.name](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L879) | string | `""` | The name of the service account to use. If not set, a name is generated using the fullname template. | -| [serviceAccount.annotations](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L881) | object | `{}` | Extra annotations for the ServiceAccount. | -| [extraObjects](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L884) | list | `[]` | Extra Kubernetes resources to create. Helm templating is allowed as it is evaluated before creating the resources. | -| [analytics.disable](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L912) | bool | `false` | If true, sending anonymous analytics is disabled. To learn what date we collect, see [Privacy Policy](https://docs.botkube.io/privacy#privacy-policy). | -| [configWatcher](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L916) | object | `{"enabled":true,"inCluster":{"informerResyncPeriod":"10m"}}` | Parameters for the Config Watcher component which reloads Botkube on ConfigMap changes. It restarts Botkube when configuration data change is detected. It watches ConfigMaps and/or Secrets with the `botkube.io/config-watch: "true"` label from the namespace where Botkube is installed. | -| [configWatcher.enabled](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L918) | bool | `true` | If true, restarts the Botkube Pod on config changes. | -| [configWatcher.inCluster](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L920) | object | `{"informerResyncPeriod":"10m"}` | In-cluster Config Watcher configuration. It is used when remote configuration is not provided. | -| [configWatcher.inCluster.informerResyncPeriod](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L922) | string | `"10m"` | Resync period for the Config Watcher informers. | -| [plugins](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L925) | object | `{"cacheDir":"/tmp","healthCheckInterval":"10s","incomingWebhook":{"enabled":true,"port":2115,"targetPort":2115},"repositories":{"botkube":{"url":"https://github.com/kubeshop/botkube/releases/download/v1.9.1/plugins-index.yaml"}},"restartPolicy":{"threshold":10,"type":"DeactivatePlugin"}}` | Configuration for Botkube executors and sources plugins. | -| [plugins.cacheDir](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L927) | string | `"/tmp"` | Directory, where downloaded plugins are cached. | -| [plugins.repositories](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L929) | object | `{"botkube":{"url":"https://github.com/kubeshop/botkube/releases/download/v1.9.1/plugins-index.yaml"}}` | List of plugins repositories. Each repository defines the URL and optional `headers` | -| [plugins.repositories.botkube](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L931) | object | `{"url":"https://github.com/kubeshop/botkube/releases/download/v1.9.1/plugins-index.yaml"}` | This repository serves officially supported Botkube plugins. | -| [plugins.incomingWebhook](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L936) | object | `{"enabled":true,"port":2115,"targetPort":2115}` | Configure Incoming webhook for source plugins. | -| [plugins.restartPolicy](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L941) | object | `{"threshold":10,"type":"DeactivatePlugin"}` | Botkube Restart Policy on plugin failure. | -| [plugins.restartPolicy.type](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L943) | string | `"DeactivatePlugin"` | Restart policy type. Allowed values: "RestartAgent", "DeactivatePlugin". | -| [plugins.restartPolicy.threshold](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L945) | int | `10` | Number of restarts before policy takes into effect. | -| [config](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L949) | object | `{"provider":{"apiKey":"","endpoint":"https://api.botkube.io/graphql","identifier":""}}` | Configuration for synchronizing Botkube configuration. | -| [config.provider](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L951) | object | `{"apiKey":"","endpoint":"https://api.botkube.io/graphql","identifier":""}` | Base provider definition. | -| [config.provider.identifier](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L954) | string | `""` | Unique identifier for remote Botkube settings. If set to an empty string, Botkube won't fetch remote configuration. | -| [config.provider.endpoint](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L956) | string | `"https://api.botkube.io/graphql"` | Endpoint to fetch Botkube settings from. | -| [config.provider.apiKey](https://github.com/kubeshop/botkube/blob/release-1.9/helm/botkube/values.yaml#L958) | string | `""` | Key passed as a `X-API-Key` header to the provider's endpoint. | - -### AWS IRSA on EKS support - -AWS has introduced IAM Role for Service Accounts in order to provide fine-grained access. This is useful if you are looking to run Botkube inside an EKS cluster. For more details visit https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html. - -Annotate the Botkube Service Account as shown in the example below and add the necessary Trust Relationship to the corresponding Botkube role to get this working. - -``` -serviceAccount: - annotations: - eks.amazonaws.com/role-arn: "{role_arn_to_assume}" -``` diff --git a/versioned_docs/version-1.9/configuration/index.mdx b/versioned_docs/version-1.9/configuration/index.mdx deleted file mode 100644 index 5b643c8b..00000000 --- a/versioned_docs/version-1.9/configuration/index.mdx +++ /dev/null @@ -1,221 +0,0 @@ ---- -id: configuration -title: Configuration -sidebar_position: 3 ---- - -Botkube backend allows you to specify [source](./source), [executor](./executor), [communication](./communication), and [general](./general) Botkube settings. Check the related documents for more detailed explanation. - -The configuration settings are read from two sources: - -- the configuration files specified by the `BOTKUBE_CONFIG_PATHS` environment variable or `--config/-c` flag. For example: - - ```bash - export BOTKUBE_CONFIG_PATHS="global.yaml,team-b-specific.yaml" - # or - ./botkube --config "global.yaml,team-b-specific.yaml" - ``` - - You can split individual settings into multiple configuration files. The priority will be given to the last (right-most) file specified. Files with `_` name prefix are always read as the last ones. See the [merging strategy](#merging-strategy) section for more details. - - :::note - For Helm installation, Botkube uses `_runtime_state.yaml` and `_startup_state.yaml` files to store its internal state. Remember to keep these files in the `BOTKUBE_CONFIG_PATHS` environment variable. - ::: - -- the exported [environment variables](#environment-variables) that overrides the configuration specified in the files. - -## Helm install options - -Advanced Helm install options are documented [here](helm-chart-parameters). - -## Updating the configuration - -To update Botkube configuration, you can either: - -- upgrade Botkube installation with Helm, -- or use dedicated `@Botkube` commands, to e.g. toggle notifications or edit Source Bindings. See the [Usage](../usage/index.md) document for more details. - -If you wish to change the configuration with Helm, create a `/tmp/values.yaml` file that contains the new values and run: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -```shell -botkube install -f /tmp/values.yaml -``` - - - - - -```shell -helm upgrade -n botkube botkube -f /tmp/values.yaml helm/botkube --wait -``` - - - - -As both Helm release upgrade and some of the `@Botkube` commands modify the same configuration, it is merged during command execution. -Whenever you specify a new value in the `/tmp/values.yaml` file, it will override the existing value in the configuration. - -### Preventing overrides by default Helm chart values - -Keep in mind that even if you don't specify custom values in the `/tmp/values.yaml` file, Helm can override the existing values with the default ones. - -Consider the following config: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - botToken: "{botToken}" - appToken: "{appToken}" - channels: - "default": - name: general - notification: - disabled: false # default from the Helm chart - bindings: - sources: - - k8s-all-events # default from the Helm chart -# (...) -``` - -Assume that users ran the following commands: - -``` -@Botkube edit SourceBindings k8s-err-events, k8s-recommendation-events -@Botkube disable notifications -``` - -Which effectively result in the following config that Botkube sees: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - botToken: "{botToken}" - appToken: "{appToken}" - channels: - "default": - name: general - notification: - disabled: true # set by user command - bindings: - sources: - - k8s-err-events # set by user command - - k8s-recommendation-events # set by user command -# (...) -``` - -To persist the configuration that users provided, and not overwrite notification and source bindings values, run Helm upgrade with: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - name: general - notification: null # explicitly not use defaults from Helm chart - bindings: - sources: null # explicitly not use defaults from Helm chart -# (...) other values -``` - -The following properties need such `null` value during upgrade, if you want to keep the previous configuration: - -- `communications.default-group.{communication-platform}.channels.default.notifications`, where `{communication-platform}` is any communication platform supported except Microsoft Teams, -- `communications.default-group.{communication-platform}.channels.default.bindings.sources`, where `{communication-platform}` is any communication platform supported except Microsoft Teams, -- `communications.default-group.teams.bindings.sources`. - -To learn more, read the [Deleting a default key](https://helm.sh/docs/chart_template_guide/values_files/#deleting-a-default-key) paragraph in Helm documentation. - -## Environment variables - -The individual communication settings can be specified via environment variables. They take priority and override the configuration specified in the file. - -To construct the environment variable name, take any property from the configuration file and make it uppercase. Use the underscore for properties that are nested. Use the double underscore for all camelCase properties. Finally, add the `BOTKUBE_` prefix. - -For example, such configuration property from YAML: - -```yaml -settings: - kubectl: - defaultNamespace: "NAMESPACE" -``` - -is mapped to the `BOTKUBE_SETTINGS_KUBECTL_DEFAULT__NAMESPACE` environment variable. - -This is a useful feature that allows you to store the overall configuration in a file, where sensitive data, such as tokens, can be put in environment variables. See the [**Tokens from Vault via CSI driver**](./communication/vault-csi/) tutorial for an example use-case. - -## Merging strategy - -Botkube allows you to split individual settings into multiple configuration files. The following rules apply: - -- The priority will be given to the last (right-most) file specified. -- Files with `_` name prefix are always read as the last ones following the initial order. -- Objects are merged together and primitive fields are overridden. For example: - - ```yaml - # a.yaml - first file - settings: - clusterName: dev-cluster - kubectl: - enabled: false - ``` - - ```yaml - # _a.yaml - second file with `_` prefix - settings: - clusterName: demo-cluster - ``` - - ```yaml - # b.yaml - third file - settings: - kubectl: - enabled: true - ``` - - ```yaml - # result - settings: - clusterName: demo-cluster - kubectl: - enabled: true - ``` - -- The arrays items are not merged, they are overridden. For example: - - ```yaml - # a.yaml - settings: - kubectl: - enabled: true - commands: - verbs: - ["api-resources", "api-versions", "cluster-info", "describe", "diff", "explain", "get", "logs", "top", "auth"] - ``` - - ```yaml - # b.yaml - settings: - kubectl: - commands: - verbs: ["get", "logs", "top", "auth"] - ``` - - ```yaml - # result - settings: - kubectl: - enabled: true - commands: - verbs: ["get", "logs", "top", "auth"] - ``` diff --git a/versioned_docs/version-1.9/configuration/rbac.md b/versioned_docs/version-1.9/configuration/rbac.md deleted file mode 100644 index d01e0c4b..00000000 --- a/versioned_docs/version-1.9/configuration/rbac.md +++ /dev/null @@ -1,432 +0,0 @@ ---- -id: rbac -title: RBAC -sidebar_position: 4 ---- - -Botkube allows plugins to access Kubernetes API by defining [RBAC](https://en.wikipedia.org/wiki/Role-based_access_control) rules as part of plugin `context.rbac` configuration. Kubeconfig generation needs to be requested by defining `context.rbac` property. - -Based on this configuration Botkube generates a temporary [kubeconfig](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) with user and/or group impersonation. -This kubeconfig is available to plugins in the `Execute` and `Stream` contexts. - -## Architecture - -Botkube uses its own cluster credentials to generate a temporary kubeconfig, and the kubeconfig uses [user/group impersonation](https://kubernetes.io/docs/reference/access-authn-authz/authentication/#user-impersonation). - -For source plugins, the kubeconfig is generated once - during plugin startup. -For executor plugins, the kubeconfig is generated every time a command is sent to the plugin, which allows greater flexibility, such as including the name of the channel the command was sent from. - -![diagram](assets/botkube-read-only.svg "diagram") - -## Configuration - -For each executor and source plugin, you can define a `context.rbac` configuration. This config is used to generate a dedicated kubeconfig. - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static # Static or ChannelName - static: # applicable only for "Static" user mapping type - value: botkube-internal-static-user - prefix: "" # optional prefix for user name; useful especially for channel name mapping - group: - type: Static # Static or ChannelName - static: # applicable only for "Static" group mapping type - values: - - "my-group1" - - "my-group2" - prefix: "" # optional prefix for all group names; useful especially for channel name mapping -``` - -### Mapping types - -For both user and group, the following mapping types are supported: - -- `Static` - - For user, it uses a single static value. For group, it uses a list of static values. The value is prepended with an optional prefix. - -- `ChannelName` - - Channel name is used as subject for user or group impersonation. The channel name is prepended with an optional prefix. - This mapping is only available for executor plugins. - -### Default configuration - -When a given plugin have `context.rbac` property undefined, Botkube doesn't generate a kubeconfig for this plugin. To request kubeconfig generation, define `context.rbac` property with empty value: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: {} # enable kubeconfig generation -``` - -However, such configuration will generate a kubeconfig with empty impersonation config, which effectively means an anonymous access to the Kubernetes API. - -During Botkube installation, Botkube generates Kubernetes ClusterRole and ClusterRoleBinding resources with read-only access for the default group `botkube-plugins-default`. This group is used by default across the `values.yaml` for all default plugins. - -```yaml -rbac: - # ... - groups: - "botkube-plugins-default": - create: true - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] -``` - -See the [`values.yaml`](https://github.com/kubeshop/botkube/blob/v1.9.1/helm/botkube/values.yaml) for more details. - -#### Defaults for user mapping when group mapping is used - -Kubernetes requires user for group impersonation. That's why when a group mapping is user without `context.rbac.user` mapping defined, Botkube uses `botkube-internal-static-user` user name for impersonation. -For example, when the following configuration is used: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - # no user mapping defined - group: - type: Static - static: - value: botkube-plugins-default -``` - -It is equivalent to: - -```yaml -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static - static: - value: botkube-internal-static-user - group: - type: Static - static: - value: botkube-plugins-default -``` - -#### Defaults for Botkube Cloud - -When configuring plugin on Botkube Cloud, the "Default" permissions mean that the `botkube-plugins-default` group will be used, which have read-only access to Kubernetes API and is configured during Botkube installation. See the [Default configuration](#default-configuration) section. - -![Cloud RBAC defaults](./assets/cloud-rbac-default.png) - -## Examples - -This paragraph contains examples of RBAC configuration for different use cases. - -:::tip -You can use `rbac.groups` or `extraObjects` overrides during Botkube installation to create custom RBAC resources. See the [`values.yaml`](https://github.com/kubeshop/botkube/blob/v1.9.1/helm/botkube/values.yaml) for more details. -::: - -### Kubectl executor with read-only Pod access based on static group mapping - -In this example an executor plugin is defined with static RBAC that maps to group `read-pods`. - -1. Consider the following Botkube config: - - ```yaml - # ... - executors: - "kubectl-read-only": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: - group: - type: Static - static: - values: [read-pods] - ``` - -Let's assume this plugin is bound to at least one channel. - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: kubectl-read-pods - rules: - - apiGroups: [""] - resources: ["pods"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: kubectl-read-pods - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: kubectl-read-pods - subjects: - - kind: Group - name: read-pods # <-- this is the group name used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, when this executor plugin is invoked, Botkube generates a kubeconfig impersonating group `read-pods` and passes it to the plugin. The plugin then can authenticate with the API server with identity of group `read-pods`. In that way, the plugin can use read-only operations on Pods. - -### Kubernetes source plugin with read-only access based on static user mapping - -In this example a single source plugin is defined with static RBAC that maps to user `kubernetes-read-only`. - -1. Consider the following Botkube config: - - ```yaml - sources: - "kubernetes": - botkube/kubernetes@v1: - enabled: true - # ... - context: - rbac: - user: - type: Static - static: - value: kubernetes-read-only - ``` - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: reader - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: reader - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: reader - subjects: - - kind: User - name: kubernetes-read-only # <-- this is the username used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, the source plugin can access all Kubernetes resources with read-only permissions. - -### Kubectl executor plugin with different permissions based on channel name mapping - -In this example **kubectl** executor plugin is configured with channel name mapping and bound to two channels, `ch-1` and `ch-2`. In Kubernetes RBAC resources, group `ch-1` is given write access, while group `ch-2` is given only read access. - -1. Consider the following Botkube config: - - ```yaml - executors: - "kubectl": - botkube/kubectl@v1: - # ... - enabled: true - context: - rbac: - group: - type: ChannelName - communications: - "default-group": - socketSlack: - enabled: true - # ... - channels: - "ch-1": - name: ch-1 - bindings: - executors: - - kubectl - "ch-2": - name: ch-2 - bindings: - executors: - - kubectl - # ... - ``` - -1. Consider the following Kubernetes RBAC configuration: - - ```yaml - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: editor - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list", "update", "create", "delete"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: editor - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: editor - subjects: - - kind: Group - name: ch-1 # <-- channel name used in Botkube config - apiGroup: rbac.authorization.k8s.io - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRole - metadata: - name: read-only - rules: - - apiGroups: ["*"] - resources: ["*"] - verbs: ["get", "watch", "list"] - --- - apiVersion: rbac.authorization.k8s.io/v1 - kind: ClusterRoleBinding - metadata: - name: read-only - roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: read-only - subjects: - - kind: Group - name: ch-2 # <-- channel name used in Botkube config - apiGroup: rbac.authorization.k8s.io - ``` - -In a result, users in channel `ch-1` can execute all kubectl commands, while users in channel `ch-2` can only execute read-only commands. - -## Limitations - -This paragraph contains limitations of the current implementation. - -### Shared file system - -Botkube runs plugin processes in the same container within the same Pod. Therefore, all plugins share the same file system. - -If you're a plugin developer and decide to write kubeconfig to the file system, be aware -that it can be accessible by all plugins in the container. - -### RBAC configuration merging - -The same executor plugins with different RBAC configuration cannot be bound to the same channel. This is validated during Botkube startup and will result in an error. - -For example, the following configuration is invalid: - -```yaml -communications: - "default-group": - socketSlack: - enabled: true - # ... - channels: - "ch-1": - name: ch-1 - bindings: - executors: - - kubectl - - kubectl-read-only -executors: - "kubectl": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: # Different RBAC configuration - group: - type: ChannelName - "kubectl-read-only": - botkube/kubectl@v1: - enabled: true - # ... - context: - rbac: # Different RBAC configuration - user: - type: Static - static: - value: kubectl-read-only -``` - -### Supported RBAC mappings - -While Executor plugins support multiple mapping types, there are the following limitations: - -- Source plugins support only the `Static` mapping. -- Automated [actions](../usage/automated-actions.md) support only the `Static` mapping. - -## Troubleshooting - -In most cases troubleshooting Botkube RBAC issues means [troubleshooting Kubernetes RBAC](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access), where `kubectl auth` command can help. - -If you see the following error: - -``` -Error: create: failed to create: secrets is forbidden: User "botkube-internal-static-user" cannot create resource "secrets" in API group "" in the namespace "default" -``` - -that means the RBAC rules configured for a given plugin are insufficient in a given context. - -Firstly, ensure what user/group is used for impersonation. To do that, check your configuration against the mapping description from the [Configuration](#configuration) section. - -### Checking available actions for a given user/group - -After obtaining proper user and group, use the following command to list all available actions for a given user and/or group: - -```shell -kubectl auth can-i --as {user} --as-group {group} --list -``` - -For example, to list all available actions for user `botkube-internal-static-user` and group `private-channel` use: - -```shell -kubectl auth can-i --as botkube-internal-static-user --as-group private-channel --list -``` - -### Checking if a given user/group can perform a given action - -To verify if a given user and/or group can perform a given action, use: - -```shell -kubectl auth can-i get pod -n botkube --as {user} --as-group {group} -``` - -For example, to verify if user `botkube-internal-static-user` and group `private-channel` can get Secret in namespace `botkube` use: - -```shell -kubectl auth can-i get secret -n botkube --as botkube-internal-static-user --as-group private-channel -``` - -## Plugin development - -If you are a plugin developer and want to learn how to use generated kubeconfig in the plugin codebase, refer to [Using kubeconfig](../plugin/using-kubeconfig.md) document. diff --git a/versioned_docs/version-1.9/configuration/source/argocd.md b/versioned_docs/version-1.9/configuration/source/argocd.md deleted file mode 100644 index e817e033..00000000 --- a/versioned_docs/version-1.9/configuration/source/argocd.md +++ /dev/null @@ -1,520 +0,0 @@ ---- -id: argocd -title: ArgoCD -sidebar_position: 5 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -ArgoCD source plugin sends events from ArgoCD to configured communication platforms. During startup, the plugin configures ArgoCD webhooks, triggers, templates and subscriptions based on the [ArgoCD Notification Catalog](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/catalog/). -It uses native [ArgoCD notifications](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/triggers/) configuration to send the events to Botkube communication platforms. - -The ArgoCD source plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Prerequisite elevated RBAC permissions - -ArgoCD plugin requires specific RBAC permissions. -First, create RBAC resources on your cluster: - -```shell -cat > /tmp/argocd-rbac.yaml << ENDOFFILE ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRole -metadata: - name: argocd -rules: - - apiGroups: [""] - resources: ["configmaps"] - verbs: ["get", "update"] - - apiGroups: ["argoproj.io"] - resources: ["applications"] - verbs: ["get", "patch"] ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: argocd -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: argocd -subjects: -- kind: Group - name: argocd - apiGroup: rbac.authorization.k8s.io -ENDOFFILE - -kubectl apply -f /tmp/argocd-rbac.yaml -``` - -Next, use the `argocd` static group name in the plugin RBAC configuration: - -![ArgoCD RBAC](assets/argocd-rbac.png) - -## Enabling plugin - -:::note -In order to enable the plugin, ArgoCD has to be already installed on the cluster and all watched Applications need to be created. - -Also, remember to create RBAC resources for the plugin. See the [Elevated RBAC permissions required](#prerequisite-elevated-rbac-permissions) section. -::: - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the ArgoCD plugin. -6. Click **Save** button. -7. Provide at least one ArgoCD application name and namespace in the configuration. - -```yaml -defaultSubscriptions: - applications: - - name: guestbook - namespace: argocd -``` - -You can watch multiple ArgoCD Applications at the same time, for example: - -```yaml -defaultSubscriptions: - applications: - - name: guestbook - namespace: argocd - - name: second-app - namespace: second-app-namespace -``` - -1. Click **Save**. - -## Cleanup - -When you disable or remove the plugin, it won't revert all changes made during the plugin startup. To clean up all ArgoCD follow the manual steps: - -- Clean up ArgoCD Notifications ConfigMap. It is usually named `argocd-notifications-cm` in the `argocd` Namespace. - - Remove all properties that contains `b-` or `botkube-` prefixes in the name. - - - Webhook property name follows the syntax `service.webhook.{webhook-name}`. For example, the `service.webhook.b-784e` property was created by Botkube. - - Template property name follows the syntax `template.{template-name}`. For example, the `template.template.botkube-argocd-ch05k-app-health-degraded` property was created by Botkube. - - Trigger property name follows the syntax `trigger.{trigger-name}`. For example, the `trigger.b-372839f86ed61c4c88` property was created by Botkube. - -- Remove all `argocd.argoproj.io/notifications` annotations from ArgoCD Applications which contain `b-` prefix in the trigger and webhook names. - - The annotation key pattern is `notifications.argoproj.io/subscribe.{trigger-name}.{webhook-name}`. For example, the annotation `notifications.argoproj.io/subscribe.b-5cc4c004df01230f72.b-efc0: ""` was created by Botkube and it should be deleted if the plugin is disabled. - -## Configuration Syntax - -### Basic configuration - -This section lists all basic configuration options for the ArgoCD source plugin. The ArgoCD notification config is created automatically during plugin startup and uses triggers and templates based on the [ArgoCD Notification Catalog](https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/catalog/). - -```yaml -defaultSubscriptions: - # Provide application name and namespace to subscribe to all events for a given application. - applications: - - name: "guestbook" - namespace: "argocd" -argoCD: - # ArgoCD UI base URL. It is used for generating links in the incoming events. - uiBaseUrl: http://localhost:8080 - # ArgoCD Notifications ConfigMap reference. - notificationsConfigMap: - name: argocd-notifications-cm - namespace: argocd -``` - -### Advanced configuration - -The basic configuration should be sufficient for most users. However, you can customize all triggers, templates, webhook registration and more. For advanced properties, see the full default configuration below: - -```yaml -log: - level: "info" - -# Interactivity configures command dropdown and additional buttons -# for platforms which support interactivity (`isInteractive: true`) such as Socket Slack or Cloud Slack. -interactivity: - enableViewInUIButton: true - enableOpenRepositoryButton: true - commandVerbs: - - "get" - - "describe" - -# ArgoCD-related configuration. -argoCD: - # ArgoCD UI base URL. It is used for generating links in the incoming events. - uiBaseUrl: http://localhost:8080 - # ArgoCD Notifications ConfigMap reference. - notificationsConfigMap: - name: argocd-notifications-cm - namespace: argocd - -# Webhook configuration. -webhook: - # If true, it registers Botkube webhook in ArgoCD notification config. - register: true - # If the name exceeds 6 characters, it might be truncated and modified to match the external constraints. - name: "b-{{ .SourceName }}" - url: "{{ .IncomingWebhook.FullURLForSource }}" - -# Triggers and templates are based on https://github.com/argoproj/argo-cd/blob/master/notifications_catalog/install.yaml. -# Trigger might be created from existing template (`fromExisting`) or from scratch (`create`). -notifications: - - trigger: - # fromExisting: - # name: on-created - # templateName: "botkube-{{ .SourceName }}-app-created" - create: - # If the name exceeds 20 characters, it might be modified to match the external constraints. - name: "b-{{ .SourceName }}-create" - conditions: # syntax: https://argo-cd.readthedocs.io/en/stable/operator-manual/notifications/triggers/ - - description: Application is created. - oncePer: app.metadata.name - when: "true" - send: - - "botkube-{{ .SourceName }}-app-created" # template Name, you can use templating here - subscriptions: &triggerSubscriptions # Even if false, the default subscriptions are still created. - create: true - # Additional subscriptions apart from `defaultSubscriptions` - additional: - [] - # - name: "guestbook" - # namespace: "argocd" - - trigger: - create: - name: "b-{{ .SourceName }}-delete" - conditions: - - description: Application is deleted. - oncePer: app.metadata.name - when: app.metadata.deletionTimestamp != nil - send: - - "botkube-{{ .SourceName }}-app-deleted" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName}}-deploy" - conditions: - - description: Application is synced and healthy. Triggered once per commit. - oncePer: app.status.operationState.syncResult.revision - when: app.status.operationState.phase in ['Succeeded'] and app.status.health.status - == 'Healthy' - send: - - "botkube-{{ .SourceName }}-app-deployed" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName}}-degrade" - conditions: - - description: Application has degraded - when: app.status.health.status == 'Degraded' - send: - - "botkube-{{ .SourceName }}-app-health-degraded" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName }}-fail" - conditions: - - description: Application syncing has failed - when: app.status.operationState != nil and app.status.operationState.phase in ['Error', - 'Failed'] - send: - - "botkube-{{ .SourceName }}-app-sync-failed" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName }}-run" - conditions: - - description: Application is being synced - when: app.status.operationState != nil and app.status.operationState.phase in ['Running'] - send: - - "botkube-{{ .SourceName }}-app-sync-running" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName }}-unknown" - conditions: - - description: Application status is 'Unknown' - when: app.status.sync.status == 'Unknown' - send: - - "botkube-{{ .SourceName }}-app-sync-status-unknown" - subscriptions: *triggerSubscriptions - - trigger: - create: - name: "b-{{ .SourceName }}-success" - conditions: - - description: Application syncing has succeeded - when: app.status.operationState != nil and app.status.operationState.phase in ['Succeeded'] - send: - - "botkube-{{ .SourceName }}-app-sync-succeeded" - subscriptions: *triggerSubscriptions - -templates: - - name: "botkube-{{ .SourceName }}-app-created" - body: | - { - "message": { - "sections": [ - { "header": ":new: Application `{{.app.metadata.name}}` has been created" } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - name: "botkube-{{ .SourceName }}-app-deleted" - body: | - { - "message": { - "sections": [ - { "header": ":no_entry_sign: Application `{{.app.metadata.name}}` has been deleted" } - ] - } - } - - name: "botkube-{{ .SourceName }}-app-deployed" - body: | - { - "message": { - "sections": [ - { - "header": ":rocket: New version of the application `{{.app.metadata.name}}` is up and running", - "textFields": [ - { - "key": "Sync Status", - "value": "{{.app.status.sync.status}}" - }, - { - "key": "Health Status", - "value": "{{.app.status.health.status}}" - }, - { - "key": "Revision", - "value": "{{.app.status.sync.revision}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - name: "botkube-{{ .SourceName }}-app-health-degraded" - body: | - { - "message": { - "sections": [ - { - "header": ":exclamation: Application `{{.app.metadata.name}}` has degraded", - "textFields": [ - { - "key": "Health Status", - "value": "{{.app.status.health.status}}" - }, - { - "key": "Revision", - "value": "{{.app.status.sync.revision}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - name: "botkube-{{ .SourceName }}-app-sync-failed" - body: | - { - "message": { - "timestamp": "{{.app.status.operationState.finishedAt}}", - "sections": [ - { - "header": ":exclamation: The sync operation of application `{{.app.metadata.name}}` failed", - "textFields": [ - { - "key": "Error message", - "value": "{{.app.status.operationState.message}}" - }, - { - "key": "Sync Status", - "value": "{{.app.status.sync.status}}" - }, - { - "key": "Revision", - "value": "{{.app.status.sync.revision}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}?operation=true", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - - name: "botkube-{{ .SourceName }}-app-sync-running" - body: | - { - "message": { - "timestamp": "{{.app.status.operationState.startedAt}}", - "sections": [ - { - "header": ":bulb: The sync operation of application `{{.app.metadata.name}}` started", - "textFields": [ - { - "key": "Sync Status", - "value": "{{.app.status.sync.status}}" - }, - {{ if and (.app.status.operationState) (.app.status.operationState.operation) }} - { - "key": "Initiated by", - "value": "{{.app.status.operationState.operation.initiatedBy.username}}" - }, - {{ if .app.status.operationState.operation.initiatedBy.automated }} - { - "key": "Automated", - "value": "{{.app.status.operationState.operation.initiatedBy.automated}}" - }, - {{ end }} - {{ end }} - { - "key": "Revision", - "value": "{{.app.status.sync.revision}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}?operation=true", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - name: "botkube-{{ .SourceName }}-app-sync-status-unknown" - body: | - { - "message": { - "sections": [ - { - "header": ":warning: Application `{{.app.metadata.name}}` sync status is unknown", - "textFields": [ - { - "key": "Sync Status", - "value": "{{.app.status.sync.status}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } - - name: "botkube-{{ .SourceName }}-app-sync-succeeded" - body: | - { - "message": { - "timestamp": "{{.app.status.operationState.finishedAt}}", - "sections": [ - { - "header": ":white_check_mark: Application `{{.app.metadata.name}}` has ben successfully synced", - "textFields": [ - { - "key": "Sync Status", - "value": "{{.app.status.sync.status}}" - }, - { - "key": "Health Status", - "value": "{{.app.status.health.status}}" - } - {{range $index, $c := .app.status.conditions}} - ,{ - "key": "{{$c.type}}", - "value": "{{$c.message}}" - } - {{end}} - ] - } - ] - }, - "context": { - "app": { - "name": "{{.app.metadata.name}}", - "namespace": "{{.app.metadata.namespace}}" - }, - "detailsUiPath": "/applications/{{.app.metadata.name}}?operation=true", - "repoUrl": "{{.app.spec.source.repoURL | call .repo.RepoURLToHTTPS}}" - } - } -``` diff --git a/versioned_docs/version-1.9/configuration/source/assets/argocd-rbac.png b/versioned_docs/version-1.9/configuration/source/assets/argocd-rbac.png deleted file mode 100644 index 8634e19e..00000000 Binary files a/versioned_docs/version-1.9/configuration/source/assets/argocd-rbac.png and /dev/null differ diff --git a/versioned_docs/version-1.9/configuration/source/github-events.md b/versioned_docs/version-1.9/configuration/source/github-events.md deleted file mode 100644 index 5e829923..00000000 --- a/versioned_docs/version-1.9/configuration/source/github-events.md +++ /dev/null @@ -1,249 +0,0 @@ ---- -id: github-events -title: GitHub Events -sidebar_position: 4 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The GitHub Events source sends events for configured GitHub repositories. These events can be sent to communication channels or actions. To learn how to bind sources to communication channels or actions, refer to the [Communication](../communication/index.md) and [Action](../action.md) documents. - -The GitHub Events plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the GitHub Events plugin. -6. Click **Save** button. - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# Logger configuration settings. -log: - level: info - format: json - -# GitHub client configuration settings. -github: - # Auth allows you to set either PAT or APP credentials. - # If none provided then watch functionality could not work properly, e.g. you can reach the API calls quota or if you are setting GitHub Enterprise base URL then an unauthorized error can occur. - auth: - # The GitHub access token. - # Instruction for creating a token can be found here: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token. - accessToken: your-github-token - # AppConfig represents the GitHub App configuration. - # This replaces the AccessToken. - app: - # GitHub App ID for authentication. - id: "" - - # GitHub App Installation ID. - installationId: "" - - # GitHub App private key in PEM format. - privateKey: "" - # The GitHub base URL for API requests. Defaults to the public GitHub API, but can be set to a domain endpoint to use with GitHub Enterprise. - # Default: https://api.github.com/ - baseUrl: "" - - # The GitHub upload URL for uploading files. It is taken into account only when the BaseURL is also set. If only the BaseURL is provided then this parameter defaults to the BaseURL value. - # Default: https://uploads.github.com/ - uploadUrl: "" - -# refreshDuration defines how often we should call GitHub REST API to check repository events. -# It's the same for all configured repositories. For example, if you configure 5s refresh time, and you have 3 repositories registered, -# we will execute maximum 2160 calls which easily fits into PAT rate limits. -# You can create multiple plugins configuration with dedicated tokens to have the rate limits increased. -# -# NOTE: -# - we use conditional requests (https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#conditional-requests), so if there are no events the call doesn't count against your rate limits.\ -# - if you configure file pattern matcher for merged pull request events we execute one more additional call to check which files were changed in the context of a given pull request -# -# Rate limiting: https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#rate-limiting -refreshDuration: 10s - -repositories: - - name: owner/repo1 - on: - pullRequests: - - types: [open, merged] # Allowed pull request types (open, closed, merged). - paths: - # Included file patterns for pull request changes. - include: ["kustomize/.*"] - # Excluded file patterns for pull request changes. - # exclude: [ '.*\.js' ] - labels: - # Included labels for pull requests. - include: ["bug"] - # Excluded labels for pull requests. - # exclude: [ 'enhancement' ] - notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " - - - name: owner/repo2 - on: - # EventsAPI watches for /events API containing events triggered by activity on GitHub. - # This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. - # source: https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events - events: - # WatchEvent for now emitted only when someone stars a repository. - # https://docs.github.com/en/webhooks-and-events/events/github-event-types#watchevent - - type: "WatchEvent" - - # IssuesEvent with json path filter - - type: "IssuesEvent" - # The JSONPath expression to filter events - jsonPath: ".action" - # The value to match in the JSONPath result - value: "opened" - notificationTemplate: - previewTpl: |- - Issue Opened - - #{{ .Issue.Number }} {{ .Issue.Title }} - State: {{ .Issue.State }} - extraButtons: - - displayName: Open - url: "{{ .Issue.HTMLURL }}" - style: primary -``` - -## Authorization - -You can use either a [personal access token](#github-personal-access-token) or a [GitHub App](#github-app) for authentication. -By using GitHub Apps, you can increase your maximum rate limits because multiple GitHub Apps are independent and do not share the rate limits. However, using multiple Personal Access Tokens (PATs) for the same account will result in sharing the same rate limit. - -### GitHub personal access token - -Follow the instructions [here](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/#creating-a-token) to create a token. The required scope differs for public and private repositories. - -### GitHub App - -To use a GitHub App: - -1. [Create a GitHub App](https://docs.github.com/en/developers/apps/building-github-apps/creating-a-github-app). No callback or webhook URL is needed. -2. Add read-only permission to the "Members" item of organization permissions. -3. [Install the app in your organization](https://docs.github.com/en/developers/apps/managing-github-apps/installing-github-apps). -4. Done! Use the following details for authentication: - - | Name | Description | - | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | - | GitHub App Private Key | PEM-format key generated when the app is installed. If you lost it, you can regenerate it ([docs](https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#generating-a-private-key)). | - | GitHub App ID | Found in the app's "About" page (Organization settings -> Developer settings -> Edit button on your app). | - | GitHub App Installation ID | Found in the URL your organization's app install page (Organization settings -> Github Apps -> Configure button on your app). It's the last number in the URL, ex: `https://github.com/organizations/{my-org}/settings/installations/1234567890`. | - -## Subscriptions - -The GitHub Events source plugin uses polling instead of Webhook endpoint for retrieving GitHub events. It calls two types of GitHub REST API endpoints with a configured refresh time window: - -- [`/repos/{owner}/{repo}/events`](https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events) for `on.events` configuration -- [`/repos/{owner}/{repo}/pulls`](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests) for `on.pullRequests` configuration - -By default, we use [conditional requests](https://docs.github.com/en/rest/overview/resources-in-the-rest-api?apiVersion=2022-11-28#conditional-requests) to prevent excessive API calls. As a result, from `on.pullRequests` triggers may have up to a 60-second delay due to caching. - -### Pull requests - -For a configured `refreshDuration` we call the [`/repos/{owner}/{repo}/pulls`](https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests) endpoint for all registered repositories. It's configured to fetch 100 pull requests that were recently modified. We ignore all events that were already processed. - -#### Matching criteria - -If no matching criteria are specified, all pull requests will be reported. For example: - -```yaml -repositories: - - name: owner/repo1 - on: - pullRequests: [] -``` - -To narrow down emitted events, you can specify at least one of the available criteria: - -- `types`: This is a list of pull request types for which the event should be triggered. The allowed types are: `open`, `closed`, `merged`. - -- `paths.include`: This is a list of file patterns for which the event should be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `["kustomize/.*"]`. - -- `paths.exclude`: This is a list of file patterns for which the event should not be triggered. It also supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `['.*\.js']`. This exclusion criteria takes precedence over `paths.include`. - -- `labels.include`: This is a list of label patterns for which the event should be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `["backend-.*"]`. - -- `labels.exclude`: This is a list of label patterns for which the event should not be triggered. It supports [Go regular expressions](https://github.com/google/re2/wiki/Syntax). For example: `['bug']`. This exclusion criteria takes precedence over `labels.include`. - -#### Templating - -You can customize the notification template with additional buttons: - -```yaml -notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " -``` - -For the `commandTpl` you can use all fields that are available on [`pullRequest`](https://github.com/google/go-github/blob/899235e0a9d750d6fecf9048a676046d50f9d4a3/github/pulls.go#L29-L85) type. - -### Events - -For a configured `refreshDuration` we call the [`/repos/{owner}/{repo}/events`](https://docs.github.com/en/rest/activity/events?apiVersion=2022-11-28#list-repository-events) endpoint for all registered repositories. - -:::note -This API is not built to serve real-time use cases. Depending on the time of day, event latency can be anywhere from 30s to 6h. -::: - -The Events API covers various event types. Refer to the [GitHub event types](https://docs.github.com/en/webhooks-and-events/events/github-event-types) page for more information. - -#### Matching criteria - -To retrieve relevant events, you must define at least one entry within the `events` property. For instance: - -```yaml -events: - - type: "WatchEvent" -``` - -If you provide an empty list `events: []`, no events will be emitted. For more precise filtering of events, you can optionally use JSONPath along with the event type to filter based on specific criteria within the event payload. - -#### Templating - -The available fields for templating differ based on the event type. Refer to the [google/go-github](https://github.com/google/go-github/tree/899235e0a9d750d6fecf9048a676046d50f9d4a3/github) repository for dedicated event types. - -For instance, you can add an "Open" button to an `IssuesEvent` template: - -```yaml -events: - # IssuesEvent with json path filter - - type: "IssuesEvent" - # The JSONPath expression to filter events - jsonPath: ".action" - # The regex value to match in the JSONPath result - value: "opened" - notificationTemplate: - previewTpl: |- - Issue Opened - - #{{ .Issue.Number }} {{ .Issue.Title }} - State: {{ .Issue.State }} - extraButtons: - - displayName: Open - url: "{{ .Issue.HTMLURL }}" - style: primary -``` - -Here, the `jsonPath` field specifies the JSONPath expression to filter events, and the value field defines the regex value to match within the JSONPath result. This combination helps narrow down reported events based on specific conditions within the event payload. diff --git a/versioned_docs/version-1.9/configuration/source/index.md b/versioned_docs/version-1.9/configuration/source/index.md deleted file mode 100644 index 24b3e04d..00000000 --- a/versioned_docs/version-1.9/configuration/source/index.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -id: source -title: Source -sidebar_position: 1 ---- - -The source configuration allows you to define multiple source configurations that can be later referred in [communication](../communication) bindings. For example, take a look at such source definition: - -```yaml -sources: - "k8s-recommendation-alerts": # This is a source configuration name, which is referred in communication bindings. - botkube/kubernetes: - # ... trimmed ... - - "k8s-all-events": # This is a source configuration name, which is referred in communication bindings. - botkube/kubernetes: - # ... trimmed ... -``` - -This can be later used by the communication platforms: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - bindings: - sources: # The order is important for merging strategy. - - k8s-recommendation-events # The source configuration name - - k8s-all-events # The source configuration name - # ... trimmed ... -``` - -To use the Botkube source plugins, first you need to define the plugins repository under the `plugins` property: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Next, you can configure source from a given repository: - -```yaml -sources: - "plugins": - repo-name/source-name@v1.0.0: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} -``` - -For all source configuration properties, see the [**syntax**](#syntax) section. - -#### Restart Policy and Health Check Interval - -This section of the configuration allows you to configure the restart policy for the Botkube source plugins. The restart policy is used when the source 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 source plugins. The default health check interval is 10 seconds. The health check interval can be configured with the following property: - -- `healthCheckInterval` - health check interval. - -```yaml -# 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 - -```yaml -# Map of sources. The `sources` property name is an alias for a given configuration. -# Key name is used as a binding reference. -# -# Format: sources.{alias} -sources: - "k8s-recommendation-events": - # Built-in kubernetes source configuration. - botkube/kubernetes: - enabled: true - config: - # Kubernetes configuration - recommendations: - pod: - noLatestImageTag: true - # ... trimmed ... - -# 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.9.1/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](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. diff --git a/versioned_docs/version-1.9/configuration/source/keptn.md b/versioned_docs/version-1.9/configuration/source/keptn.md deleted file mode 100644 index 4f20f4de..00000000 --- a/versioned_docs/version-1.9/configuration/source/keptn.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: keptn -title: Keptn -sidebar_position: 4 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The Botkube Keptn source plugin allows you to consume events from Keptn deployment and notify in configured platforms. - -The Keptn plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Keptn plugin. -6. Click **Save** button. - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# Keptn API Gateway URL. -url: "http://api-gateway-nginx.keptn.svc.cluster.local/api" -# Keptn API Token to access events through API Gateway. -token: "" -# Optional Keptn project. -project: "" -# Optional Keptn Service name under the project. -service: "" -# Logging configuration -log: - # Log level - level: info -``` diff --git a/versioned_docs/version-1.9/configuration/source/kubernetes.md b/versioned_docs/version-1.9/configuration/source/kubernetes.md deleted file mode 100644 index c70752b3..00000000 --- a/versioned_docs/version-1.9/configuration/source/kubernetes.md +++ /dev/null @@ -1,781 +0,0 @@ ---- -id: kubernetes -title: Kubernetes -sidebar_position: 2 ---- - -A `kubernetes` source plugin produces events for configured Kubernetes resources. These events can be sent to communication channels or actions. To learn how to bind sources to communication channels or actions, read the Communication and Action documents. - -## Enabling plugin - -### Self-hosted Botkube installation - -The Kubernetes plugin is hosted by the official Botkube plugin repository. First, make sure that the `botkube` repository is defined under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - -```yaml -plugins: - repositories: - botkube: - url: https://github.com/kubeshop/botkube/releases/download/v1.9.1/plugins-index.yaml -``` - -To enable Kubernetes source, add `--set 'sources.{configuration-name}.botkube/kubernetes.enabled=true'` to a given Botkube [`install` command](../../cli/commands/botkube_install.md). - -### Botkube Cloud - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Kubernetes plugin. -6. Click **Save** button. - -## Event and resource constraints - -Define constraints for Kubernetes events to narrow down the events you want to receive. - -You can define both global constraints, that are applied to all resources within a given source, and also resource-specific constraints, which override global constraints. See the [Syntax](#configuration-syntax) paragraph for more details. - -There are multiple types of constraints. Each constraint type is described in the following sections. - -### Namespaces - -Include and/or exclude namespaces to watch. You can use exact values or regex expressions to specify namespaces. - -Exclude takes precedence over include. If a given namespace is excluded, it will be ignored, even if it included. - -**Examples** - -To watch all namespaces except those with `testing-` prefix, use the following constraint: - -```yaml -namespaces: - include: - - ".*" # include all... - exclude: - - "testing-.*" # ...except any namespace that has `testing-` prefix -``` - -To watch only `dev` and `prod` namespaces, use the following constraint: - -```yaml -namespaces: - include: - - "dev" - - "prod" - exclude: [] -``` - -### Labels - -Specify exact match for resource labels. The watched resources must have all the specified labels. - -**Example** - -```yaml -labels: # Match only the resources that have all the specified labels - app: "my-app" - environment: "production" -``` - -### Annotations - -Specify exact match for resource annotations. The watched resources must have all the specified annotations. - -**Example** - -```yaml -annotations: # Match only the resources that have all the specified annotations. - app: "my-app" - my-annotation: "true" -``` - -### Resource name - -Filter events based on the resource name. If not defined, all resource names are matched. -Exclude takes precedence over include. If a given resource name is excluded, it will be ignored, even if it included. - -You can use both exact values and regex expressions to specify resource names. This constraint can be set per resource only. See the [Syntax](#configuration-syntax) paragraph for more details. - -**Examples** - -To match resource names that have `testing-` prefix, use the following constraint: - -```yaml -name: - include: - - "testing-.*" # include only resource names that have `testing-` prefix - exclude: [] -``` - -To match all resources except those that have `testing-` prefix, use the following constraint: - -```yaml -name: - include: - - ".*" # include all resource names... - exclude: - - "testing-.*" # ...except those that have `testing-` prefix -``` - -### Event types - -List the event types to watch. - -Possible values: - -- `create`, -- `update`, -- `delete`, -- `error`, -- `all`, which is equal to all of the above. - -**Example** - -```yaml -event: - types: # watch for create, delete and error events - - create - - delete - - error -``` - -### Event reason - -Define exact values or regex expression to match the event reason. If not defined, all events are watched. -Exclude takes precedence over include. If a given event reason is excluded, it will be ignored, even if it included. - -**Examples** - -To match events with reason equal to `BackOff`, use the following constraint: - -```yaml -event: - reason: - include: - - "^BackOff$" # match events with reason equal to `BackOff` - exclude: [] -``` - -To match all events except those with reason equal to `BackOff`, use the following constraint: - -```yaml -event: - reason: - include: - - ".*" # match all event reasons... - exclude: - - "^BackOff$" # ...except those equal to `BackOff` -``` - -### Event message - -Define regex expression to match the event message. If not defined, all event messages are matched. - -Exclude takes precedence over include. If a given event message is excluded, it will be ignored, even if it included. - -**Example** - -To match events with message starting with `Back-off`, use the following constraint: - -```yaml -event: - message: - include: - - "^Back-off.*" # match all events with message starting with `Back-off` - exclude: [] -``` - -To match all events except those with message starting with `Back-off`, use the following constraint: - -```yaml -event: - message: - include: - - ".*" # match all event messages... - exclude: - - "^Back-off.*" # ...except those starting with `Back-off` -``` - -### Recommendations - -You can configure recommendations related to Kubernetes resources. Recommendations respect [namespaces](#namespaces) constraint regex patterns. - -Currently, Kubernetes source plugin can send recommendation about 2 resources: `Pods` and `Ingresses`. - -**Example** - -In order to send recommendation for the Pods that have containers with `latest` tag or the Pods without labels, use the following configuration. - -```yaml -recommendations: - # Recommendations for Pod Kubernetes resource. - pod: - # If true, notifies about Pod containers that use `latest` tag for images. - noLatestImageTag: true - # If true, notifies about Pod resources created without labels. - labelsSet: true -``` - -If you want to receive recommendations for Ingress that contains invalid backend service definition or TLS secret, use the following configuration. - -```yaml -recommendations: - # Recommendations for Ingress Kubernetes resource. - ingress: - # If true, notifies about Ingress resources with invalid backend service reference. - backendServiceValid: true - # If true, notifies about Ingress resources with invalid TLS secret reference. - tlsSecretValid: true -``` - -### Filters - -The filter configuration allows you to configure filters which are used for all processed Kubernetes events. - -```yaml -# Filter settings for various sources. -# Currently, all filters are globally enabled or disabled. -# You can enable or disable filters with `@Botkube filters` commands. -filters: - kubernetes: - # If true, enables support for `botkube.io/disable` resource annotations. - objectAnnotationChecker: true - # If true, filters out Node-related events that are not important. - nodeEventsChecker: true -``` - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# Describes configuration for various recommendation insights. -recommendations: - # Recommendations for Pod Kubernetes resource. - pod: - # If true, notifies about Pod containers that use `latest` tag for images. - noLatestImageTag: true - # If true, notifies about Pod resources created without labels. - labelsSet: true - # Recommendations for Ingress Kubernetes resource. - ingress: - # If true, notifies about Ingress resources with invalid backend service reference. - backendServiceValid: true - # If true, notifies about Ingress resources with invalid TLS secret reference. - tlsSecretValid: true - -# Filter settings for various sources. -filters: - # If true, enables support for `botkube.io/disable` resource annotation. - objectAnnotationChecker: true - # If true, filters out Node-related events that are not important. - nodeEventsChecker: true -# Describes namespaces for every Kubernetes resources you want to watch or exclude. -# These namespaces are applied to every resource specified in the resources list. -# However, every specified resource can override this by using its own namespaces object. -namespaces: &k8s-events-namespaces - # Include contains a list of allowed Namespaces. - # It can also contain regex expressions: - # `- ".*"` - to specify all Namespaces. - include: - - ".*" - # Exclude contains a list of Namespaces to be ignored even if allowed by Include. - # It can also contain regex expressions: - # `- "test-.*"` - to specif all Namespaces with `test-` prefix. - # Exclude list is checked before the Include list. - # exclude: [] - -# Describes event constraints for Kubernetes resources. -# These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. -event: - # Lists all event types to be watched. - types: - - create - - delete - - error - # Optional list of exact values or regex patterns to filter events by event reason. - # Skipped, if both include/exclude lists are empty. - reason: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - # Optional list of exact values or regex patterns to filter event by event message. Skipped, if both include/exclude lists are empty. - # If a given event has multiple messages, it is considered a match if any of the messages match the constraints. - message: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - -# Filters Kubernetes resources to watch by annotations. Each resource needs to have all the specified annotations. -# Regex expressions are not supported. -annotations: {} -# Filters Kubernetes resources to watch by labels. Each resource needs to have all the specified labels. -# Regex expressions are not supported. -labels: {} - -# Describes the Kubernetes resources to watch. -# Resources are identified by its type in `{group}/{version}/{kind (plural)}` format. Examples: `apps/v1/deployments`, `v1/pods`. -# Each resource can override the namespaces and event configuration by using dedicated `event` and `namespaces` field. -# Also, each resource can specify its own `annotations`, `labels` and `name` regex. -resources: - - type: v1/pods - # namespaces: # Overrides 'source'.kubernetes.namespaces - # include: - # - ".*" - # exclude: [] - # annotations: {} # Overrides 'source'.kubernetes.annotations - # labels: {} # Overrides 'source'.kubernetes.labels - # # Optional resource name constraints. - # name: - # # Include contains a list of allowed values. It can also contain regex expressions. - # include: [] - # # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # # Exclude list is checked before the Include list. - # exclude: [] - # event: - # # Overrides 'source'.kubernetes.event.reason - # reason: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.message - # message: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.types - # types: - # - create - - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - event: - message: - exclude: - - ".*nf_conntrack_buckets.*" # Ignore node related noisy messages from GKE clusters - - type: v1/namespaces - - type: v1/persistentvolumes - - type: v1/persistentvolumeclaims - - type: v1/configmaps - - type: rbac.authorization.k8s.io/v1/roles - - type: rbac.authorization.k8s.io/v1/rolebindings - - type: rbac.authorization.k8s.io/v1/clusterrolebindings - - type: rbac.authorization.k8s.io/v1/clusterroles - - type: apps/v1/daemonsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.numberReady - - type: batch/v1/jobs - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.conditions[*].type - - type: apps/v1/deployments - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.availableReplicas - - type: apps/v1/statefulsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.readyReplicas -commands: - # Configures which verbs are available in actionable items. - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - # Configure which resources are available in actionable items. - resources: - - "deployments" - - "pods" - - "namespaces" - - "daemonsets" - - "statefulsets" - - "storageclasses" - - "nodes" - - "configmaps" - - "services" - - "ingresses" -# Define extra buttons to be displayed beside the actionable notification message. -extraButtons: - - enabled: false - trigger: - type: ["error"] - button: - displayName: "Get Help" - commandTpl: "doctor --resource={{ .Kind | lower }}/{{ .Name }} --namespace={{ .Namespace }} --error={{ .Reason }} --bk-cmd-header='AI assistance'" -# Logger configuration -log: - level: info - disableColors: false -``` - -## Examples - -This section lists all examples for Kubernetes source plugin. They are based on the Botkube self-hosted installation but can be used with Botkube Cloud by extracting the `botkube/kubernetes.config` section. - -```yaml -# Map of sources. Source contains configuration for Kubernetes events and sending recommendations. -# The property name under `sources` object is an alias for a given configuration. You can define multiple sources configuration with different names. -# Key name is used as a binding reference. -# See the `values.yaml` file for full object. -# -## Format: sources.{alias} -sources: - "k8s-recommendation-events": - displayName: "Kubernetes Recommendations" - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes configuration for various recommendation insights. - recommendations: - # Recommendations for Pod Kubernetes resource. - pod: - # If true, notifies about Pod containers that use `latest` tag for images. - noLatestImageTag: true - # If true, notifies about Pod resources created without labels. - labelsSet: true - # Recommendations for Ingress Kubernetes resource. - ingress: - # If true, notifies about Ingress resources with invalid backend service reference. - backendServiceValid: true - # If true, notifies about Ingress resources with invalid TLS secret reference. - tlsSecretValid: true - - "k8s-all-events": - displayName: "Kubernetes Info" - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Logging configuration - log: - # Log level - level: info - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: &k8s-events-namespaces - # Include contains a list of allowed Namespaces. - # It can also contain regex expressions: - # `- ".*"` - to specify all Namespaces. - include: - - ".*" - # Exclude contains a list of Namespaces to be ignored even if allowed by Include. - # It can also contain regex expressions: - # `- "test-.*"` - to specif all Namespaces with `test-` prefix. - # Exclude list is checked before the Include list. - # exclude: [] - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - create - - delete - - error - # Optional list of exact values or regex patterns to filter events by event reason. - # Skipped, if both include/exclude lists are empty. - reason: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - # Optional list of exact values or regex patterns to filter event by event message. Skipped, if both include/exclude lists are empty. - # If a given event has multiple messages, it is considered a match if any of the messages match the constraints. - message: - # Include contains a list of allowed values. It can also contain regex expressions. - include: [] - # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # Exclude list is checked before the Include list. - exclude: [] - - # Filters Kubernetes resources to watch by annotations. Each resource needs to have all the specified annotations. - # Regex expressions are not supported. - annotations: {} - # Filters Kubernetes resources to watch by labels. Each resource needs to have all the specified labels. - # Regex expressions are not supported. - labels: {} - - # Describes the Kubernetes resources to watch. - # Resources are identified by its type in `{group}/{version}/{kind (plural)}` format. Examples: `apps/v1/deployments`, `v1/pods`. - # Each resource can override the namespaces and event configuration by using dedicated `event` and `namespaces` field. - # Also, each resource can specify its own `annotations`, `labels` and `name` regex. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - # namespaces: # Overrides 'source'.kubernetes.namespaces - # include: - # - ".*" - # exclude: [] - # annotations: {} # Overrides 'source'.kubernetes.annotations - # labels: {} # Overrides 'source'.kubernetes.labels - # # Optional resource name constraints. - # name: - # # Include contains a list of allowed values. It can also contain regex expressions. - # include: [] - # # Exclude contains a list of values to be ignored even if allowed by Include. It can also contain regex expressions. - # # Exclude list is checked before the Include list. - # exclude: [] - # event: - # # Overrides 'source'.kubernetes.event.reason - # reason: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.message - # message: - # include: [] - # exclude: [] - # # Overrides 'source'.kubernetes.event.types - # types: - # - create - - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/persistentvolumes - - type: v1/persistentvolumeclaims - - type: v1/configmaps - - type: rbac.authorization.k8s.io/v1/roles - - type: rbac.authorization.k8s.io/v1/rolebindings - - type: rbac.authorization.k8s.io/v1/clusterrolebindings - - type: rbac.authorization.k8s.io/v1/clusterroles - - type: apps/v1/daemonsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.numberReady - - type: batch/v1/jobs - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.conditions[*].type - - type: apps/v1/deployments - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.availableReplicas - - type: apps/v1/statefulsets - event: # Overrides 'source'.kubernetes.event - types: - - create - - update - - delete - - error - updateSetting: - includeDiff: true - fields: - - spec.template.spec.containers[*].image - - status.readyReplicas - ## Custom resource example - # - type: velero.io/v1/backups - # namespaces: - # include: - # - ".*" - # exclude: - # - - # event: - # types: - # - create - # - update - # - delete - # - error - # updateSetting: - # includeDiff: true - # fields: - # - status.phase - # List of available commands that can be used in actionable items under kubernetes events. - commands: - # Configures which verbs are available in actionable items. - verbs: ["api-resources", "api-versions", "cluster-info", "describe", "explain", "get", "logs", "top"] - # Configure which resources are available in actionable items. - resources: - [ - "deployments", - "pods", - "namespaces", - "daemonsets", - "statefulsets", - "storageclasses", - "nodes", - "configmaps", - "services", - "ingresses", - ] - # Filter settings for various sources. - # Currently, all filters are globally enabled or disabled. - # You can enable or disable filters with `@Botkube enable/disable filters` commands. - filters: - kubernetes: - # If true, enables support for `botkube.io/disable` resource annotations. - objectAnnotationChecker: true - # If true, filters out Node-related events that are not important. - nodeEventsChecker: true - - "k8s-err-events": - displayName: "Kubernetes Errors" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - error - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/persistentvolumes - - type: v1/persistentvolumeclaims - - type: v1/configmaps - - type: rbac.authorization.k8s.io/v1/roles - - type: rbac.authorization.k8s.io/v1/rolebindings - - type: rbac.authorization.k8s.io/v1/clusterrolebindings - - type: rbac.authorization.k8s.io/v1/clusterroles - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs - - "k8s-err-with-logs-events": - displayName: "Kubernetes Errors for resources with logs" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - error - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs - # `apps/v1/replicasets` excluded on purpose - to not show logs twice for a given higher-level resource (e.g. Deployment) - - "k8s-create-events": - displayName: "Kubernetes Resource Created Events" - - # Describes Kubernetes source configuration. - # See the `values.yaml` file for full object. - botkube/kubernetes: - enabled: true - config: - # Describes namespaces for every Kubernetes resources you want to watch or exclude. - # These namespaces are applied to every resource specified in the resources list. - # However, every specified resource can override this by using its own namespaces object. - namespaces: *k8s-events-namespaces - - # Describes event constraints for Kubernetes resources. - # These constraints are applied for every resource specified in the `resources` list, unless they are overridden by the resource's own `events` object. - event: - # Lists all event types to be watched. - types: - - create - - # Describes the Kubernetes resources you want to watch. - # See the `values.yaml` file for full object. - resources: - - type: v1/pods - - type: v1/services - - type: networking.k8s.io/v1/ingresses - - type: v1/nodes - - type: v1/namespaces - - type: v1/configmaps - - type: apps/v1/deployments - - type: apps/v1/statefulsets - - type: apps/v1/daemonsets - - type: batch/v1/jobs -``` - -The default configuration for Helm chart can be found in [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml). diff --git a/versioned_docs/version-1.9/configuration/source/prometheus.md b/versioned_docs/version-1.9/configuration/source/prometheus.md deleted file mode 100644 index 135c1cd3..00000000 --- a/versioned_docs/version-1.9/configuration/source/prometheus.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -id: prometheus -title: Prometheus -sidebar_position: 3 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The Botkube Prometheus source plugin allows you to fetch alerts from AlertManager of Prometheus deployment and notify in configured platforms. - -The Prometheus plugin is hosted by the Botkube Cloud plugin repository and requires active Botkube Cloud account. - -## Enabling plugin - -You can enable the plugin as a part of Botkube instance configuration. - -1. If you don't have an existing Botkube instance, create a new one, according to the [Installation](../../installation/index.mdx) docs. -2. From the [Botkube Cloud homepage](https://app.botkube.io), click on a card of a given Botkube instance. -3. Navigate to the platform tab which you want to configure. -4. Click **Add plugin** button. -5. Select the Prometheus plugin. -6. Click **Save** button. - -## Configuration Syntax - -This plugin supports the following configuration: - -```yaml -# Prometheus endpoint without api version and resource. -url: "http://localhost:9090" -# If set as true, Prometheus source plugin will not send alerts that is created before plugin start time. -ignoreOldAlerts: true -# Only the alerts that have state provided in this config will be sent as notification. https://pkg.go.dev/github.com/prometheus/prometheus/rules#AlertState -alertStates: ["firing", "pending", "inactive"] -# Logging configuration -log: - # Log level - level: info -``` - -## Merging strategy - -For all collected `prometheus` sources bindings, configuration properties are overridden based on the order of the binding list for a given channel. The priority is given to the last binding specified on the list. Empty properties are omitted. diff --git a/versioned_docs/version-1.9/examples-and-tutorials/_category_.json b/versioned_docs/version-1.9/examples-and-tutorials/_category_.json deleted file mode 100644 index fba891b9..00000000 --- a/versioned_docs/version-1.9/examples-and-tutorials/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Tutorials and examples", - "position": 2 -} diff --git a/versioned_docs/version-1.9/examples-and-tutorials/getstarted/assets/create-new-instance.png b/versioned_docs/version-1.9/examples-and-tutorials/getstarted/assets/create-new-instance.png deleted file mode 100644 index 28217273..00000000 Binary files a/versioned_docs/version-1.9/examples-and-tutorials/getstarted/assets/create-new-instance.png and /dev/null differ diff --git a/versioned_docs/version-1.9/examples-and-tutorials/getstarted/assets/install-agent.png b/versioned_docs/version-1.9/examples-and-tutorials/getstarted/assets/install-agent.png deleted file mode 100644 index 3886713b..00000000 Binary files a/versioned_docs/version-1.9/examples-and-tutorials/getstarted/assets/install-agent.png and /dev/null differ diff --git a/versioned_docs/version-1.9/examples-and-tutorials/getstarted/index.md b/versioned_docs/version-1.9/examples-and-tutorials/getstarted/index.md deleted file mode 100644 index 26a7dbed..00000000 --- a/versioned_docs/version-1.9/examples-and-tutorials/getstarted/index.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: get started -title: Get Started -sidebar_position: 1 ---- - -# Get Started with Botkube in Minutes - -Welcome to Botkube! This guide will walk you through the process of setting up Botkube to send notifications and execute commands in your Kubernetes clusters directly from Slack and Microsoft Teams. - -[![Watch our video tutorial for a step-by-step walkthrough](http://img.youtube.com/vi/AGKJsNro4jE/0.jpg)](https://www.youtube.com/watch?v=AGKJsNro4jE&t=59s "Watch our video tutorial for a step-by-step walkthrough") - -## Overview - -Botkube is a Kubernetes Monitoring and Tool designed to optimize your K8s workflow by providing real-time alerts from and commands within your Kubernetes environment. With Botkube, you can receive alerts, execute commands, and stay informed about your cluster's health and status, all from your preferred communication platform. - -## Step 1: Sign up for Botkube - -Visit [botkube.io](http://botkube.io) and create an account. This account will enable you to access the Botkube Cloud Dashboard and manage your Botkube instances. - -## Step 2: Connect Your Kubernetes Cluster - -1. **Create a New Instance:** Log in to the Botkube Cloud Dashboard and select "create a new instance". - - ![Create New Instance](assets/create-new-instance.png) - -2. **Install Botkube Agent:** Follow the instructions provided on the dashboard to install the Botkube Agent on your Kubernetes cluster. You can choose either Helm or a CLI command for installation. - - ![Install Botkube Agent](assets/install-agent.png) - -## Step 3: Connect to Your Preferred Communication Platform - -Follow the instructions provided on the Botkube Cloud Dashboard to connect Botkube to your preferred communication platform, such as [Slack ](https://docs.botkube.io/installation/slack/cloud-slack)or [Microsoft Teams](https://docs.botkube.io/installation/teams/). - -## Step 4: Setting Up a Botkube Cloud Instance - -Once your Botkube instance is connected to your communication platform, you will start receiving alerts and notifications from your Kubernetes cluster. - -### Finalizing Your Botkube Cloud Instance - -1. **Select Channels:** From the dashboard, choose the channels you wish to use with Botkube. -2. **Configure Plugins:** Connect your preferred plugins to enhance Botkube's functionality. -3. **Set Preferences:** Review and select your preferred Botkube defaults. -4. **Apply Changes:** Finalize your setup by selecting "Apply changes." - -## Step 5: Start Receiving Alerts - -Congratulations! You're now ready to start using Botkube to streamline your Kubernetes workflow and stay informed about your cluster's status. If you encounter any issues or need further assistance, feel free to reach out to our community on [Slack](https://join.botkube.io/) or [schedule a call with one of our team](https://calendly.com/d/274-ytm-6mk/chat-with-the-botkube-team-30-minutes). Happy Monitoring! diff --git a/versioned_docs/version-1.9/examples-and-tutorials/index.mdx b/versioned_docs/version-1.9/examples-and-tutorials/index.mdx deleted file mode 100644 index 589a111f..00000000 --- a/versioned_docs/version-1.9/examples-and-tutorials/index.mdx +++ /dev/null @@ -1,51 +0,0 @@ ---- -id: overview -title: Overview -sidebar_position: 1 ---- - -import { CardTutorial } from "@site/src/components/Card/Tutorial"; - -# Welcome to Botkube Examples & Tutorials - -
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
- -
-
diff --git a/versioned_docs/version-1.9/examples-and-tutorials/integrations/index.md b/versioned_docs/version-1.9/examples-and-tutorials/integrations/index.md deleted file mode 100644 index 0228021b..00000000 --- a/versioned_docs/version-1.9/examples-and-tutorials/integrations/index.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -id: integrations -title: Integrations -sidebar_position: 4 ---- - -# 🛠 Integrations - -## Communication Platforms - -- [Microsoft Teams](https://botkube.io/integration/teams): Seamlessly manage Kubernetes and collaborate within your team using Botkube's integration with Microsoft Teams -- [Slack](https://botkube.io/integration/slack): Enhance your Kubernetes management by receiving notifications and interacting with clusters directly from Slack channels through Botkube. -- [Discord](https://botkube.io/integration/discord): Stay on top of Kubernetes events and streamline your operations by integrating Botkube with Discord. -- [Mattermost](https://botkube.io/integration/mattermost): Keep your team informed about Kubernetes events and receive alerts directly within your Mattermost instance with Botkube integration. - -## Source Plugins - -- [Kubernetes Events](https://botkube.io/learn/how-botkube-makes-monitoring-kubernetes-easy): Effortlessly monitor Kubernetes events using Botkube's built-in source plugin. -- [ArgoCD](https://botkube.io/integration/argo-cd-botkube-kubernetes-integration): Streamline your GitOps workflows and receive notifications by using Botkube's ArgoCD plugin. -- [Prometheus](https://botkube.io/integration/prometheus): Optimize your Kubernetes Monitoring process by connecting your Prometheus metrics with Botkube. -- [Keptn](https://botkube.io/integration/keptn): Automate testing, deployment, and operations in your Kubernetes environments by using Botkube's Keptn plugin. - -## Executor Plugins - -- [Kubectl](https://docs.botkube.io/usage/executor/kubectl): Easily execute Kubernetes commands in your channels with Botkube's Kubectl integration. -- [Open AI](https://botkube.io/integration/chatgpt-botkube-kubernetes-integration): Harness the power of Open AI with Botkube's Doctor plugin for intelligent interactions and enhanced automation in your Kubernetes environment. -- [Helm](https://botkube.io/integration/helm): Manage Helm deployments and releases seamlessly with Botkube's Helm plugin. -- [Flux](https://botkube.io/integration/botkube-flux-kubernetes-integration): Use Botkube for GitOps operations with the Flux plugin. -- [Exec](https://botkube.io/integration/custom-executor-plugin): Connecting your own plugin for a tailored Kubernetes workflow with Botkube's exec plugin. diff --git a/versioned_docs/version-1.9/examples-and-tutorials/tutorials/index.md b/versioned_docs/version-1.9/examples-and-tutorials/tutorials/index.md deleted file mode 100644 index 725791b7..00000000 --- a/versioned_docs/version-1.9/examples-and-tutorials/tutorials/index.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: tutorials -title: Tutorials -sidebar_position: 2 ---- - -# 🧑‍💻Tutorials - -## Best Practices - -- [Multi-cluster Kubernetes Observability](https://botkube.io/blog/empowering-your-kubernetes-multi-cluster-observability-with-intelligent-monitoring): Explore how Botkube streamlines Kubernetes multi-cluster management for optimized performance and reliability. -- [Day 2 Operations with Flux](https://botkube.io/blog/creating-the-botkube-flux-plugin-for-day-2-operations) :Discover best practices for handling Day 2 operations in Kubernetes using Botkube's Flux plugin. - -## Features - -### Communication Platforms - -- [Microsoft Teams Integration](https://botkube.io/blog/maximize-your-devops-teams-efficiency-with-botkube-and-microsoft-teams): Learn how to integrate Botkube with Microsoft Teams for seamless communication and collaboration in Kubernetes environments. -- [Slack Integration](https://botkube.io/blog/get-botkube-running-in-under-3-minutes-the-new-slack-app): Step-by-step guide on setting up Botkube integration with Slack to receive notifications and interact with Kubernetes clusters directly. -- [Discord Integration](https://botkube.io/integration/discord): Implement Botkube integration with Discord for efficient Kubernetes operations and event management. -- [Mattermost Integration](https://botkube.io/integration/mattermost): Configure Botkube integration with Mattermost to stay updated on Kubernetes events and receive alerts within Mattermost channels. - -### Executor Plugins - -- [Kubectl Plugin Usage](https://botkube.io/learn/kubectl-cheat-sheet): Utilize Botkube's integration with Kubectl for executing Kubernetes commands conveniently. -- [Open AI Integration](https://botkube.io/blog/doctor-plug-in-tutorial): Integrate Open AI with Botkube for intelligent automation and enhanced interactions within Kubernetes environments. -- [Helm Plugin Setup](https://botkube.io/learn/helm-charts): Seamlessly manage Helm deployments and releases with Botkube's Helm integration. -- [Flux Plugin Configuration](https://botkube.io/blog/streamlining-gitops-with-the-botkube-flux-plugin): Set up and configure Botkube's Flux plugin for automated deployment and synchronization of Kubernetes resources. -- [Custom Executor Plugin Development](https://botkube.io/integration/custom-executor-plugin): Develop and integrate custom executor plugins with Botkube for tailored Kubernetes operations. - -### Source Plugins - -- [Kubernetes Events Monitoring](https://botkube.io/blog/five-essential-kubernetes-tasks): Monitor Kubernetes events effortlessly with Botkube's built-in source plugin. -- [ArgoCD Integration](https://botkube.io/blog/getting-started-with-botkube-and-argocd): Integrate Botkube with ArgoCD for streamlined continuous delivery workflows and notifications. -- [Prometheus Integration](https://botkube.io/integration/prometheus): Monitor Kubernetes clusters effectively by integrating Prometheus metrics with Botkube. -- [Keptn Integration](https://botkube.io/blog/implementing-your-own-botkube-plugin-a-real-life-use-case): Automate testing, deployment, and operations in Kubernetes environments by integrating Botkube with Keptn. diff --git a/versioned_docs/version-1.9/examples-and-tutorials/usecases/index.md b/versioned_docs/version-1.9/examples-and-tutorials/usecases/index.md deleted file mode 100644 index fa077853..00000000 --- a/versioned_docs/version-1.9/examples-and-tutorials/usecases/index.md +++ /dev/null @@ -1,24 +0,0 @@ ---- -id: use cases -title: Use Cases -sidebar_position: 3 ---- - -# 🛠Use Cases - -## GitOps Integrations - -- [Flux Plugin for Day 2 Operations](https://botkube.io/blog/creating-the-botkube-flux-plugin-for-day-2-operations): Discover how Botkube's Flux plugin simplifies Day 2 operations and provides tailored solutions for various K8s management needs. -- [ArgoCD Plugin for Optimizing Collaboration & Notifications](https://botkube.io/blog/optimizing-collaboration-and-notifications-with-the-botkube-argocd-plugin): Learn about how Botkube's engineering team using the ArgoCD plugin to optimize their deployment experience. -- [Enhancing GitOps Workflows with Botkube](https://botkube.io/blog/enhancing-gitops-workflows-with-botkube): Explore Botkube's capabilities in optimizing GitOps workflows. - -## Automating the K8s Troubleshooting workflow - -- [Using Keptn as a Source](https://botkube.io/blog/implementing-your-own-botkube-plugin-a-real-life-use-case): Discover how to leverage Keptn as a source to adapt to various troubleshooting scenarios. -- [Streamlining Helm Deployments](https://botkube.io/case-studies/civo): Learn how one of Botkube's users utilizes the Botkube Helm plugin to streamline their Helm deployments and updates. -- [GitHub Issue Reporter for Failing K8s Apps](https://botkube.io/blog/build-a-github-issues-reporter-for-failing-kubernetes-apps-with-botkube-plugins): Automate the reporting of issues with your Kubernetes applications on GitHub directly from your Slack channel. -- [5 Essential DevOps tasks to Automate](https://botkube.io/blog/botkube-5-essential-devopstasks-to-automate): Discover how to automate essential DevOps tasks like resource scaling and log management with Botkube. - -## Smart Monitoring - -- [ChatGPT Plugin](https://botkube.io/blog/building-a-chatgpt-plugin-from-ideation-to-implementation): Explore Botkube's AIOps capabilities and dive into the realm of intelligent Kubernetes monitoring with the OpenAI plugin. diff --git a/versioned_docs/version-1.9/examples-and-tutorials/videos/index.md b/versioned_docs/version-1.9/examples-and-tutorials/videos/index.md deleted file mode 100644 index 6ec967d7..00000000 --- a/versioned_docs/version-1.9/examples-and-tutorials/videos/index.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: videos -title: Videos -sidebar_position: 5 ---- - -# 🎥️ Videos - -## Office Hours - -- [Developer Self-Service](https://www.youtube.com/watch?v=74qMbqWBxms&list=PL2Vye-us8_x8-IErakx_KggCC7EPWJuby&index=2) -- [Troubleshooting Kubernetes in Microsoft Teams](https://youtu.be/HaHaa9ju8Wg) -- [GitOps Practices with Flux](https://www.youtube.com/watch?v=WxkDWLqVghw&list=PL2Vye-us8_x8-IErakx_KggCC7EPWJuby) -- [Developer Productivity with Oketeo](https://www.youtube.com/watch?v=506Tc1Grj_o) -- [Botkube goes GitOps](https://www.youtube.com/watch?v=WxkDWLqVghw) -- [Kubernetes Multi-Cluster Management](https://www.youtube.com/watch?v=ZeaUfboNKfc) -- [5 Essential Kubernetes Tasks to Automate](https://www.youtube.com/watch?v=CzlSHMM_Ypc) -- [ArgoCD Workflows](https://youtu.be/1i59PN-65SY) -- [Zapier for Kubernetes](https://www.youtube.com/watch?v=VJzSRTQpHhs) - -## Community Calls - -- [Open Source Friday - ChatOps for Kubernetes](https://www.youtube.com/watch?v=tdyPuMA2mww) -- [CNCF Webinar - Unlocking the Power of Kubernetes Collaborative Troubleshooting](https://youtu.be/6VTEOOfIbIk) -- [Tailwarden - ChatOps for Kubernetes](https://youtu.be/UOURPb03mxU) -- [Kubefirst - Monitor & Act on Your Kubernetes Cluster](https://www.youtube.com/watch?v=RLmU472lync) -- [CNCF Islamabad - Unlocking K8s Troubleshooting Best Practices](https://www.youtube.com/watch?v=Ry_UijS1ZNk) -- [Cloud Lunch and Learn - K8s Troubleshooting Best Practices in Azure](https://www.youtube.com/watch?v=x0TBA6TpfqU) -- [Kunal Kushwaha - Collaborative Troubleshooting and Monitoring in K8s With Botkube](https://youtu.be/coDSM9LiOB4) - -## Botkube User Contributions - -- [Kubernetes Cluster ChatOps - Engineering with Morris](https://youtu.be/wI6nJL4dtHY) -- [Botkube (Real-Time Kubernetes Monitoring and Alerting) - Kubernetes Bangalore](https://youtu.be/Xylb7w0yZhQ) -- [Como utilizar Slack e BotKube pra se comunicar com o seu cluster Kubernetes - Fabricio Veronez](https://www.youtube.com/watch?v=FEUOnE4z2Ac) -- [Monitoring & Debugging Kubernetes Applications with BotKube - Collabnix](https://youtu.be/mZHxJjYNmKA) - -## Conference Talks - -- [GitOps Con EU - Empowering Developer Productivity with ArgoCD](https://www.youtube.com/watch?v=k4L5_zKorZ8&list=PL2Vye-us8_x_5eqYQTBq7ZywupscaW5yA) -- [Civo Navigate - Love is Blind, but Your K8s Troubleshooting Doesn’t Have to Be](https://youtu.be/nFpTXrkz3cQ) diff --git a/versioned_docs/version-1.9/installation/assets/cloud_install.png b/versioned_docs/version-1.9/installation/assets/cloud_install.png deleted file mode 100644 index 954d6cfe..00000000 Binary files a/versioned_docs/version-1.9/installation/assets/cloud_install.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/assets/cloud_instance_delete.png b/versioned_docs/version-1.9/installation/assets/cloud_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.9/installation/assets/cloud_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/assets/cloud_new_instance.png b/versioned_docs/version-1.9/installation/assets/cloud_new_instance.png deleted file mode 100644 index 80cdd33f..00000000 Binary files a/versioned_docs/version-1.9/installation/assets/cloud_new_instance.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_add_bot.png b/versioned_docs/version-1.9/installation/discord/assets/discord_add_bot.png deleted file mode 100644 index f03ecdc8..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_add_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_add_plugins.png b/versioned_docs/version-1.9/installation/discord/assets/discord_add_plugins.png deleted file mode 100644 index 8fbf3941..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_applications_portal.png b/versioned_docs/version-1.9/installation/discord/assets/discord_applications_portal.png deleted file mode 100644 index 278b7b5d..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_applications_portal.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_bot_auth.png b/versioned_docs/version-1.9/installation/discord/assets/discord_bot_auth.png deleted file mode 100644 index 45ef0970..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_bot_auth.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_bot_auth_2.png b/versioned_docs/version-1.9/installation/discord/assets/discord_bot_auth_2.png deleted file mode 100644 index 7de140dd..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_bot_auth_2.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_bot_created.png b/versioned_docs/version-1.9/installation/discord/assets/discord_bot_created.png deleted file mode 100644 index 2f7da954..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_bot_created.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_bot_id_form.png b/versioned_docs/version-1.9/installation/discord/assets/discord_bot_id_form.png deleted file mode 100644 index 5a932a4c..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_bot_id_form.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_bot_scope.png b/versioned_docs/version-1.9/installation/discord/assets/discord_bot_scope.png deleted file mode 100644 index 487f0dd1..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_bot_scope.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_channel_id_form.png b/versioned_docs/version-1.9/installation/discord/assets/discord_channel_id_form.png deleted file mode 100644 index abf2aa77..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_channel_id_form.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_copy_application_id.png b/versioned_docs/version-1.9/installation/discord/assets/discord_copy_application_id.png deleted file mode 100644 index 259021f1..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_copy_application_id.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_copy_channel_id.png b/versioned_docs/version-1.9/installation/discord/assets/discord_copy_channel_id.png deleted file mode 100644 index 2ecf8d18..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_copy_channel_id.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_create.png b/versioned_docs/version-1.9/installation/discord/assets/discord_create.png deleted file mode 100644 index cf28566d..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_create.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_create_new.png b/versioned_docs/version-1.9/installation/discord/assets/discord_create_new.png deleted file mode 100644 index bc88d336..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_create_new.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_developer_mode.png b/versioned_docs/version-1.9/installation/discord/assets/discord_developer_mode.png deleted file mode 100644 index d0f1c270..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_developer_mode.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_instance_delete.png b/versioned_docs/version-1.9/installation/discord/assets/discord_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_instance_display_name.png b/versioned_docs/version-1.9/installation/discord/assets/discord_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_platform_select.png b/versioned_docs/version-1.9/installation/discord/assets/discord_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_summary.png b/versioned_docs/version-1.9/installation/discord/assets/discord_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/assets/discord_token_form.png b/versioned_docs/version-1.9/installation/discord/assets/discord_token_form.png deleted file mode 100644 index 7a998f8c..00000000 Binary files a/versioned_docs/version-1.9/installation/discord/assets/discord_token_form.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/discord/cloud.md b/versioned_docs/version-1.9/installation/discord/cloud.md deleted file mode 100644 index 8435cd39..00000000 --- a/versioned_docs/version-1.9/installation/discord/cloud.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -id: discord-cloud -slug: cloud -title: Discord for Botkube Cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Discord - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/discord_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Discord` option. - ![Select Platform](assets/discord_platform_select.png "Select platform") - -4. Create Botkube app at your Discord Server - - Reach https://discordapp.com/developers/applications. - - ![discord_applications_portal](assets/discord_applications_portal.png) - -5. Create a "New Application" named Botkube and add a bot named **Botkube** into the Application. - - ![discord_create_new](assets/discord_create_new.png) - -6. Copy the Application **APPLICATION ID** - - ![discord_copy_client_id](assets/discord_copy_application_id.png) - - and paste it in the `BotID` field in the form. - - ![bot_id_form](assets/discord_bot_id_form.png) - -7. Add a description - `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - Set the Botkube icon (Botkube icon can be downloaded from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-color-192x192.png)). - - Click on Save Changes to update the Bot. - -8. Now, reach the **Bot** page and Click **Add Bot** to add a Discord Bot to your application. - - ![discord_add_bot](assets/discord_add_bot.png) - -9. After Bot creation, now you can see a bot is added to your application. Click on the **Reset Token** button. - - ![discord_bot_created](assets/discord_bot_created.png) - -10. Copy the Token and paste it in `Token` field the form. - - ![discord_token_form](assets/discord_token_form.png) - -11. Go to the **OAuth2** page. Generate the URL with suitable permissions using the **OAuth2 URL Generator** available under the OAuth2 section to add bot to your Discord server. - -![discord_bot_scope](assets/discord_bot_scope.png) - -the generated URL contains **YOUR_CLIENT_ID**, Scope and permission details. - -``` -https://discord.com/api/oauth2/authorize?client_id={YOUR_CLIENT_ID}&permissions={SET_OF_PERMISSIONS}&scope=bot -``` - -12. Copy and Paste the generated URL in a new tab, select the discord server to which you want to add the bot, click Continue and Authorize Bot addition. - -![discord_bot_auth](assets/discord_bot_auth.png) - -![discord_bot_auth_2](assets/discord_bot_auth_2.png) - -13. Switch to the Discord app. Navigate to **User settings** and select **Advanced** tab. - - Enable the **Developer Mode**. - - ![discord_developer_mode](assets/discord_developer_mode.png) - -14. Create a new channel or select an existing one and copy the **CHANNEL ID**. - - To get the channel ID, right-click on a channel you want to receive notification in and click on **Copy ID**. - - ![discord_copy_channel_id.png](assets/discord_copy_channel_id.png) - - Copy the channel ID and create it in `Channel ID` field in the form. - - ![discord_channel_id_form](assets/discord_channel_id_form.png) - -15. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/discord_add_plugins.png "Plugins") - -16. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/discord_create.png "Create") - -17. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/discord_summary.png "Summary") - -## Clean up - -### Remove Botkube from Discord Server - -- Go to Discord Developers Portal [Applications](https://discord.com/developers/applications) page, -- Click on "Botkube" and click on "Delete App" button. - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/discord_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.9/installation/discord/index.md b/versioned_docs/version-1.9/installation/discord/index.md deleted file mode 100644 index 0f3cfb03..00000000 --- a/versioned_docs/version-1.9/installation/discord/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: discord -title: Discord -sidebar_position: 4 ---- - -You can use Discord app to connect Botkube to your Discord Server. Learn how to create and configure Discord app for Botkube installation for: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.9/installation/discord/self-hosted.md b/versioned_docs/version-1.9/installation/discord/self-hosted.md deleted file mode 100644 index 35b1523f..00000000 --- a/versioned_docs/version-1.9/installation/discord/self-hosted.md +++ /dev/null @@ -1,137 +0,0 @@ ---- -id: discord-self-hosted -slug: self-hosted -title: Discord for self-hosted Botkube -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Discord server account - -## Install Botkube to the Discord Server - -Follow the steps below to install Botkube Discord app to your Discord server. - -### Create Botkube app at your Discord Server - -1. Reach https://discordapp.com/developers/applications. - - ![discord_applications_portal](assets/discord_applications_portal.png) - -2. Create a "New Application" named Botkube and add a bot named **Botkube** into the Application. - - ![discord_create_new](assets/discord_create_new.png) - -3. Copy the Application **APPLICATION ID** and export it as the `DISCORD_BOT_ID` environment variable. - - ``` - export DISCORD_BOT_ID={APPLICATION_ID} - ``` - - ![discord_copy_client_id](assets/discord_copy_application_id.png) - -4. Add a description - `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - Set the Botkube icon (Botkube icon can be downloaded from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-color-192x192.png)). - - Click on Save Changes to update the Bot. - -5. Now, reach the **Bot** page and Click **Add Bot** to add a Discord Bot to your application. - - ![discord_add_bot](assets/discord_add_bot.png) - -6. After Bot creation, now you can see a bot is added to your application. Click on the **Reset Token** button. - - ![discord_bot_created](assets/discord_bot_created.png) - -7. Copy the Token and export it as the `DISCORD_TOKEN` environment variable. - - ``` - export DISCORD_TOKEN={TOKEN} - ``` - -8. Go to the **OAuth2** page. Generate the URL with suitable permissions using the **OAuth2 URL Generator** available under the OAuth2 section to add bot to your Discord server. - - ![discord_bot_scope](assets/discord_bot_scope.png) - - the generated URL contains **YOUR_CLIENT_ID**, Scope and permission details. - - ``` - https://discord.com/api/oauth2/authorize?client_id={YOUR_CLIENT_ID}&permissions={SET_OF_PERMISSIONS}&scope=bot - ``` - -9. Copy and Paste the generated URL in a new tab, select the discord server to which you want to add the bot, click Continue and Authorize Bot addition. - - ![discord_bot_auth](assets/discord_bot_auth.png) - - ![discord_bot_auth_2](assets/discord_bot_auth_2.png) - -10. Switch to the Discord app. Navigate to **User settings** and select **Advanced** tab. - - Enable the **Developer Mode**. - - ![discord_developer_mode](assets/discord_developer_mode.png) - -11. Create a new channel or select an existing one and copy the **CHANNEL ID**. - - To get the channel ID, right-click on a channel you want to receive notification in and click on **Copy ID**. - - ![discord_copy_channel_id.png](assets/discord_copy_channel_id.png) - - Copy the channel ID and export it as the `DISCORD_CHANNEL_ID` environment variable. - - ``` - export DISCORD_CHANNEL_ID={ID} - ``` - -12. Now, go ahead and install the Botkube backend on your Kubernetes cluster. - -:::note -Follow the first 4 mins of this [Video Tutorial](https://youtu.be/8o25pRbXdFw) to understand the process visually. -::: - -### Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} - -botkube install --version v1.9.1 \ ---set communications.default-group.discord.enabled=true \ ---set communications.default-group.discord.channels.default.id=${DISCORD_CHANNEL_ID} \ ---set communications.default-group.discord.botID=${DISCORD_BOT_ID} \ ---set communications.default-group.discord.token=${DISCORD_TOKEN} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} -``` - -where: - -- **DISCORD_CHANNEL_ID** is the channel name where @Botkube needs to send notifications, -- **DISCORD_BOT_ID** is the Botkube Application Client ID, -- **DISCORD_TOKEN** is the Token you received after adding Botkube bot to your Discord Application, -- **CLUSTER_NAME** is the cluster name set in the incoming messages, -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -### Remove Botkube from Discord Server - -- Go to Discord Developers Portal [Applications](https://discord.com/developers/applications) page, -- Click on "Botkube" and click on "Delete App" button. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_add_plugins.png b/versioned_docs/version-1.9/installation/elasticsearch/assets/els_add_plugins.png deleted file mode 100644 index 8306a743..00000000 Binary files a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_create.png b/versioned_docs/version-1.9/installation/elasticsearch/assets/els_create.png deleted file mode 100644 index 9ffaf353..00000000 Binary files a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_create.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_form.png b/versioned_docs/version-1.9/installation/elasticsearch/assets/els_form.png deleted file mode 100644 index db744494..00000000 Binary files a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_form.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_instance_delete.png b/versioned_docs/version-1.9/installation/elasticsearch/assets/els_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_instance_display_name.png b/versioned_docs/version-1.9/installation/elasticsearch/assets/els_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_platform_select.png b/versioned_docs/version-1.9/installation/elasticsearch/assets/els_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_summary.png b/versioned_docs/version-1.9/installation/elasticsearch/assets/els_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.9/installation/elasticsearch/assets/els_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/elasticsearch/cloud.md b/versioned_docs/version-1.9/installation/elasticsearch/cloud.md deleted file mode 100644 index 4a37750c..00000000 --- a/versioned_docs/version-1.9/installation/elasticsearch/cloud.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: elasticsearch-cloud -title: Elasticsearch for Botkube Cloud -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Elasticsearch - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/els_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Elasticsearch` option. - - ![Select Platform](assets/els_platform_select.png "Select platform") - -4. Fill in all required data in the form - - ![Form](assets/els_form.png "Form") - -5. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/els_add_plugins.png "Plugins") - -6. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/els_create.png "Create") - - :::note - If you don't include other platforms which use `Executor` plugins we recommend `default aliases` and `default actions` options unchecked - ::: - -7. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/els_summary.png "Summary") - -## Clean up - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/els_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.9/installation/elasticsearch/index.md b/versioned_docs/version-1.9/installation/elasticsearch/index.md deleted file mode 100644 index cfd7af21..00000000 --- a/versioned_docs/version-1.9/installation/elasticsearch/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: elasticsearch -title: "Elasticsearch" -sidebar_position: 6 ---- - -You can use Botkube to populate your Elasticsearch with events. Learn how to configure Botkube to work with Elasticsearch: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.9/installation/elasticsearch/self-hosted.md b/versioned_docs/version-1.9/installation/elasticsearch/self-hosted.md deleted file mode 100644 index 948db0d5..00000000 --- a/versioned_docs/version-1.9/installation/elasticsearch/self-hosted.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -id: elasticsearch-self-hosted -title: "Elasticsearch for self-hosted Botkube" -slug: self-hosted -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Elasticsearch server - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ELASTICSEARCH_ADDRESS={elasticsearch_address} -export ELASTICSEARCH_USERNAME={elasticsearch_username} -export ELASTICSEARCH_PASSWORD={elasticsearch_password} -export ELASTICSEARCH_INDEX_NAME={elasticsearch_index_name} - -botkube install --version v1.9.1 \ ---set communications.default-group.elasticsearch.enabled=true \ ---set communications.default-group.elasticsearch.server=${ELASTICSEARCH_ADDRESS} \ ---set communications.default-group.elasticsearch.username=${ELASTICSEARCH_USERNAME} \ ---set communications.default-group.elasticsearch.password=${ELASTICSEARCH_PASSWORD} \ ---set communications.default-group.elasticsearch.indices.default.name=${ELASTICSEARCH_INDEX_NAME} \ ---set settings.clusterName=${CLUSTER_NAME} -``` - -where: - -- **ELASTICSEARCH_ADDRESS** is an address on which Elasticsearch server is reachable e.g https://example.com:9243, -- **ELASTICSEARCH_USERNAME** is the username for authentication to Els server, -- **ELASTICSEARCH_PASSWORD** is a password for the username to authenticate with Els server, -- **ELASTICSEARCH_INDEX_NAME** _(optional)_ is an index name on which Botkube events will be stored _(default: botkube)_. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.9/installation/index.mdx b/versioned_docs/version-1.9/installation/index.mdx deleted file mode 100644 index c61a72d1..00000000 --- a/versioned_docs/version-1.9/installation/index.mdx +++ /dev/null @@ -1,59 +0,0 @@ ---- -id: installation -title: Installation -sidebar_position: 1 -slug: / ---- - -import { IntegrationList } from "@site/src/components/IntegrationList"; - -Botkube has two components that need to be installed. - -1. Botkube App Integration in your Slack/Mattermost/Microsoft Teams/Discord -2. Botkube agent in your Kubernetes cluster - -## Feature map - -Learn about Botkube features and their availability in different integrations. - -### Bots - -Compare our bidirectional integrations: - -| Feature | Cloud Slack | Slack | Microsoft Teams | Discord | Mattermost | -| ---------------------------------------------------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | -| Source plugins support (e.g. `kubernetes`) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Executor plugins support (e.g. `kubectl`) | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Multi-cluster support | :heavy_check_mark: | :x: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Enhanced per-channel plugin configuration including RBAC policy. | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | -| Interactive messages | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | -| Actionable notifications | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: | :x: | -| Emoji reactions | :heavy_check_mark: | :x: | :x: | :x: | :x: | - -### Sinks - -Compare our unidirectional integrations: - -| Feature | Elasticsearch | Webhook | -| -------------------------------------------------------------- | ------------------ | ------------------ | -| Source plugins support (e.g. `kubernetes`, `prometheus`, etc.) | :heavy_check_mark: | :heavy_check_mark: | -| Multi-cluster support | :heavy_check_mark: | :heavy_check_mark: | - -## Integrations - - - -:::tip -You can use a single Botkube agent to serve all the interfaces - Slack, Mattermost, Microsoft Teams, Elasticsearch and Webhook.
-You just need to enable required mediums through the settings and add a necessary configuration.
-_see the [configuration](../configuration/index.mdx) section for more information_ -::: diff --git a/versioned_docs/version-1.9/installation/mattermost/assets/invite.png b/versioned_docs/version-1.9/installation/mattermost/assets/invite.png deleted file mode 100644 index af62c87a..00000000 Binary files a/versioned_docs/version-1.9/installation/mattermost/assets/invite.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/mattermost/assets/mattermost_instance_display_name.png b/versioned_docs/version-1.9/installation/mattermost/assets/mattermost_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.9/installation/mattermost/assets/mattermost_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/mattermost/assets/mm_add_plugins.png b/versioned_docs/version-1.9/installation/mattermost/assets/mm_add_plugins.png deleted file mode 100644 index 6a6ba82f..00000000 Binary files a/versioned_docs/version-1.9/installation/mattermost/assets/mm_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/mattermost/assets/mm_channels_form.png b/versioned_docs/version-1.9/installation/mattermost/assets/mm_channels_form.png deleted file mode 100644 index 9d1ac4a0..00000000 Binary files a/versioned_docs/version-1.9/installation/mattermost/assets/mm_channels_form.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/mattermost/assets/mm_create.png b/versioned_docs/version-1.9/installation/mattermost/assets/mm_create.png deleted file mode 100644 index b56ea252..00000000 Binary files a/versioned_docs/version-1.9/installation/mattermost/assets/mm_create.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/mattermost/assets/mm_form_bot_name.png b/versioned_docs/version-1.9/installation/mattermost/assets/mm_form_bot_name.png deleted file mode 100644 index c0f323bc..00000000 Binary files a/versioned_docs/version-1.9/installation/mattermost/assets/mm_form_bot_name.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/mattermost/assets/mm_instance_delete.png b/versioned_docs/version-1.9/installation/mattermost/assets/mm_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.9/installation/mattermost/assets/mm_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/mattermost/assets/mm_personal_token_form.png b/versioned_docs/version-1.9/installation/mattermost/assets/mm_personal_token_form.png deleted file mode 100644 index cf9cc05d..00000000 Binary files a/versioned_docs/version-1.9/installation/mattermost/assets/mm_personal_token_form.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/mattermost/assets/mm_platform_select.png b/versioned_docs/version-1.9/installation/mattermost/assets/mm_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.9/installation/mattermost/assets/mm_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/mattermost/assets/mm_summary.png b/versioned_docs/version-1.9/installation/mattermost/assets/mm_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.9/installation/mattermost/assets/mm_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/mattermost/cloud.md b/versioned_docs/version-1.9/installation/mattermost/cloud.md deleted file mode 100644 index 63d46bc8..00000000 --- a/versioned_docs/version-1.9/installation/mattermost/cloud.md +++ /dev/null @@ -1,86 +0,0 @@ ---- -id: mattermost-cloud -title: Mattermost for Botkube Cloud -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Mattermost - -Follow the steps below to install Botkube in your Mattermost instance. - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/mattermost_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Mattermost` option. - ![Mattermost Platform Select](assets/mm_platform_select.png "Select mattermost platform") - -4. Follow the [Mattermost instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/) for creating a bot account. When creating the bot account, use the following details: - - - Username — `Botkube` - - :::note - You can also use a custom username for your bot. Just remember that you'll need to provide this username during a later step of the Botkube installation. - ::: - - - Description — `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - - Icon — You can download the Botkube icon from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-black-192x192.png). - -5. Paste the bot name in the form - - ![Bot Name in the form](assets/mm_form_bot_name.png "Bot Name in the form") - -6. Past the token in the form - - ![Personal Token in the form](assets/mm_personal_token_form.png "Personal Token in the form") - -7. Add Botkube to a channel - - Make sure that the newly created bot account is added to your Mattermost team by following [these instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/#bot-account-creation). - - ![Invite Bot Account](./assets/invite.png) - - Add Botkube user created to the channel you want to receive notifications in. - - ![Channels in the form](assets/mm_channels_form.png "Channels in the form") - -8. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/mm_add_plugins.png "Plugins") - -9. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/mm_create.png "Create") - -10. Follow the instructions in the summary page to deploy Botkube into your environment. - -![Summary](assets/mm_summary.png "Summary") - -## Clean up - -### Remove Botkube from Mattermost Team - -- Deactivate or remove Botkube user from Mattermost Team. Login as System Admin, in the Menu proceed to System console -> Users -> botkube -> Deactivate. -- Archive Channel created for Botkube communication if required. - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/mm_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.9/installation/mattermost/index.md b/versioned_docs/version-1.9/installation/mattermost/index.md deleted file mode 100644 index cb1d242a..00000000 --- a/versioned_docs/version-1.9/installation/mattermost/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: mattermost -title: Mattermost -sidebar_position: 3 ---- - -You can use Mattermost Bot to connect Botkube to your Mattermost Server. Learn how to create and configure Mattermost Bot for Botkube installation for: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.9/installation/mattermost/self-hosted.md b/versioned_docs/version-1.9/installation/mattermost/self-hosted.md deleted file mode 100644 index 74755a77..00000000 --- a/versioned_docs/version-1.9/installation/mattermost/self-hosted.md +++ /dev/null @@ -1,138 +0,0 @@ ---- -id: mattermost-self-hosted -title: Mattermost for self-hosted Botkube -slug: self-hosted -sidebar_position: 1 ---- - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster - -## Install Botkube to the Mattermost - -Follow the steps below to install Botkube in your Mattermost instance. - -### Create the Botkube bot account - -1. Follow the [Mattermost instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/) for creating a bot account. When creating the bot account, use the following details: - - - Username — `Botkube` - - :::note - You can also use a custom username for your bot. Just remember that you'll need to provide this username during a later step of the Botkube installation. - ::: - - - Description — `Botkube helps you monitor your Kubernetes cluster, debug critical deployments and gives recommendations for standard practices by running checks on the Kubernetes resources.`. - - - Icon — You can download the Botkube icon from [this link](https://github.com/kubeshop/botkube/blob/main/branding/logos/botkube-black-192x192.png). - -2. Export the bot name as an environment variable: - - ```bash - export MATTERMOST_BOT_NAME="{bot_name}" - ``` - -3. Also, export the bot's token as an environment variable: - - ```bash - export MATTERMOST_TOKEN="{token}" - ``` - -### Add Botkube to a channel - -Make sure that the newly created bot account is added to your Mattermost team by following [these instructions](https://developers.mattermost.com/integrate/reference/bot-accounts/#bot-account-creation). - -![Invite Bot Account](./assets/invite.png) - -Next, invite the Botkube bot into the specific channel where you want to receive notifications. Export the channel name as an environment variable: - -```bash -export MATTERMOST_CHANNEL="{channel_name}" -``` - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export MATTERMOST_SERVER_URL={mattermost_server_url} -export MATTERMOST_TEAM={mattermost_team_name} -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} - -botkube install --version v1.9.1 \ ---set communications.default-group.mattermost.enabled=true \ ---set communications.default-group.mattermost.url=${MATTERMOST_SERVER_URL} \ ---set communications.default-group.mattermost.token=${MATTERMOST_TOKEN} \ ---set communications.default-group.mattermost.team=${MATTERMOST_TEAM} \ ---set communications.default-group.mattermost.channels.default.name=${MATTERMOST_CHANNEL} \ ---set communications.default-group.mattermost.botName=${MATTERMOST_BOT_NAME} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} -``` - -where: - -- **MATTERMOST_SERVER_URL** is the URL (including http/https schema) where Mattermost is running, -- **MATTERMOST_TOKEN** is the Token received by creating Personal Access Token for Botkube bot, -- **MATTERMOST_TEAM** is the Team name where Botkube is added, -- **MATTERMOST_CHANNEL** is the Channel name where Botkube is added and used for communication, -- **MATTERMOST_BOT_NAME** is the Mattermost bot username (usually it is `Botkube`), -- **CLUSTER_NAME** is the cluster name set in the incoming messages, -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -## Remove Botkube from Mattermost Team - -- Deactivate or remove Botkube bot from Mattermost Team. -- Archive Channel created for Botkube communication if required. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` - -## Troubleshooting - -### Botkube doesn't start - -**Symptoms** - -The Botkube Pod is restarting and the Botkube logs show the following error: - -```json -{ - "level": "fatal", - "msg": "while running application: while waiting for goroutines to finish gracefully: 1 error occurred:\n\t* while creating Mattermost bot: while getting team details: team \"Botkube\" not found", - "time": "2023-08-25T14:52:30+02:00" -} -``` - -**Solution** - -You need to ensure that the configuration used by Botkube is valid. - -1. Get and decode the communication Secret details: - ```bash - kubectl get secret botkube-communication-secret -n botkube --template='{{index .data "comm_config.yaml" | base64decode }}' - ``` -2. Verify the following: - - - Ensure that the value of `communications.default-group.mattermost.team` in the configuration matches the actual team name in your Mattermost UI. - - - Confirm that the bot specified in `communications.default-group.mattermost.botName` has been invited to the relevant team and all specified channels. - - - Check the validity of the token provided in `communications.default-group.mattermost.token`. If you're unsure, navigate to the Bot Accounts section in Mattermost and generate a new one. - -3. Additional Steps: - - If you continue to experience issues with Botkube restarts, you can perform further troubleshooting by following the instructions provided by Mattermost on [testing bot connections](https://developers.mattermost.com/integrate/reference/bot-accounts/#how-can-i-quickly-test-if-my-bot-account-is-working). diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_add_plugins.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_add_plugins.png deleted file mode 100644 index 6d0df836..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_add_to_slack.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_add_to_slack.png deleted file mode 100644 index 508b8d64..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_add_to_slack.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_all_clusters.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_all_clusters.png deleted file mode 100644 index f0629ad8..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_all_clusters.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_help.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_help.png deleted file mode 100644 index a141f676..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_help.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_list_instances.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_list_instances.png deleted file mode 100644 index ff0f1375..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_list_instances.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_set_default.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_set_default.png deleted file mode 100644 index cf489aed..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_command_set_default.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_create.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_create.png deleted file mode 100644 index deb72f65..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_create.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_credentials.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_credentials.png deleted file mode 100644 index a6c60dbc..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_credentials.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_grant.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_grant.png deleted file mode 100644 index 55858e31..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_grant.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_install.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_install.png deleted file mode 100644 index 954d6cfe..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_install.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_instance_delete.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_instance_list_manage.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_instance_list_manage.png deleted file mode 100644 index 3dd8d34e..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_instance_list_manage.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_new_instance.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_new_instance.png deleted file mode 100644 index 80cdd33f..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_new_instance.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_select_slack.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_select_slack.png deleted file mode 100644 index 544f59a2..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_select_slack.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_workspace_details.png b/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_workspace_details.png deleted file mode 100644 index a5feeb96..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/cloud_slack_workspace_details.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/slack_add_app.png b/versioned_docs/version-1.9/installation/slack/assets/slack_add_app.png deleted file mode 100644 index 378e0b9a..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/slack_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/slack_generate_app_token.png b/versioned_docs/version-1.9/installation/slack/assets/slack_generate_app_token.png deleted file mode 100644 index 0864aae1..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/slack_generate_app_token.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/slack_install_app.png b/versioned_docs/version-1.9/installation/slack/assets/slack_install_app.png deleted file mode 100644 index cee7293e..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/slack_install_app.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/slack_retrieve_app_token.png b/versioned_docs/version-1.9/installation/slack/assets/slack_retrieve_app_token.png deleted file mode 100644 index 5644a174..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/slack_retrieve_app_token.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/slack_retrieve_bot_token.png b/versioned_docs/version-1.9/installation/slack/assets/slack_retrieve_bot_token.png deleted file mode 100644 index e3954a91..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/slack_retrieve_bot_token.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/assets/slack_select_workspace.png b/versioned_docs/version-1.9/installation/slack/assets/slack_select_workspace.png deleted file mode 100644 index 897e5b31..00000000 Binary files a/versioned_docs/version-1.9/installation/slack/assets/slack_select_workspace.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/slack/cloud-slack.mdx b/versioned_docs/version-1.9/installation/slack/cloud-slack.mdx deleted file mode 100644 index 5cacdea9..00000000 --- a/versioned_docs/version-1.9/installation/slack/cloud-slack.mdx +++ /dev/null @@ -1,105 +0,0 @@ ---- -id: cloud-slack -title: Botkube Cloud App for Slack -sidebar_position: 1 ---- - -The Botkube Cloud App for Slack uses Botkube Cloud services to manage channels and route executor commands. This allows multi-cluster support without a need to create a dedicated Slack application for each cluster. Events and alerts are sent directly from your cluster to your Slack workspace for reliable, fast notifications. - -## Prerequisites - -- A Botkube Cloud account. - - You can try out the Botkube Cloud App for Slack for free by creating an account in the [Botkube Cloud app](https://app.botkube.io). - -## Create a Botkube Cloud Instance with Cloud Slack - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and click on `New Instance` button. - - ![New Instance](assets/cloud_slack_new_instance.png "Create new instance") - -2. Install Botkube Agent on your Kubernetes cluster by following the instructions on the page. - - ![Install Agent](assets/cloud_slack_install.png "Install Agent") - -3. Click `Add platform` dropdown, and select `Slack` option. - - ![Slack Platform Select](assets/cloud_slack_select_slack.png "Select slack platform") - -4. Click `Add to Slack` button to add Cloud Slack integration to your Slack workspace. - - ![Add to Slack](assets/cloud_slack_add_to_slack.png "Add to Slack") - -5. Click `Allow` to grant permission for Botkube app to access your Slack workspace. - - ![Cloud Slack Grant](assets/cloud_slack_grant.png "Cloud Slack grant") - -6. Provide the Slack app details as described follows and click `Next` button. - - - **Connected Slack Workspace:** Slack workspace that you granted permission in the previous step. - - **Display Name:** Display name of the Cloud Slack configuration. - - **Channels:** Slack channes where you can execute Botkube commands and receive notification. - - ![Cloud Slack Workspace](assets/cloud_slack_workspace_details.png "Cloud Slack workspace") - -7. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Cloud Slack Plugins](assets/cloud_slack_add_plugins.png "Cloud Slack plugins") - -8. Include optional default command aliases and actions and click `Apply Changes` button to update Botkube Cloud instance. - - ![Cloud Slack Create](assets/cloud_slack_create.png "Cloud Slack create") - -## Using Botkube Cloud App for Slack - -You can start using Botkube Cloud App for Slack by typing `@Botkube cloud help` in the Slack channel you configured in one of the previous steps. - -![Cloud Slack Command Help](assets/cloud_slack_command_help.png "Cloud Slack command help") - -### Listing Cloud Instances - -You can list all the Botkube Cloud instances by typing `@Botkube cloud list instances` in the Slack channel, or click the button `List connected instances` in the help command response. -Besides the instance `name`, `ID`, and `status` in the list response, you can also click the `Get details` button to go to instance details on Botkube Cloud Dashboard. - -![Cloud Slack List Instances](assets/cloud_slack_command_list_instances.png "Cloud Slack list instances") - -### Setting Default Instances - -Once a Botkube command is executed, it will be handled on target Kubernetes cluster specified with `--cluster-name` flag. This is an optional flag, -where if you have not specified it, Botkube Cloud will select the first instance. However, you can also achieve setting default instance with command `@Botkube cloud set default-instance {instance-id}`. - -![Cloud Slack Set Default Instances](assets/cloud_slack_command_set_default.png "Cloud Slack set default instance") - -After this point, all of your commands will be executed on the default instance. Moreover, if you want to execute a command on all the target clusters, you can use `--all-clusters` flag. - -![Cloud Slack All Clusters](assets/cloud_slack_command_all_clusters.png "Cloud Slack all clusters") - -### Setting Public Alias for Private Channels - -In order to maintain your confidentiality while using Botkube's plugins, you need to create a public alias for your private Slack channels. This alias will only be visible to Botkube Cloud administrators. - -#### During the Botkube Invitation to Private Channels - -When you invite Botkube to a private channel, a prompt will appear to guide you through the process of creating a public alias. - -#### For Existing Private Channels - -To update an existing alias for a private channel, or if Botkube is already integrated, simply use this command: - -``` -@Botkube cloud set channel-alias -``` - -## Cleanup - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - - ![Cloud Slack Instance Manage](assets/cloud_slack_instance_list_manage.png "Cloud Slack instances manage") - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Cloud Slack Instance Delete](assets/cloud_slack_instance_delete.png "Cloud Slack instances delete") diff --git a/versioned_docs/version-1.9/installation/slack/index.md b/versioned_docs/version-1.9/installation/slack/index.md deleted file mode 100644 index 6d5881e7..00000000 --- a/versioned_docs/version-1.9/installation/slack/index.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -id: slack -title: Slack -sidebar_position: 1 ---- - -## Botkube Slack App Versions - -In order to connect with Slack, Botkube requires a Slack application. There are two versions of the Botkube Slack App available: - -### Botkube Cloud App for Slack - -The Botkube Cloud App for Slack offers several advanced features: - -- One-click installation into your Slack workspace -- Multi-cluster executor support with a single Slack App -- Manage Slack channels directly from the Botkube web app and ensure the Botkube bot is invited to the correct channels - -The Botkube Cloud App for Slack uses Botkube's cloud services to manage channels and route executor commands. Events and alerts are sent directly from your cluster to your Slack workspace for reliable, fast notifications. - -You can directly try Botkube Cloud App for Slack for free by creating an account in the [Botkube Web App](https://app.botkube.io). Follow the [Cloud Slack app tutorial](cloud-slack.mdx) to learn more. - -### Botkube Socket Slack App - -The Socket-mode app works with the open-source Botkube Agent. The Botkube Socket-mode Slack App has the following caveats: - -- Must be installed manually into your Slack workspace using the provided configuration -- Slack channels must be managed manually, and you need to ensure the Botkube bot is invited to any channel you want to use with Botkube -- When using executor plugins (e.g. kubectl) in a multi-cluster environment, each cluster needs to have a dedicated Botkube Slack bot in order to route commands to the correct cluster. - -Follow the [instruction](socket-slack.md) for more details. diff --git a/versioned_docs/version-1.9/installation/slack/socket-slack.md b/versioned_docs/version-1.9/installation/slack/socket-slack.md deleted file mode 100644 index 8557efa1..00000000 --- a/versioned_docs/version-1.9/installation/slack/socket-slack.md +++ /dev/null @@ -1,232 +0,0 @@ ---- -id: socket-slack -title: Socket Slack App -sidebar_position: 2 ---- - -The Socket-mode app works with the open-source Botkube Agent and does not require an account or subscription. - -## Prerequisites - -- Botkube CLI installed according to the [Getting Started guide](../../cli/getting-started.mdx#installation) -- Access to Kubernetes cluster -- Slack Workspace admin access - -## Install Socket Slack App in Your Slack workspace - -Botkube uses interactive messaging to provide better experience. Interactive messaging needs a Slack App with Socket Mode enabled and currently this is not suitable for Slack App Directory listing. For this reason, you need to create a Slack App in your own Slack workspace and use it for Botkube deployment. - -:::warning -**Multi-cluster caveat:** The architecture of socket-based Slack apps has a limitation on the routing of executor commands. If you would like to use [Botkube executors](../../configuration/executor/index.md) (e.g. kubectl commands) and have multiple Kubernetes clusters, you need to create and install a Botkube Slack app for each cluster. This is required so that the Slack to Botkube connections go to the right place. We recommend you set the name of each app to reflect the cluster it will connect to in the next steps. - -To learn more about the Slack Socket API limitation, see the [comment](https://github.com/slackapi/bolt-js/issues/1263#issuecomment-1006372826) in the official Slack bot framework repository. - -The [Botkube Cloud App for Slack](./cloud-slack.mdx) does not have this limitation. -::: - -Follow the steps below to create and install Botkube Slack app to your Slack workspace. - -### Create Slack app - -1. Go to [Slack App console](https://api.slack.com/apps) to create an application. -1. Click **Create New App** and select **From an app manifest** in the popup to create application from manifest. - - ![Create App from Manifest](assets/slack_add_app.png "Slack add app") - -1. Select a workspace where you want to create application and click **Next**. - - ![Select Workspace](assets/slack_select_workspace.png "Slack select workspace") - -1. Select **YAML** tab, copy & paste one of the following manifests, and click **Next**, and then **Create**. - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -
- - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - channels:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - groups:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - - -```yaml -display_information: - name: Botkube - description: Botkube - background_color: "#a653a6" -features: - bot_user: - display_name: Botkube - always_online: false -oauth_config: - scopes: - bot: - - channels:read - - groups:read - - app_mentions:read - - reactions:write - - chat:write - - files:write - - users:read # Remote configuration only: Used to get Real Name for audit reporting -settings: - event_subscriptions: - bot_events: - - app_mention - interactivity: - is_enabled: true - org_deploy_enabled: false - socket_mode_enabled: true - token_rotation_enabled: false -``` - - - -
- -### Install Botkube to the Slack workspace - -Once the application is created, you will be redirected to application details page. Press the **Install your app** button, select the workspace and click **Allow to finish installation**. - -![Install Slack App](assets/slack_install_app.png "Slack install app") - -### Obtain Bot Token - -Follow the steps to obtain the Bot Token: - -1. Select **OAuth & Permissions** section on the left sidebar. On this page you can copy the bot token which starts with `xoxb...`. - - ![Retrieve Slack Bot Token](assets/slack_retrieve_bot_token.png "Slack Bot Token") - -1. Export Slack Bot Token as follows: - - ```shell - export SLACK_API_BOT_TOKEN="{botToken}" - ``` - -### Generate and obtain App-Level Token - -Slack App with Socket Mode requires an App-Level Token for the websocket connection. - -Follow the steps to generate an App-Level Token: - -1. Select **Basic Information** link from the left sidebar and scroll down to section **App-Level Token**. Click on the **Generate Token and Scopes** button. -1. Enter a **Name**, select `connections:write` scope, and click **Generate**. - - ![Generate App-Level Token](assets/slack_generate_app_token.png "Slack App Token") - - ![Retrieve App-Level Token](assets/slack_retrieve_app_token.png "Slack Retrieve App Token") - -1. Copy **App-Level Token** and export it as follows: - - ```shell - export SLACK_API_APP_TOKEN="${appToken}" - ``` - -### Add Botkube user to a Slack channel - -After installing Botkube app to your Slack workspace, you could see a new bot user with the name "Botkube" added in your workspace. Add that bot to a Slack channel you want to receive notification in. You can add it by inviting `@Botkube` in a channel. - -## Install Botkube in Kubernetes cluster - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export ALLOW_KUBECTL={allow_kubectl} -export SLACK_CHANNEL_NAME={channel_name} - -botkube install --version v1.9.1 \ ---set communications.default-group.socketSlack.enabled=true \ ---set communications.default-group.socketSlack.channels.default.name=${SLACK_CHANNEL_NAME} \ ---set communications.default-group.socketSlack.appToken=${SLACK_API_APP_TOKEN} \ ---set communications.default-group.socketSlack.botToken=${SLACK_API_BOT_TOKEN} \ ---set settings.clusterName=${CLUSTER_NAME} \ ---set 'executors.k8s-default-tools.botkube/kubectl.enabled'=${ALLOW_KUBECTL} -``` - -where: - -- **SLACK_CHANNEL_NAME** is the channel name where @Botkube is added -- **SLACK_API_BOT_TOKEN** is the Token you received after installing Botkube app to your Slack workspace -- **SLACK_API_APP_TOKEN** is the Token you received after installing Botkube app to your Slack workspace and generate in App-Level Token section -- **CLUSTER_NAME** is the cluster name set in the incoming messages -- **ALLOW_KUBECTL** set true to allow `kubectl` command execution by Botkube on the cluster. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -Send `@Botkube ping` in the channel to see if Botkube is running and responding. - -### Delete Botkube from Slack workspace - -- Go to the [Slack apps](https://api.slack.com/apps) page, -- Click on "Botkube", scroll to bottom, and click on "Delete App" button. - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.9/installation/socketslack.mdx b/versioned_docs/version-1.9/installation/socketslack.mdx deleted file mode 100644 index 314744a2..00000000 --- a/versioned_docs/version-1.9/installation/socketslack.mdx +++ /dev/null @@ -1,12 +0,0 @@ ---- -id: socketslack -title: "Slack" -sidebar_position: -1 -sidebar_class_name: hidden ---- - -Redirecting to the new location of Slack installation... If you are not redirected in a few seconds, please click [here](./slack/index.md). - -import { RelativeRedirect } from "@site/src/components/RelativeRedirect"; - - diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_add_app.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_add_app.png deleted file mode 100644 index de175417..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_add_plugins.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_add_plugins.png deleted file mode 100644 index 7217b81b..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_admin_center.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_admin_center.png deleted file mode 100644 index 46a149eb..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_admin_center.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_botkube_app_add.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_botkube_app_add.png deleted file mode 100644 index 4f8cbe63..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_botkube_app_add.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_command_all_clusters.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_command_all_clusters.png deleted file mode 100644 index bba0111b..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_command_all_clusters.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_command_help.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_command_help.png deleted file mode 100644 index ccb04a47..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_command_help.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_command_set_default.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_command_set_default.png deleted file mode 100644 index 1f89e9ec..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_command_set_default.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_config.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_config.png deleted file mode 100644 index 99aee80e..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_config.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_create.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_create.png deleted file mode 100644 index 246b25e2..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_create.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_download_app.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_download_app.png deleted file mode 100644 index ccb6608d..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_download_app.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_instance_list_manage.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_instance_list_manage.png deleted file mode 100644 index c7842590..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_instance_list_manage.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_list_instances.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_list_instances.png deleted file mode 100644 index 097ca812..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_list_instances.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_permissions_accept.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_permissions_accept.png deleted file mode 100644 index aa624edc..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_permissions_accept.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_permissions_select_account.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_permissions_select_account.png deleted file mode 100644 index 13a4bf33..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_permissions_select_account.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_permissions_success.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_permissions_success.png deleted file mode 100644 index e35fc720..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_permissions_success.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_select_platform.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_select_platform.png deleted file mode 100644 index 9659eccd..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_select_platform.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_select_team.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_select_team.png deleted file mode 100644 index dc020de3..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_select_team.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_team_connect.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_team_connect.png deleted file mode 100644 index 9473896a..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_team_connect.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_team_connect_success.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_team_connect_success.png deleted file mode 100644 index 53bb3ec3..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_team_connect_success.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_welcome_msg.png b/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_welcome_msg.png deleted file mode 100644 index 76dee224..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/cloud_teams_welcome_msg.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/teams_add_app.png b/versioned_docs/version-1.9/installation/teams/assets/teams_add_app.png deleted file mode 100644 index 43b22d05..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/teams_add_app.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/teams_add_app_info.png b/versioned_docs/version-1.9/installation/teams/assets/teams_add_app_info.png deleted file mode 100644 index 448ae69c..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/teams_add_app_info.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/teams_add_bot.png b/versioned_docs/version-1.9/installation/teams/assets/teams_add_bot.png deleted file mode 100644 index 3f386f4f..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/teams_add_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/teams_add_bot_endpoint.png b/versioned_docs/version-1.9/installation/teams/assets/teams_add_bot_endpoint.png deleted file mode 100644 index 3d4c9ede..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/teams_add_bot_endpoint.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/teams_add_bot_feature.png b/versioned_docs/version-1.9/installation/teams/assets/teams_add_bot_feature.png deleted file mode 100644 index a6594094..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/teams_add_bot_feature.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/teams_add_to_team.png b/versioned_docs/version-1.9/installation/teams/assets/teams_add_to_team.png deleted file mode 100644 index 94ff2cd2..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/teams_add_to_team.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/teams_ping.png b/versioned_docs/version-1.9/installation/teams/assets/teams_ping.png deleted file mode 100644 index d0cdfb2d..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/teams_ping.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/teams_publish_app.png b/versioned_docs/version-1.9/installation/teams/assets/teams_publish_app.png deleted file mode 100644 index f311389a..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/teams_publish_app.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/assets/teams_select_existing_bot.png b/versioned_docs/version-1.9/installation/teams/assets/teams_select_existing_bot.png deleted file mode 100644 index 383d5386..00000000 Binary files a/versioned_docs/version-1.9/installation/teams/assets/teams_select_existing_bot.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/teams/index.md b/versioned_docs/version-1.9/installation/teams/index.md deleted file mode 100644 index 598f0fce..00000000 --- a/versioned_docs/version-1.9/installation/teams/index.md +++ /dev/null @@ -1,183 +0,0 @@ ---- -id: teams -title: "Microsoft Teams" -sidebar_position: 5 ---- - -## Botkube app for Microsoft Teams - -The Botkube app for Microsoft Teams offers several advanced features: - -- Simplified installation into your Microsoft Teams workspace -- Multi-cluster executor support with a single Microsoft Teams app -- Manage Teams channels directly from the Botkube web app and ensure the Botkube bot is invited to the correct channels - -The Botkube app for Microsoft Teams uses Botkube's cloud services to manage channels and route source events and executor commands. Currently, it requires a manual side-loading of the app, but we are working on getting it listed in Microsoft AppSource. - -You can directly try Botkube app for Microsoft Teams for free by creating an account in the [Botkube Web App](https://app.botkube.io). Follow the steps below to install the app. - -## Prerequisites - -- A Botkube Cloud account. - - You can try out the Botkube app for Microsoft Teams for free by creating an account in the [Botkube Cloud app](https://app.botkube.io). - -## Create a Botkube Cloud Instance with Microsoft Teams - -### Connect Botkube Cloud to your Kubernetes cluster - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and click on `New Instance` button. - - ![New Instance](../assets/cloud_new_instance.png "Create new instance") - -1. Install Botkube Agent on your Kubernetes cluster by following the instructions on the page. - - ![Install Agent](../assets/cloud_install.png "Install Agent") - -1. Click `Add platform` dropdown, and select `Teams` option. - - ![Teams Platform Select](assets/cloud_teams_select_platform.png "Select Teams platform") - -Proceed with the next section. - -### Install Botkube app to your team - -1. Install Botkube app for Microsoft Teams from the official app catalog by clicking the `Install Botkube App for Teams` button. - - ![Install Botkube App for Microsoft Teams](assets/cloud_teams_download_app.png "Install Botkube App for Microsoft Teams") - - Alternatively, you can search for the "Botkube" app in the Microsoft Teams app catalog and click the **Add** button. - - ![Add Botkube App](assets/cloud_teams_add_app.png "Add Botkube App") - -1. Add the Botkube app to your team. - - 1. Click the **Add to a team** button. - - ![Add app to team](assets/cloud_teams_botkube_app_add.png "Add app to team") - - 1. Select the team and default channel, where you'll get the welcome message. - - ![Select a team](assets/cloud_teams_select_team.png "Select a team") - - 1. Click the **Set up a bot** button. - -Once the Botkube app is added to your team, you'll receive a welcome message. - -![Botkube Cloud Microsoft Teams Welcome Message](assets/cloud_teams_welcome_msg.png "Botkube Cloud Microsoft Teams welcome message") - -Proceed with the next section. - -### Grant permissions for Botkube app - -:::info -This step requires administrator permissions on your Microsoft Teams organization. Granting permissions is needed only once for the whole organization. -::: - -1. Click on the **Grant access** button. -1. Select your Microsoft account. - - ![Select account](assets/cloud_teams_permissions_select_account.png "Select account") - -1. Click the **Accept** button. - - ![Grant access](assets/cloud_teams_permissions_accept.png "Grant access") - -1. You will be redirected to the confirmation page. - - ![Confirmation page](assets/cloud_teams_permissions_success.png "Confirmation page") - -Close the page and proceed with the next section. - -### Connect your team to Botkube Cloud - -Go back to the Microsoft Teams app channel, where you received the welcome message. - -1. Click the **Connect to Botkube Cloud** button in the welcome message. -1. Log in to Botkube Cloud, if you haven't already. Ensure that you selected the correct organization, where you want to connect your team. -1. Click the **Connect** button. - - ![Connect to Botkube Cloud](assets/cloud_teams_team_connect.png "Connect to Botkube Cloud") - -1. You will see a confirmation page. - - ![Confirmation page](assets/cloud_teams_team_connect_success.png "Confirmation page") - -Close the page and proceed with the next section. - -### Finalize Botkube Cloud instance configuration - -Go back to the Botkube Cloud instance creation. - -1. In step 2, select your connected team and provide other details. - - - **Connected Microsoft Teams team:** Teams team that you connected in the previous section. - - **Display Name:** Display name of the Microsoft Teams team configuration. - - **Channels:** Teams channels where you can execute Botkube commands and receive notification. - - ![Botkube Cloud Instance Configuration](assets/cloud_teams_config.png "Botkube Cloud Instance Configuration") - -2. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Microsoft Teams Plugins](assets/cloud_teams_add_plugins.png "Microsoft Teams plugins") - -3. Include optional default command aliases and actions and click `Apply Changes` button to update Botkube Cloud instance. - - ![Microsoft Teams Create](assets/cloud_teams_create.png "Microsoft Teams create") - -## Using Botkube app for Microsoft Teams - -You can start using Botkube Cloud Microsoft Teams by typing `@Botkube cloud help` in one of the channels in the team you configured in one of the previous steps. - -![Botkube Cloud Microsoft Teams Command Help](assets/cloud_teams_command_help.png "Botkube Cloud Microsoft Teams command help") - -### Listing Cloud Instances - -You can list all your Botkube Cloud instances by typing `@Botkube cloud list` in the Microsoft Teams channel, or click the button `List connected instances` in the help command response. Besides the instance `name`, `ID`, and `status` in the list response, you can also click the `Get details` button to go to instance details on Botkube Cloud Dashboard. - -![Botkube Cloud Microsoft Teams List Instances](assets/cloud_teams_list_instances.png "Botkube Cloud Microsoft Teams list instances") - -### Setting Default Instance - -Once a Botkube command is executed, it will be handled on target Kubernetes cluster specified with `--cluster-name` flag. This is an optional flag, -where if you have not specified it, Botkube Cloud will select the first instance. However, you can also achieve setting default instance with command `@Botkube cloud set default-instance`. - -![Cloud Microsoft Teams Set Default Instances](assets/cloud_teams_command_set_default.png "Cloud Microsoft Teams set default instance") - -After this point, all of your commands will be executed on the default instance. Moreover, if you want to execute a command on all the target clusters, you can use `--all-clusters` flag. - -![Cloud Microsoft Teams All Clusters](assets/cloud_teams_command_all_clusters.png "Cloud Microsoft Teams all clusters") - -## Cleanup - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - - ![Cloud Teams Instance Manage](assets/cloud_teams_instance_list_manage.png "Cloud Microsoft Teams instances manage") - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Cloud Teams Instance Delete](../assets/cloud_instance_delete.png "Cloud Microsoft Teams instances delete") - -## Caveats - -### RBAC `ChannelName` mapping - -Same as other communication platforms, Botkube app for Microsoft Teams supports RBAC along with [all mappings](../../configuration/rbac.md#mapping-types). -However, because of the Microsoft Teams API limitation, for the default team channel the `ChannelName` is always `General`, regardless of the actual localized channel name. - -## Limitations - -Botkube app for Microsoft Teams currently doesn't support the following features yet: - -- Processing states from selected dropdowns, e.g., used for the `kubectl` command builder. In a result, the command builder is not available. -- Adding 👀 and ✅ reactions to messages indicating process status. - - This seems to be a limitation of the Microsoft Teams platform, however we'll investigate if there is a workaround. - -- Sending messages visible only to specific users. -- Replacing messages with new content, e.g., used for pagination. Currently, a new card is sent as a new message. -- User mentions in messages. Instead, Botkube app uses plaintext mentions with first and last name. diff --git a/versioned_docs/version-1.9/installation/webhook/assets/webhook_add_plugins.png b/versioned_docs/version-1.9/installation/webhook/assets/webhook_add_plugins.png deleted file mode 100644 index c4c4d54b..00000000 Binary files a/versioned_docs/version-1.9/installation/webhook/assets/webhook_add_plugins.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/webhook/assets/webhook_create.png b/versioned_docs/version-1.9/installation/webhook/assets/webhook_create.png deleted file mode 100644 index 1ec031e0..00000000 Binary files a/versioned_docs/version-1.9/installation/webhook/assets/webhook_create.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/webhook/assets/webhook_form.png b/versioned_docs/version-1.9/installation/webhook/assets/webhook_form.png deleted file mode 100644 index dd2d98cc..00000000 Binary files a/versioned_docs/version-1.9/installation/webhook/assets/webhook_form.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/webhook/assets/webhook_instance_delete.png b/versioned_docs/version-1.9/installation/webhook/assets/webhook_instance_delete.png deleted file mode 100644 index eb82e69b..00000000 Binary files a/versioned_docs/version-1.9/installation/webhook/assets/webhook_instance_delete.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/webhook/assets/webhook_instance_display_name.png b/versioned_docs/version-1.9/installation/webhook/assets/webhook_instance_display_name.png deleted file mode 100644 index 61e77aad..00000000 Binary files a/versioned_docs/version-1.9/installation/webhook/assets/webhook_instance_display_name.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/webhook/assets/webhook_platform_select.png b/versioned_docs/version-1.9/installation/webhook/assets/webhook_platform_select.png deleted file mode 100644 index b05c92b3..00000000 Binary files a/versioned_docs/version-1.9/installation/webhook/assets/webhook_platform_select.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/webhook/assets/webhook_summary.png b/versioned_docs/version-1.9/installation/webhook/assets/webhook_summary.png deleted file mode 100644 index 5bf666a9..00000000 Binary files a/versioned_docs/version-1.9/installation/webhook/assets/webhook_summary.png and /dev/null differ diff --git a/versioned_docs/version-1.9/installation/webhook/cloud.md b/versioned_docs/version-1.9/installation/webhook/cloud.md deleted file mode 100644 index 59926126..00000000 --- a/versioned_docs/version-1.9/installation/webhook/cloud.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: webhook-cloud -title: "Outgoing webhook for Botkube Cloud" -slug: cloud -sidebar_position: 2 ---- - -## Prerequisites - -- Botkube Cloud account which you can create [here](https://app.botkube.io) for free. - -## Create a Botkube Cloud Instance with Webhook - -1. Go to Botkube Cloud [Web App](https://app.botkube.io/) and create a new instance. - - You can do it by clicking "Create an Instance" button on Home Page or under this link [Create an Instance](https://app.botkube.io/instances/add) - -2. Fill in the `Instance Display Name` and click `Next` button. - - ![Instance Display Name](assets/webhook_instance_display_name.png "Instance display name") - -3. Click `Add platform` dropdown, and select `Webhook` option. - - ![Select Platform](assets/webhook_platform_select.png "Select platform") - -4. Fill in all required data in the form - - ![Form](assets/webhook_form.png "Form") - -5. Add plugins you want to enable in your Botkube instance and click `Next` button. - - ![Plugins](assets/webhook_add_plugins.png "Plugins") - -6. Include optional `default aliases` and `default actions` and click `Create` button to create Botkube Cloud instance. - - ![Create](assets/webhook_create.png "Create") - - :::note - If you don't include other platforms which use `Executor` plugins we recommend `default aliases` and `default actions` options unchecked - ::: - -7. Follow the instructions in the summary page to deploy Botkube into your environment. - - ![Summary](assets/webhook_summary.png "Summary") - -## Clean up - -### Remove Botkube from Kubernetes cluster - -1. Go to Botkube Cloud instances page and click `Manage` button of the instance you want to remove. - -2. Click `Delete instance` button, type instance name in the popup and click `Delete instance`. - - :::caution - Remember to execute the displayed command to completely remove Botkube and related resources from your cluster. - ::: - - ![Delete](assets/webhook_instance_delete.png "Delete") diff --git a/versioned_docs/version-1.9/installation/webhook/index.md b/versioned_docs/version-1.9/installation/webhook/index.md deleted file mode 100644 index be2a3aa3..00000000 --- a/versioned_docs/version-1.9/installation/webhook/index.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -id: webhook -title: "Outgoing webhook" -sidebar_position: 7 ---- - -You can use Botkube to trigger your Webhook and send events. Learn how to configure Botkube to work with Webhook: - -- [self-hosted Botkube installation](./self-hosted), -- [Botkube Cloud](./cloud). diff --git a/versioned_docs/version-1.9/installation/webhook/self-hosted.md b/versioned_docs/version-1.9/installation/webhook/self-hosted.md deleted file mode 100644 index b25c34c7..00000000 --- a/versioned_docs/version-1.9/installation/webhook/self-hosted.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -id: webhook-self-hosted -title: "Outgoing webhook for self-hosted Botkube" -slug: self-hosted -sidebar_position: 1 ---- - -## Install Botkube in Kubernetes cluster - -Botkube can be integrated with external apps via Webhooks. A webhook is essentially a POST request sent to a callback URL. So you can configure Botkube to send events on specified URL. - -To deploy Botkube agent in your cluster, run: - -```bash -export CLUSTER_NAME={cluster_name} -export WEBHOOK_URL={url} - -botkube install --version v1.9.1 \ ---set communications.default-group.webhook.enabled=true \ ---set communications.default-group.webhook.url=${WEBHOOK_URL} \ ---set settings.clusterName=${CLUSTER_NAME} -``` - -where: - -- **WEBHOOK_URL** is an outgoing webhook URL to which Botkube will POST the events, -- **CLUSTER_NAME** is the cluster name set in the incoming messages. - -Configuration syntax is explained [here](../../configuration). -All possible installation parameters are documented [here](../../configuration/helm-chart-parameters). - -## Remove Botkube from Kubernetes cluster - -Execute the following command to completely remove Botkube and related resources from your cluster: - -```bash -botkube uninstall -``` diff --git a/versioned_docs/version-1.9/operation/_category_.json b/versioned_docs/version-1.9/operation/_category_.json deleted file mode 100644 index 7ae2cbda..00000000 --- a/versioned_docs/version-1.9/operation/_category_.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "label": "Operations", - "position": 9 -} diff --git a/versioned_docs/version-1.9/operation/common-problems.md b/versioned_docs/version-1.9/operation/common-problems.md deleted file mode 100644 index f6837d04..00000000 --- a/versioned_docs/version-1.9/operation/common-problems.md +++ /dev/null @@ -1,123 +0,0 @@ -# Common problems - -This document describes how to identify and resolve common Botkube problems that might occur. - -## Incompatible plugin API version - -**Symptoms** - -- Botkube agent Pod is restarting -- In [Botkube agent logs](diagnostics.mdx#agent-logs), you see such entry: - - ```text - while running application: while waiting for goroutines to finish gracefully: 1 error occurred: - * while starting plugins manager: while creating executor plugins: Incompatible API version with plugin. Plugin version: 2, Client versions: [1] - ``` - -**Debugging steps** - -- [Check Botkube agent version](diagnostics.mdx#agent-version). - -- [Check plugin repository version](diagnostics.mdx#check-configured-plugin-repositories). - -**Solution** - -In order to fix the problem, you need to make sure that the agent version is the same as the plugin repository version. For example, for agent image `ghcr.io/kubeshop/botkube:v1.5.0` you need to configure official plugin repository in version `v1.5.0`: `https://github.com/kubeshop/botkube/releases/download/v1.5.0/plugins-index.yaml`. -To change the repository URL, run: - -```bash -helm upgrade botkube botkube/botkube -n botkube --reuse-values --set plugins.repositories.botkube.url="https://github.com/kubeshop/botkube/releases/download/v1.5.0/plugins-index.yaml" -``` - -## Helm chart loading error - -**Symptoms** - -- You encounter the following errors when running the `botkube install` command: - - ```text - Error: while loading Helm chart: Chart.yaml file is missing - ``` - - or - - ```text - Error: while loading Helm chart: file 'botkube' does not appear to be a gzipped archive; got 'application/octet-stream' - ``` - -**Solution** - -If you're experiencing these errors, it means that there is a conflict with a file or directory named `botkube` in the location where you executed the `botkube install` command. To resolve this issue, follow these steps: - -1. **rename or remove 'botkube':** You cannot have a file or directory named `botkube` in the same location where you are trying to install Botkube. You should either rename or remove the conflicting `botkube` file or directory. - -2. **Change Directory:** Alternatively, you can navigate to a different directory in your command line interface before executing the `botkube install` command. Ensure that the directory where you run the command does not contain any conflicting `botkube` files or directories. - -## Network connections - -Botkube can work in private clusters where inbound connections are limited. However, you need to allow outgoing connections to all configured plugin repositories and API endpoints, depending on the communication platform you intend to use. - -### Botkube official plugins - -The official Botkube plugin index and binaries are hosted on [GitHub releases](https://github.com/kubeshop/botkube/releases). For instance, for the version `v1.5.0` the following URLs are used: - -- Plugin index URL: https://github.com/kubeshop/botkube/releases/download/v1.9.1/plugins-index.yaml -- Kubectl plugin binary for `linux/amd64`: https://github.com/kubeshop/botkube/releases/download/v1.9.1/executor_kubectl_linux_amd64.tar.gz - -As a result, you need to allow outbound connections for Botkube to successfully download GitHub assets. - -Additionally, each plugin may define additional dependencies that the [plugin manager](../architecture/index.md#plugin-manager) downloads on startup. For example, the Helm plugin for `linux/amd64` requires `https://get.helm.sh/helm-v3.6.3-linux-amd64.tar.gz`. -To learn more about all URLs that need to be accessible, you can download a plugin index and check all plugin definitions that you want to enable. - -### Socket Slack - -For the Slack communication platform, we use the [Socket mode](https://api.slack.com/apis/connections/socket) approach. -In order to make this integration work, you need to allow all Slack API URLs defined under https://my.slack.com/help/urls, especially: - -- api.slack.com -- upload.slack.com -- universal-upload-edge.slack.com -- global-upload-edge.slack.com -- wss://wss-backup.slack.com -- wss://wss-mobile.slack.com -- wss://wss-primary.slack.com - -Visit [Slack official guide](https://slack.com/help/articles/360001603387-Manage-Slack-connection-issues#network-settings) for troubleshooting your Slack connection. - -### Cloud Slack - -Cloud Slack integration communicates via gRPC with the Botkube control-plane. In order to make this integration work, you need to allow access to `api.botkube.io`. - -## Plugin's permissions - -If you experience problems while configuring RBAC (Role-Based Access Control) for plugins, you can refer to the [troubleshooting](../configuration/rbac.md#troubleshooting) guide for assistance. - -## Botkube doesn't respond on MS Teams - -Cloud Teams integration communicates via gRPC with the Botkube control-plane. In order to make this integration work, you need to allow access to `api.botkube.io`. - -## I can't see my Slack private channels in Cloud Dashboard - -To comply with Slack's privacy policy, private channels won't be visible until you create a public alias for the respective channel. Refer to the provided instructions for guidance on completing this process: [Setting Public Alias for Private Channels](../installation/slack/cloud-slack#setting-public-alias-for-private-channels) - -## Air-Gap installation - -**Please note that we do not support air-gap installations.** However, here are some suggestions that you may find helpful: - -- Mirror Botkube images to your private registry: - - - [`ghcr.io/kubeshop/botkube:{botkube_version}`](https://github.com/kubeshop/botkube/pkgs/container/botkube), e.g., `ghcr.io/kubeshop/botkube:v1.5.0` - - [`ghcr.io/kubeshop/k8s-sidecar:in-cluster-config`](https://github.com/orgs/kubeshop/packages/container/package/k8s-sidecar) - -- During startup, Botkube downloads repository indexes and all enabled plugins. All of them are stored under the `/tmp` folder. To ensure that the [plugin manager](../architecture/index.md#plugin-manager) does not make external calls, all required plugins must be present. You can achieve this by mounting a Persistent Volume Claim (PVC) at this path. By default, we use [`emptyDir`](https://github.com/kubeshop/botkube/blob/9d0627794078d519987309271b64c94047cd65d9/helm/botkube/templates/deployment.yaml#L176-L177). Later, you can mount your Persistent Volume (PV) with cached plugins in your air-gapped environment. - -- Select a communication platform that can be installed in the air-gapped environment, such as [Mattermost](../installation/mattermost/index.md). - -## Others - -Having trouble finding a solution to your problem? No problem at all! We will help you to get your Botkube up and running. First, follow these steps: - -1. [Export the Botkube agent configuration](diagnostics.mdx#agent-configuration) -2. [Export the Botkube agent logs](diagnostics.mdx#agent-logs) - -After that, come join our Slack community workspace at https://join.botkube.io. Head over to the [`#helping-hands`](https://slack.com/app_redirect?team=TG7TTBLJ0&channel=helping-hands) channel and share the assets you exported along with a description of your issue. Our team is ready to assist you! diff --git a/versioned_docs/version-1.9/operation/diagnostics.mdx b/versioned_docs/version-1.9/operation/diagnostics.mdx deleted file mode 100644 index 33810004..00000000 --- a/versioned_docs/version-1.9/operation/diagnostics.mdx +++ /dev/null @@ -1,157 +0,0 @@ -# Basic diagnostics - -Here you can find the list of basic diagnostic actions that may help you look for bug causes. - -In order to run the suggested commands, make sure that you have installed: - -- [`helm`](https://helm.sh/docs/intro/install/) -- [`kubectl`](https://kubernetes.io/docs/tasks/tools/) - -## Agent - -This section describes [Botkube agent](../architecture/index.md) related diagnostic. - -### Agent version - -The easiest way to check the Agent version is to get the Docker image: - -```bash -kubectl get deploy botkube -n botkube -o=jsonpath="{'Used images\n'}{range .spec.template.spec.containers[*]}{.name}{':\t'}{.image}{'\n'}{end}" -``` - -You should get an output similar to this: - -```bash -Used images -botkube: ghcr.io/kubeshop/botkube:v1.5.0 -cfg-watcher: ghcr.io/kubeshop/k8s-sidecar:in-cluster-config -``` - -The `botkube` is the agent image. The container image tag (`v1.5.0`) is the version in which it was deployed on the cluster. - -### Agent health - -To check if the Agent Pods are in the `Running` state, run: - -```bash -kubectl get pod -n botkube -l app=botkube -``` - -All the containers from Pods should be in the `Running` status. Restarts' number higher than one may also indicate problems, e.g. not enough resource, lack of permissions, network timeouts, etc. - -### Agent logs - -If the Botkube Agent is [healthy](#agent-health), you should be able to track any bug by checking the logs. To check the logs, run: - -```bash -kubectl logs -n botkube -l app=botkube -c botkube -``` - -To get all logs specify `--tail=-1`, otherwise only 10 last lines are displayed. - -To check the logs since a given time, use the `--since-time` or `--since` flag, for example: - -```bash ---since-time=2020-03-30T10:02:08Z -``` - -```bash ---since=3h -``` - -### Agent configuration - -Select a tab to use a tool of your choice for getting Botkube configuration: - - - - -:::note -The `botkube config get` command is available from the `v1.4.0` version. -::: - -Install [Botkube CLI](../cli/getting-started.mdx#installation) and run: - -```bash -botkube config get > /tmp/bk-config.yaml -``` - - - - - -1. Download export-config-job-tpl definition into `/tmp/export-config-job-tpl`. -2. Make sure that the previous job is deleted: - ```bash - kubectl delete job botkube-migration -n botkube - ``` -3. Run a new export config Job based on the configuration from installed Botkube deployment: - ```bash - kubectl get deploy botkube -n botkube -o=go-template-file=/tmp/export-config-job-tpl | kubectl create -f - - ``` -4. Get configuration data: - ```bash - kubectl get cm botkube-config-exporter -ojsonpath='{ .data.config\.yaml }' - ``` - - - - - -### Agent restart - -When Pods are unhealthy, or if the operation processing is stuck, you can restart the Pod using this command: - -``` -kubectl delete po -n botkube -l app=botkube -``` - -### Agent debug logging - -In order to change the logging level to `debug`, run: - -```bash -helm upgrade botkube botkube/botkube -n botkube --set settings.log.level="debug" --reuse-values -``` - -If the Botkube agent Pod isn't restarted automatically, [restart it manually](#agent-restart). - -### Check configured plugin repositories - -Select a tab to use a tool of your choice for checking plugin repository configuration: - -import Tabs from "@theme/Tabs"; -import TabItem from "@theme/TabItem"; - - - - -Install [`yq`](https://github.com/mikefarah/yq) and run: - -```bash -helm get values botkube --all -oyaml | yq '.plugins' -``` - - - - - -Install [`jq`](https://stedolan.github.io/jq/download/) and run: - -```bash -helm get values botkube --all -ojson | jq '{ plugins }' -``` - - - - - -```bash -helm get values botkube --all -oyaml | grep -A 10 'plugins:' -``` - -The output may contain more occurrence of a plugin section, so you need to fine the one that has the `repositories` defined. - - - - diff --git a/versioned_docs/version-1.9/plugin/assets/btns-desc.png b/versioned_docs/version-1.9/plugin/assets/btns-desc.png deleted file mode 100644 index 214135f4..00000000 Binary files a/versioned_docs/version-1.9/plugin/assets/btns-desc.png and /dev/null differ diff --git a/versioned_docs/version-1.9/plugin/assets/btns-inline.png b/versioned_docs/version-1.9/plugin/assets/btns-inline.png deleted file mode 100644 index caf54e14..00000000 Binary files a/versioned_docs/version-1.9/plugin/assets/btns-inline.png and /dev/null differ diff --git a/versioned_docs/version-1.9/plugin/assets/demo-msg.gif b/versioned_docs/version-1.9/plugin/assets/demo-msg.gif deleted file mode 100644 index c6aeaf31..00000000 Binary files a/versioned_docs/version-1.9/plugin/assets/demo-msg.gif and /dev/null differ diff --git a/versioned_docs/version-1.9/plugin/assets/echo-demo.gif b/versioned_docs/version-1.9/plugin/assets/echo-demo.gif deleted file mode 100644 index d8accb06..00000000 Binary files a/versioned_docs/version-1.9/plugin/assets/echo-demo.gif and /dev/null differ diff --git a/versioned_docs/version-1.9/plugin/assets/ticker-demo.gif b/versioned_docs/version-1.9/plugin/assets/ticker-demo.gif deleted file mode 100644 index c4ba4b84..00000000 Binary files a/versioned_docs/version-1.9/plugin/assets/ticker-demo.gif and /dev/null differ diff --git a/versioned_docs/version-1.9/plugin/assets/use-tpl.png b/versioned_docs/version-1.9/plugin/assets/use-tpl.png deleted file mode 100644 index 7d64b5fa..00000000 Binary files a/versioned_docs/version-1.9/plugin/assets/use-tpl.png and /dev/null differ diff --git a/versioned_docs/version-1.9/plugin/custom-executor.md b/versioned_docs/version-1.9/plugin/custom-executor.md deleted file mode 100644 index 095e01d2..00000000 --- a/versioned_docs/version-1.9/plugin/custom-executor.md +++ /dev/null @@ -1,260 +0,0 @@ ---- -id: custom-executor -title: "Custom executor" -sidebar_position: 2 ---- - -You can extend Botkube functionality by writing custom executor plugin. An executor allows you to run a given command, such as `kubectl`, directly in the chat window of each communication platform For example. - -Plugin executor is a binary that implements the [executor](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) Protocol Buffers contract. - -## Goal - -This tutorial shows you how to build a custom `echo` executor that responds with a command that was specified by the user in a chat window. - -![echo-demo](./assets/echo-demo.gif) - -For a final implementation, see the [Botkube template repository](./quick-start.md). - -## Prerequisites - -- Basic understanding of the Go language. -- [Go](https://golang.org/doc/install) at least 1.18. - - See [go.mod](https://github.com/kubeshop/botkube/blob/main/go.mod#L1) for the recommended version used by Botkube team. -- [GoReleaser](https://goreleaser.com/) at least 1.13. - -### Develop plugin business logic - -1. Create an executor plugin directory: - - ```bash - mkdir botkube-plugins && cd botkube-plugins - ``` - -2. Initialize the Go module: - - ```bash - go mod init botkube-plugins - ``` - -3. Create the `main.go` file for the `echo` executor with the following template: - - ```go - cat << EOF > main.go - package main - - import ( - "context" - "fmt" - - "github.com/MakeNowJust/heredoc" - "github.com/hashicorp/go-plugin" - "github.com/kubeshop/botkube/pkg/api" - "github.com/kubeshop/botkube/pkg/api/executor" - ) - - // EchoExecutor implements the Botkube executor plugin interface. - type EchoExecutor struct{} - - func main() { - executor.Serve(map[string]plugin.Plugin{ - "echo": &executor.Plugin{ - Executor: &EchoExecutor{}, - }, - }) - } - EOF - ``` - - This template code imports required packages and registers `EchoExecutor` as the gRPC plugin. At this stage, the `EchoExecutor` service doesn't implement the required [Protocol Buffers](https://github.com/kubeshop/botkube/blob/main/proto/executor.proto) contract. We will add the required methods in the next steps. - -4. Download imported dependencies: - - ```bash - go mod tidy - ``` - -5. Add the required `Metadata` method: - - ```go - // Metadata returns details about the Echo plugin. - func (*EchoExecutor) Metadata(context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - Version: "1.0.0", - Description: "Echo sends back the command that was specified.", - JSONSchema: api.JSONSchema{ - Value: heredoc.Doc(`{ - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "echo", - "description": "Example echo plugin", - "type": "object", - "properties": { - "formatOptions": { - "description": "Options to format echoed string", - "type": "array", - "items": { - "type": "string", - "enum": [ "bold", "italic" ] - } - } - }, - "additionalProperties": false - }`), - }, - }, nil - } - ``` - - The `Metadata` method returns basic information about your plugin. This data is used when the plugin index is generated in an automated way. You will learn more about that in the next steps. - - Ąs a part of the `Metadata` method, you can define the plugin dependencies. To learn more about them, see the [Dependencies](./dependencies.md) document. - -6. Add the required `Execute` method: - - ```go - // Execute returns a given command as a response. - func (*EchoExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - return executor.ExecuteOutput{ - Message: api.NewCodeBlockMessage(response, true), - }, nil - } - ``` - - The `Execute` method is the heart of your executor plugin. This method runs your business logic and returns the execution output. Next, the Botkube core sends back the response to a given communication platform. - If the communication platform supports interactivity, you can construct and return interactive messages containing buttons, dropdowns, input text, and more complex formatting. To learn more about it, see the [Interactive Messages](./interactivity.md) guide. - - For each `Execute` method call, Botkube attaches the list of associated configurations. You will learn more about that in the [**Passing configuration to your plugin**](#passing-configuration-to-your-plugin) section. - -7. Add the required `Help` method: - - ```go - // Help returns help message - func (EchoExecutor) Help(context.Context) (api.Message, error) { - btnBuilder := api.NewMessageButtonBuilder() - return api.Message{ - Sections: []api.Section{ - { - Base: api.Base{ - Header: "Run `echo` commands", - Description: description, - }, - Buttons: []api.Button{ - btnBuilder.ForCommandWithDescCmd("Run", "echo 'hello world'"), - }, - }, - }, - }, nil - } - ``` - - You can use `api.NewCodeBlockMessage` or `api.NewPlaintextMessage` helper functions, or construct your own message. - -## Build plugin binaries - -Now 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 your needs. - -:::note -Instead of GoReleaser, you can use another tool of your choice. -::: - -1. Create the GoReleaser configuration file: - - ```yaml - cat << EOF > .goreleaser.yaml - project_name: botkube-plugins - before: - hooks: - - go mod download - - builds: - - id: echo - binary: executor_echo_{{ .Os }}_{{ .Arch }} - - no_unique_dist_dir: true - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - goarch: - - amd64 - - arm64 - goarm: - - 7 - - snapshot: - name_template: 'v{{ .Version }}' - EOF - ``` - -2. Build the binaries: - - ```bash - goreleaser build --rm-dist --snapshot - ``` - -Congrats! You just created your first Botkube executor plugin! :tada: - -Now it's time to [test it locally with Botkube](local-testing.md). Once you're done testing, see how to [distribute it](repository.md). - -## Passing configuration to your plugin - -Sometimes your executor plugin requires a configuration specified by the end-user. Botkube supports such requirement and provides an option to specify plugin configuration under `config`. An example Botkube configuration looks like this: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - name: "all-teams" - bindings: - executors: - - echo-team-a - - echo-team-b - -executors: - "echo-team-a": # executor configuration group name - botkube/echo: - enabled: true - config: - formatOptions: ["italic"] - "echo-team-b": # executor configuration group name - botkube/echo: - enabled: true - config: - formatOptions: ["bold"] -``` - -This means that two different `botkube/echo` plugin configurations were bound to the `all-teams` Slack channel. Under `executor.ExecuteInput{}.Configs`, you will find the list of configurations in the YAML format as specified under the `config` property for each bound and enabled executor. The order of the configuration is the same as specified under the `bindings.executors` property. It's up to the plugin author to merge the passed configurations. You can use our helper function from the plugin extension package (`pluginx`). - -```go -import ( - "context" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -// Config holds the executor configuration. -type Config struct { - FormatOptions []string `yaml:"options,omitempty"` -} - -func (EchoExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - var cfg Config - err := pluginx.MergeExecutorConfigs(in.Configs, &cfg) - if err != nil { - return executor.ExecuteOutput{}, err - } - // rest logic -} -``` - -:::caution -Botkube starts only one process of a given executor plugin, and the list of configuration YAMLs can be different per gRPC call, so you shouldn't cache the merged configuration. -::: - -## Notes - -- Streaming command response is not supported. As a result, commands like `helm install --wait` doesn't work well, as the response won't be sent until the command finishes. It's recommended to return the response as soon as possible. -- The interactive message is not yet supported. diff --git a/versioned_docs/version-1.9/plugin/custom-source.md b/versioned_docs/version-1.9/plugin/custom-source.md deleted file mode 100644 index 5caf9378..00000000 --- a/versioned_docs/version-1.9/plugin/custom-source.md +++ /dev/null @@ -1,273 +0,0 @@ ---- -id: custom-source -title: "Custom source" -sidebar_position: 3 ---- - -You can extend Botkube functionality by writing custom source plugin. A source allows you to get asynchronous streaming of domain-specific events. For example, streaming Kubernetes or Prometheus events . - -Source is a binary that implements the [source](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) Protocol Buffers contract. - -## Goal - -This tutorial shows you how to build a custom `ticker` source that emits an event at a specified interval. - -![ticker-demo](./assets/ticker-demo.gif) - -For a final implementation, see the [Botkube template repository](./quick-start.md). - -## Prerequisites - -- Basic understanding of the Go language. -- [Go](https://golang.org/doc/install) at least 1.18. - - See [go.mod](https://github.com/kubeshop/botkube/blob/main/go.mod#L1) for the recommended version used by Botkube team. -- [GoReleaser](https://goreleaser.com/) at least 1.13. - -### Develop plugin business logic - -1. Create a source plugin directory: - - ```bash - mkdir botkube-plugins && cd botkube-plugins - ``` - -2. Initialize the Go module: - - ```bash - go mod init botkube-plugins - ``` - -3. Create the `main.go` file for the `ticker` source with the following template: - - ```go - cat << EOF > main.go - package main - - import ( - "context" - "fmt" - "time" - - "github.com/hashicorp/go-plugin" - "github.com/kubeshop/botkube/pkg/api" - "github.com/kubeshop/botkube/pkg/api/source" - "gopkg.in/yaml.v3" - ) - - // Config holds source configuration. - type Config struct { - Interval time.Duration - } - - // Ticker implements the Botkube source plugin interface. - type Ticker struct{} - - func main() { - source.Serve(map[string]plugin.Plugin{ - "ticker": &source.Plugin{ - Source: &Ticker{}, - }, - }) - } - EOF - ``` - - This template code imports required packages and registers `Ticker` as the gRPC plugin. At this stage, the `Ticker` service doesn't implement the required [Protocol Buffers](https://github.com/kubeshop/botkube/blob/main/proto/source.proto) contract. We will add the required methods in the next steps. - -4. Download imported dependencies: - - ```bash - go mod tidy - ``` - -5. Add the required `Metadata` method: - - ```go - // Metadata returns details about the Ticker plugin. - func (Ticker) Metadata(_ context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - Version: "0.1.0", - Description: "Emits an event at a specified interval.", - }, nil - } - ``` - - The `Metadata` method returns basic information about your plugin. This data is used when the plugin index is generated in an automated way. You will learn more about that in the next steps. - - Ąs a part of the `Metadata` method, you can define the plugin dependencies. To learn more about them, see the [Dependencies](./dependencies.md) document. - -6. Add the required `Stream` method: - - ```go - // Stream sends an event after configured time duration. - func (Ticker) Stream(ctx context.Context, in source.StreamInput) (source.StreamOutput, error) { - cfg, err := mergeConfigs(in.Configs) - if err != nil { - return source.StreamOutput{}, err - } - - ticker := time.NewTicker(cfg.Interval) - out := source.StreamOutput{ - Event: make(chan source.Event), - } - - go func() { - for { - select { - case <-ctx.Done(): - ticker.Stop() - case <-ticker.C: - out.Event <- source.Event{ - Message: api.NewPlaintextMessage("Ticker Event", true), - } - } - } - }() - - return out, nil - } - - // mergeConfigs merges all input configuration. In our case we don't have complex merge strategy, - // the last one that was specified wins :) - func mergeConfigs(configs []*source.Config) (Config, error) { - // default config - finalCfg := Config{ - Interval: time.Minute, - } - - for _, inputCfg := range configs { - var cfg Config - err := yaml.Unmarshal(inputCfg.RawYAML, &cfg) - if err != nil { - return Config{}, fmt.Errorf("while unmarshalling YAML config: %w", err) - } - - if cfg.Interval != 0 { - finalCfg.Interval = cfg.Interval - } - } - - return finalCfg, nil - } - ``` - - The `Stream` method is the heart of your source plugin. This method runs your business logic and push events into the `out.Output` channel. Next, the Botkube core sends the event to a given communication platform. - - The `Stream` method is called only once. Botkube attaches the list of associated configurations. You will learn more about that in the [**Passing configuration to your plugin**](#passing-configuration-to-your-plugin) section. - -7. Implement `HandleExternalRequest` method: - - Plugins can handle external requests from Botkube incoming webhook. Any external system can call the webhook and trigger a given source plugin. By default, the path of the incoming webhook is `http://botkube.botkube.svc.cluster.local:2115/sources/v1/{sourceName}` and it supports POST requests in JSON payload format. - - - If you don't want to handle external events from incoming webhook, simply nest the `source.HandleExternalRequestUnimplemented` under your struct: - - ```go - // Ticker implements the Botkube executor plugin interface. - type Ticker struct { - // specify that the source doesn't handle external requests - source.HandleExternalRequestUnimplemented - } - ``` - - - To handle such requests, you need to implement the `HandleExternalRequest` method. In this case, the `message` property from payload is outputted to the bound communication platforms: - - ```go - // HandleExternalRequest handles incoming payload and returns an event based on it. - func (Forwarder) HandleExternalRequest(_ context.Context, in source.ExternalRequestInput) (source.ExternalRequestOutput, error) { - var p payload - err := json.Unmarshal(in.Payload, &p) - if err != nil { - return source.ExternalRequestOutput{}, fmt.Errorf("while unmarshaling payload: %w", err) - } - - if p.Message == "" { - return source.ExternalRequestOutput{}, fmt.Errorf("message cannot be empty") - } - - msg := fmt.Sprintf("*Incoming webhook event:* %s", p.Message) - return source.ExternalRequestOutput{ - Event: source.Event{ - Message: api.NewPlaintextMessage(msg, true), - }, - }, nil - } - ``` - -## Build plugin binaries - -Now it's time to build your plugin. For that purpose we will use GoReleaser. It simplifies building Go binaries for different architectures. - -:::note -Instead of GoReleaser, you can use another tool of your choice. The important thing is to produce the binaries for the architecture of the host platform where Botkube is running. -::: - -1. Create the GoReleaser configuration file: - - ```yaml - cat << EOF > .goreleaser.yaml - project_name: botkube-plugins - before: - hooks: - - go mod download - - builds: - - id: ticker - binary: source_ticker_{{ .Os }}_{{ .Arch }} - - no_unique_dist_dir: true - env: - - CGO_ENABLED=0 - goos: - - linux - - darwin - goarch: - - amd64 - - arm64 - goarm: - - 7 - - snapshot: - name_template: 'v{{ .Version }}' - EOF - ``` - -2. Build the binaries: - - ```bash - goreleaser build --rm-dist --snapshot - ``` - -Congrats! You just created your first Botkube source plugin! :tada: - -Now it's time to [test it locally with Botkube](local-testing.md). Once you're done testing, see how to [distribute it](repository.md). - -## Passing configuration to your plugin - -Sometimes your source plugin requires a configuration specified by the end-user. Botkube supports such requirement and provides an option to specify plugin configuration under `config`. An example Botkube configuration looks like this: - -```yaml -communications: - "default-group": - socketSlack: - channels: - "default": - name: "all-teams" - bindings: - sources: - - ticker-team-a - - ticker-team-b - -sources: - "ticker-team-a": - botkube/ticker: - enabled: true - config: - interval: 1s - "ticker-team-b": - botkube/ticker: - enabled: true - config: - interval: 2m -``` - -This means that two different `botkube/ticker` plugin configurations were bound to the `all-teams` Slack channel. For each bound configuration [Botkube source dispatcher](../architecture/index.md#plugin-source-bridge) calls `Stream` method with the configuration specified under the `bindings.sources` property. diff --git a/versioned_docs/version-1.9/plugin/debug.md b/versioned_docs/version-1.9/plugin/debug.md deleted file mode 100644 index 7dba3a98..00000000 --- a/versioned_docs/version-1.9/plugin/debug.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: debugging -title: "Debugging" -sidebar_position: 10 ---- - -Embedded logging allows you to access more information about the runtime operations of Botkube plugins. - -By default: - -- the gRPC client log level is set to `info`, -- the standard error ([`stderr`]()) of a plugin binary is logged at `error` level, -- the standard output ([`stdout`]()) of a plugin binary is ignored. - -To change the default log level, export a dedicated environment variable following this pattern `LOG_LEVEL_{pluginType}_{pluginRepo}_{pluginName}`, e.g., `LOG_LEVEL_EXECUTOR_BOTKUBE_KUBECTL`. The possible log level values are: - -- `trace` -- `debug` -- `info` -- `warning` -- `error` -- `fatal` -- `panic` - -The plugin standard output is logged only if `debug` level is set. - -:::info -The plugin name is normalized and all characters different from letters, digits, and the underscore (`_`) are replaced with underscore (`_`). -::: - -To change the log level for a given plugin directly in the Botkube deployment, specify `extraEnv` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. For example: - -```yaml -extraEnv: - - name: LOG_LEVEL_EXECUTOR_BOTKUBE_KUBECTL - value: "debug" -``` diff --git a/versioned_docs/version-1.9/plugin/dependencies.md b/versioned_docs/version-1.9/plugin/dependencies.md deleted file mode 100644 index 01e55d02..00000000 --- a/versioned_docs/version-1.9/plugin/dependencies.md +++ /dev/null @@ -1,103 +0,0 @@ ---- -id: dependencies -title: "Dependencies" -sidebar_position: 6 ---- - -Plugins can depend on other binaries, which are then downloaded by Botkube along with a given plugin. This is supported for both executor and source plugins. - -## Define dependencies for plugin index generation - -As a part of the `Metadata` method, define the `Dependencies` property. The key is the name of the dependency, and the value is a structure with links to binaries for each platform. - -:::info -For downloading plugins and theirs dependencies, Botkube uses `go-getter` library. It supports multiple URL formats (such as HTTP, Git repositories or S3), and is able to unpack archives and extract binaries from them. For more details, see the documentation on the [`go-getter`](https://github.com/hashicorp/go-getter) GitHub repository. -::: - -```go -const ( - kubectlVersion = "v1.28.1" -) - -// Metadata returns details about kubectl plugin. -func (e *Executor) Metadata(context.Context) (api.MetadataOutput, error) { - return api.MetadataOutput{ - // ... - Dependencies: map[string]api.Dependency{ - "kubectl": { - URLs: map[string]string{ - "windows/amd64": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/windows/amd64/kubectl.exe", kubectlVersion), - "darwin/amd64": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/darwin/amd64/kubectl", kubectlVersion), - "darwin/arm64": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/darwin/arm64/kubectl", kubectlVersion), - "linux/amd64": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/amd64/kubectl", kubectlVersion), - "linux/s390x": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/s390x/kubectl", kubectlVersion), - "linux/ppc64le": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/ppc64le/kubectl", kubectlVersion), - "linux/arm64": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/arm64/kubectl", kubectlVersion), - "linux/386": fmt.Sprintf("https://dl.k8s.io/release/%s/bin/linux/386/kubectl", kubectlVersion), - } - }, - }, - }, nil -} -``` - -Such a definition will result in the following `dependencies` section in the plugin index: - -```yaml -entries: - - name: kubectl - # ... - urls: - - url: "..." # URL for darwin/amd64 binary - # ... - platform: - os: darwin - architecture: amd64 - dependencies: - kubectl: - url: https://dl.k8s.io/release/v1.28.1/bin/darwin/amd64/kubectl - - url: "..." # URL for darwin/arm64 binary - # ... - dependencies: - kubectl: - url: https://dl.k8s.io/release/v1.28.1/bin/darwin/arm64/kubectl - - url: "..." # URL for linux/amd64 binary - # ... - platform: - os: linux - architecture: amd64 - dependencies: - kubectl: - url: https://dl.k8s.io/release/v1.28.1/bin/linux/amd64/kubectl - - url: "..." # URL for linux/arm64 binary - # ... - platform: - os: linux - architecture: arm64 - dependencies: - kubectl: - url: https://dl.k8s.io/release/v1.28.1/bin/linux/arm64/kubectl -``` - -Read how to use the plugin index in the [Repository](./repository.md) document. - -## Using dependencies - -During Botkube startup, Botkube plugin manager fetches the plugin binaries along with all dependencies. Each dependency binary is named exactly as specified in the [plugin index](#define-dependencies-for-plugin-index-generation). The dependency is fetched to a directory specified in the `PLUGIN_DEPENDENCY_DIR` environment variable passed to the plugin. - -To make it easier, there's a helper function `plugin.ExecuteCommand` in the `github.com/kubeshop/botkube/pkg/plugin` package, which does all of the above. For example, the kubectl plugin uses the following code: - -```go -// set additional env variables -envs := map[string]string{ - "KUBECONFIG": kubeConfigPath, -} - -// runCmd is e.g. "kubectl get pods --all-namespaces" -// plugin.ExecuteCommand will replace kubectl with full path to the kubectl binary dependency -out, err := plugin.ExecuteCommand(ctx, runCmd, plugin.ExecuteCommandEnvs(envs)) -``` - -## Example - -To get familiar with the full example, see the [kubectl plugin](https://github.com/kubeshop/botkube/tree/main/cmd/executor/kubectl) in the Botkube repository. The Kubectl plugin depends on the official [kubectl CLI](https://kubernetes.io/docs/tasks/tools/#kubectl) binary, which is defined as a part of the `Metadata` method. diff --git a/versioned_docs/version-1.9/plugin/index.md b/versioned_docs/version-1.9/plugin/index.md deleted file mode 100644 index 4cb341bd..00000000 --- a/versioned_docs/version-1.9/plugin/index.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -id: plugin -title: "Plugin Development" -sidebar_position: 6 ---- - -The Botkube plugin system allows you to extend the Botkube core with custom logic. For example, call or receive events from third-party services. - -To learn more about the Botkube plugin system, follow the recommended steps: - -- Get familiar with the Botkube [architecture](../architecture). -- Enable and configure the [Helm](../configuration/executor/helm.md) executor. -- Use the [template repository](./quick-start.md). -- Learn how to develop a custom [executor](custom-executor.md) or [source](custom-source.md) plugin. -- [Distribute the plugins](repository.md) that you built. - -Share feedback with us via [Slack](https://join.botkube.io/) or [GitHub](https://github.com/kubeshop/botkube/issues)! diff --git a/versioned_docs/version-1.9/plugin/interactivity.md b/versioned_docs/version-1.9/plugin/interactivity.md deleted file mode 100644 index 318617ca..00000000 --- a/versioned_docs/version-1.9/plugin/interactivity.md +++ /dev/null @@ -1,139 +0,0 @@ ---- -id: interactive-messages -title: "Interactive messages" -sidebar_position: 5 ---- - -Some of our communication platforms support interactive messages. If interactivity is supported the `IsInteractivitySupported` property under source or execution context is set to **true**. - -In this guide, we describe how interactivity applies to messages, and show you how to build ones. - -:::tip -For an example implementation, see the [`msg` executor source-code](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/msg/main.go). -::: - -![demo](./assets/demo-msg.gif) - -## Primitives - -You can construct and return interactive messages containing buttons, dropdowns, input text, and more complex formatting. For that reason, we introduced a generic `api.Messages` model. - -- [Buttons](#buttons) -- [Dropdowns](#dropdowns) -- [Input text](#input-text-fields) - -For all primitives you need to attach the proper command that will be executed by Botkube. The pattern is: - -```go -import "github.com/kubeshop/botkube/pkg/api" - -command := api.MessageBotNamePlaceholder + " " + " " -``` - -The `api.MessageBotNamePlaceholder` constant, is our cross-platform placeholder that is replaced by Botkube core with a proper bot name. It's mandatory, otherwise Botkube core will ignore a given command, e.g. a button click. - -The `` and `` should be replaced based on your needs. You replace `` with your own plugin name, or other plugin name, like `kubectl`. However, if you use other plugin name, a given command won't work if plugin is not enabled. - -### Buttons - -You can define a list of buttons under `Section` object. To construct a given button you can use our helper `api.NewMessageButtonBuilder` builder. For example: - -```go -const pluginName = "msg" - -btnBuilder := api.NewMessageButtonBuilder() - -msg := api.Message{ - Sections: []api.Section{ - { - Buttons: []api.Button{ - btnBuilder.ForCommandWithDescCmd("Run act1", fmt.Sprintf("%s buttons act1", pluginName)), - btnBuilder.ForCommandWithDescCmd("Run act2", fmt.Sprintf("%s buttons act2", pluginName), api.ButtonStylePrimary), - btnBuilder.ForCommandWithDescCmd("Run act3", fmt.Sprintf("%s buttons act3", pluginName), api.ButtonStyleDanger), - }, - }, - }, -} -``` - -When a button is clicked, Botkube runs an associated command. For **Run act1** it's `msg buttons act1`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -If you use only `ForCommandWithoutDesc`, all buttons are render in the same line. -![btns-desc](./assets/btns-desc.png) - -Otherwise, each button is rendered in new line with the description on the left side and button on the right side. -![btns-inline](./assets/btns-inline.png) - -### Dropdowns - -You can define dropdowns under `Section` object. You can split options into groups. Optionally, you can define the initial option. It must be included also under `OptionsGroups`. - -```go -cmdPrefix := func(cmd string) string { - return fmt.Sprintf("%s %s %s", api.MessageBotNamePlaceholder, pluginName, cmd) -} - -msg := api.Message{ - Sections: []api.Section{ - { - Selects: api.Selects{ - ID: "select-id", - Items: []api.Select{ - { - Name: "two-groups", - Command: cmdPrefix("selects two-groups"), - OptionGroups: []api.OptionGroup{ - { - Name: cmdPrefix("selects two-groups/1"), - Options: []api.OptionItem{ - {Name: "BAR", Value: "BAR"}, - {Name: "BAZ", Value: "BAZ"}, - {Name: "XYZ", Value: "XYZ"}, - }, - }, - { - Name: cmdPrefix("selects two-groups/2"), - Options: []api.OptionItem{ - {Name: "123", Value: "123"}, - {Name: "456", Value: "456"}, - {Name: "789", Value: "789"}, - }, - }, - }, - // MUST be defined also under OptionGroups.Options slice. - InitialOption: &api.OptionItem{ - Name: "789", Value: "789", - }, - }, - }, - }, - }, - }, -} -``` - -When user select a given option, Botkube runs an associated command and appends selected option at the end. For **BAR** it's `msg selects two-gropus BAR`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -### Input text fields - -```go -msg := api.Message{ - PlaintextInputs: []api.LabelInput{ - { - Command: fmt.Sprintf("%s %s input-text", api.MessageBotNamePlaceholder, pluginName), - DispatchedAction: api.DispatchInputActionOnEnter, - Placeholder: "String pattern to filter by", - Text: "Filter output", - }, - }, -} -``` - -When user types an input string and clicks enter, Botkube runs an associated command and appends input text in quotes. For example, for input **"text"** it's `msg input-text "test"`. If there is a plugin named `msg` and it is enabled on a given channel, it will be called by Botkube with a given command string. As a result, you can parse input command and return proper output. - -## Message visibility - -If the interactivity is enabled, you can change the default message visibility options: - -- The `OnlyVisibleForYou` property allows you to display the message only to the user who clicked a given button or dropdown. It's taken into account only if respond to the interactive message. It cannot be used initial messages that are automatically sent to a given channel. -- The `ReplaceOriginalMessage` property allows you to replace the message which triggered interactive command. You cannot change `OnlyVisibleForYou` as the message retains its initial visibility. diff --git a/versioned_docs/version-1.9/plugin/local-testing.md b/versioned_docs/version-1.9/plugin/local-testing.md deleted file mode 100644 index 0d21a40a..00000000 --- a/versioned_docs/version-1.9/plugin/local-testing.md +++ /dev/null @@ -1,163 +0,0 @@ ---- -id: local-testing -title: "Local testing" -sidebar_position: 7 ---- - -This document describes steps for running Botkube core locally together with a local file server for serving your plugins during development phase. - -**Prerequisite** - -- [Node.js](https://nodejs.org/en/download/), to use `npx` - -**Steps** - -1. Follow steps from [`CONTRIBUTING.md`](https://github.com/kubeshop/botkube/blob/main/CONTRIBUTING.md#build-and-run-locally) about running Botkube locally. - -2. Create a file with your plugins' repository, plugin configuration and bindings for enabled communication platform: - - ```yaml - plugins: - repositories: - local-repo: - url: http://localhost:8080/plugins-index.yaml - - executors: - "plugins": - local-repo/executor-name: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. - sources: - "plugins": - local-repo/source-name: # Plugin name syntax: /[@]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. - - communications: - # Enable a given communication platform and define bindings to a given executor and source plugins. - ``` - - For example, for Slack and example `echo` and `ticker` plugins, provide `appToken` and `botToken` and run the script: - -
- Create /tmp/config-values.yaml - - ```yaml - cat << EOF > /tmp/config-values.yaml - plugins: - repositories: - local-repo: - url: http://localhost:8080/plugins-index.yaml - - executors: - "plugins": - local-repo/echo: - enabled: true - config: - transformResponseToUpperCase: true - sources: - "plugins": - local-repo/ticker: - enabled: true - config: - interval: 5s - communications: - default-group: - socketSlack: - enabled: true - channels: - default: - name: random - bindings: - executors: - - 'plugins' - sources: - - 'plugins' - appToken: "" # provide your token starting with xapp-1- - botToken: "" # provide your token starting with xoxb- - settings: - clusterName: local-dev - EOF - ``` - -
- -3. In your plugin project directory, start a static plugin server: - - ```bash - # Use https://github.com/vercel/serve - npx serve --listen 8080 - ``` - - :::note - If Botkube runs on external Kubernetes cluster, you can use the tunneling software, for example [`ngrok`](https://ngrok.com/). It creates an externally addressable URL for a port you open locally on your machine. - ::: - -4. In your plugin project directory open a new terminal window. -5. Export Botkube plugins cache directory: - - ```bash - export BOTKUBE_PLUGINS_CACHE__DIR="/tmp/plugins" - ``` - -6. Export Botkube repository path cloned in the first step: - - ```bash - export BOTKUBE_REPO_PATH={botkube_repo_path} - ``` - -7. Export configuration files: - - ```bash - export BOTKUBE_CONFIG_PATHS="${BOTKUBE_REPO_PATH}/helm/botkube/values.yaml,/tmp/config-values.yaml" - ``` - -8. Build plugins and start Botkube: - - :::note - Each time you change a plugin source code, re-run the above command. - ::: - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -
- - - -1. Download index builder: - -```bash -go get github.com/kubeshop/botkube/hack -``` - -2. Build plugins and run Botkube: - -```bash -# rebuild plugins only for current GOOS and GOARCH -goreleaser build --rm-dist --snapshot --single-target && -# regenerate index -go run github.com/kubeshop/botkube/hack -binaries-path "./dist" -url-base-path "http://localhost:8080/dist" -use-archive=false && -# remove cached plugins -rm -rf $BOTKUBE_PLUGINS_CACHE__DIR && -# start Botkube -${BOTKUBE_REPO_PATH}/botkube -``` - - - - -```bash -# rebuild plugins only for current GOOS and GOARCH -make build-plugins-single && -# regenerate index -env PLUGIN_DOWNLOAD_URL_BASE_PATH="http://localhost:8080/dist" make gen-plugin-index && -# remove cached plugins -rm -rf $BOTKUBE_PLUGINS_CACHE__DIR && -# start Botkube -${BOTKUBE_REPO_PATH}/botkube -``` - - - -
diff --git a/versioned_docs/version-1.9/plugin/quick-start.md b/versioned_docs/version-1.9/plugin/quick-start.md deleted file mode 100644 index e4abb5f5..00000000 --- a/versioned_docs/version-1.9/plugin/quick-start.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: quick-start -title: "Quick start" -sidebar_position: 1 ---- - -Botkube provides a quick start repository to start developing Botkube [source](../architecture/index.md#source) and [executor](../architecture/index.md#executor) plugins in Go. It has all batteries included; example plugins: - -- The [`echo`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/echo/main.go) executor that sends back the command that was specified, -- The [`ticker`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/ticker/main.go) source that emits an event each time the configured time duration elapses, -- The [`forwarder`](https://github.com/kubeshop/botkube-plugins-template/blob/main/cmd/forwarder/main.go) source that echos the message sent as an incoming webhook request. - -and two example release jobs: - -- [GitHub releases](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/release.yml) -- [GitHub Pages](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/pages-release.yml) - -## Use template - -1. Navigate to [`botkube-plugins-template`](https://github.com/kubeshop/botkube-plugins-template). - -2. Click **"Use this template"**, next **"Create a new repository"** - - ![Create Repo](./assets/use-tpl.png) - - This creates your own plugin repository with a single commit. - -3. After a few seconds, the `.github/workflows/setup.yml` job will create a new commit. This job removes Kubeshop related files, such as: - - - `CONTRIBUTING.md` - - `CODE_OF_CONDUCT.md` - - `LICENSE` - - `SECURITY.md` - - `.github/CODEOWNERS` - - Additionally, it updates links in README.md to point to your own repository instead of Kubeshop's one. In case of job failure, you need to make and commit those changes manually. - - This job runs only once, later you can remove it or disable it. - -4. Decide which release job you prefer, the GitHub releases, or GitHub pages. Once decided, remove one the above workflow in your new repository: - - - GitHub releases, defined at `.github/workflows/release.yml` in your GitHub repository. - - GitHub Pages, defined at `.github/workflows/pages-release.yml` in your GitHub repository. - - If you pick the GitHub Pages, a further configuration is needed: - - 1. In project settings, enable [publishing GitHub Pages via GitHub Action](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow). - 2. Adjust the `github-pages` deployment environment. You can either: - - remove the deployment environment if you don't need any protection rules - - add an environment protection rule so that you can deploy pages on each new tag. If you use tagging like `vX.Y.Z`, you can add the `v*` rule. As an alternative, can select **All branches** from the dropdown. - -5. Add LICENSE file and update the README.md file to describe the plugins that you created. diff --git a/versioned_docs/version-1.9/plugin/repository.md b/versioned_docs/version-1.9/plugin/repository.md deleted file mode 100644 index 52635cc2..00000000 --- a/versioned_docs/version-1.9/plugin/repository.md +++ /dev/null @@ -1,181 +0,0 @@ ---- -id: repo -title: "Repository" -sidebar_position: 8 ---- - -A plugin repository is a place where you store your plugin binaries. This repository must be publicly available and supports downloading assets via HTTP(s). This document explains how to create Botkube plugin repositories by providing examples based on GitHub functionality. However, any static file server can be used, for instance: `s3`, `gcs`, etc. - -This document describes how to set up such repository. If you use or plan to use GitHub you can adapt the [template repository](quick-start.md) that has batteries included to start developing and hosting Botkube plugins right away. - -## Index file - -Your plugin repository must contain at least one index file and one plugin binary. Depending on your needs and preferences, you can create one or more index files to categorize your plugins. You can host both the executor and source plugins in a single repository. You can also include them in the same index file. - -In the index file, provide an entry for every plugin from your plugin repository. The index file must have the following syntax: - -```yaml -entries: - - name: { plugin_name } - type: { plugin_type } # executor or source - description: { plugin_description } - version: { plugin_version } - urls: - - url: { url_to_plugin_binary } - platform: - os: { plugin_operating_system } # darwin or linux - architecture: { plugin_architecture } # amd64 or arm64 - dependencies: # optional dependencies - { dependency_name }: - url: { url_to_dependency_binary } -``` - -It is not required to host a plugin or dependency binary on the same server as the index file. - -### Generate index file - -You can create the index file by yourself our use our tool to generate it automatically based on the directory with plugins binaries. The binaries must be named according to the following pattern: - -- For executors, `executor_{plugin_name}_{os}_{arch}`; for example, `executor_kubectl_darwin_amd64`. -- For sources, `source_{plugin_name}_{os}_{arch}`; for example, `source_kubernetes_darwin_amd64`. - -**Steps** - -1. In your plugin repository, add `tools.go`: - - ```go - cat << EOF > tools.go - //go:build tools - - package tools - - import ( - _ "github.com/kubeshop/botkube/hack" - ) - EOF - ``` - - :::note - We use the `tools.go` file, which is the [recommended way of tracking tool dependencies](https://github.com/golang/go/wiki/Modules#how-can-i-track-tool-dependencies-for-a-module). - ::: - -2. Refresh dependencies: - - ```bash - go mod tidy - ``` - -3. Build all your plugins. See [**Build plugin binaries**](custom-executor.md). - -4. Generate an index file: - - ```bash - go run github.com/kubeshop/botkube/hack -binaries-path "./dist" -url-base-path "https://example.com" - ``` - - :::info - Replace the `-url-base-path` flag with the base path of your HTTP server. See [Hosting plugins](#host-plugins) for some examples. - ::: - -## Host plugins - -This section describes example ways for serving Botkube plugins. - -### GitHub releases - -A GitHub release allows you to upload additional assets that are later accessible with a predictable URL. When you generate the index file, specify the `-url-base-path` flag as `https://github.com/{owner}/{repo}/releases/download/{release_tag}`, for example, `https://github.com/kubeshop/botkube/releases/download/v1.0.0`. - -Once the plugin binaries are built and the index file is generated, you can create a GitHub release using [GitHub CLI](https://cli.github.com/). For example: - -```bash -gh release create v1.0.0 \ - ./dist/source_* \ - ./dist/executor_* \ - ./plugins-index.yaml -``` - -#### Automation - -You can use [GitHub Actions](https://docs.github.com/en/actions) to publish Botkube plugins automatically each time a new tag is pushed. See the [`release` workflow](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/release.yml) on the `botkube-plugins-template` repository for the out-of-the-box solution, which you can use and modify if needed. - -### GitHub pages - -GitHub allows you to serve static pages via GitHub Pages. When you generate the index file, specify the `-url-base-path` flag as `https://{user}.github.io/{repository}`, for example, `https://kubeshop.github.io/botkube-plugins`. - -**Initial setup** - -1. Navigate to the Git repository with your plugins. - -2. Create the `gh-pages` branch: - - ```bash - git switch --orphan gh-pages - git commit --allow-empty -m "Initialization commit" - git push -u origin gh-pages - ``` - -3. Follow [this](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch) guide to make sure your `gh-pages` branch is set as the source for GitHub Pages. - -**Publishing steps** - -1. Clone `gh-pages` into `/tmp/botkube-plugins`: - - ```bash - git clone -b gh-pages "https://github.com/{owner}/{repo}.git" /tmp/botkube-plugins - ``` - -2. Move built binaries and generated index file: - - ```bash - mv dist/executor_* /tmp/botkube-plugins/ - mv dist/source_* /tmp/botkube-plugins/ - mv plugins-index.yaml /tmp/botkube-plugins - ``` - -3. Commit and push copied files: - - ```bash - cd /tmp/botkube-plugins - git add -A - git commit -m "Release Botkube plugins" - git push - ``` - -4. Remove cloned `gh-pages`: - - ```bash - cd - - rm -rf /tmp/botkube-charts - ``` - -In such setup, you can use your default branch to store your plugins code, and the `gh-pages` branch as a plugin repository. - -#### Automation - -You can use [GitHub Actions](https://docs.github.com/en/actions) to publish Botkube plugins automatically each time a new tag is pushed. See the [`pages-release` workflow](https://github.com/kubeshop/botkube-plugins-template/blob/main/.github/workflows/pages-release.yml) on the `botkube-plugins-template` repository for the out-of-the-box solution, which you can use and modify if needed. - -### Use hosted plugins - -To use the plugins that you published, add your repository under `plugins` in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file for a given Botkube deployment. For example: - -```yaml -plugins: - repositories: - repo-name: - url: https://example.com/plugins-index.yaml -``` - -Once the plugin repository is added, you can refer to it in the `executor` or `sources` section. - -```yaml -executors: - "plugins": - repo-name/executor-name@v1.0.0: # Plugin name syntax: {repo}/{plugin}[@{version}]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. -sources: - "plugins": - repo-name/source-name@v1.0.0: # Plugin name syntax: {repo}/{plugin}[@{version}]. If version is not provided, the latest version from repository is used. - enabled: true - config: {} # Plugin's specific configuration. -``` diff --git a/versioned_docs/version-1.9/plugin/troubleshooting.md b/versioned_docs/version-1.9/plugin/troubleshooting.md deleted file mode 100644 index 5cfa36ef..00000000 --- a/versioned_docs/version-1.9/plugin/troubleshooting.md +++ /dev/null @@ -1,106 +0,0 @@ ---- -id: troubleshooting.md -title: "Troubleshooting" -sidebar_position: 9 ---- - -This document describes how to identify and resolve issues that might occur. - -### Missing source events - -**Symptoms** - -You don't get event message on a given communication platform even though the event occurred in your 3rd party service. - -**Debugging steps** - -- [Enable debugging mode for a given plugin](debug.md). - Once enabled, check the Botkube logs. You can filter them by your plugin name. You should see information about downloading and starting your source. For example: - - ```bash - INFO[2023-01-09T21:21:24+01:00] Starting Plugin Manager for all enabled plugins component="Plugin Manager" enabledSources=botkube/cm-watcher - INFO[2023-01-09T21:21:24+01:00] Downloading plugin. binPath=/tmp/plugins/botkube/source_v0.13.0_cm-watcher component="Plugin Manager" url="http://host.k3d.internal:3000/static/source_cm-watcher_darwin_amd64" - INFO[2023-01-09T21:21:24+01:00] source plugin registered successfully. binPath=/tmp/plugins/botkube/source_v0.13.0_cm-watcher component="Plugin Manager" plugin=botkube/cm-watcher version=v0.13.0 - INFO[2023-01-09T21:21:25+01:00] Start source streaming... pluginName=botkube/cm-watcher sources="[plugin-based]" - ``` - - If you don't see any of the above log messages: - - - Make sure that `source.{group_name}.{plugin_name}.enabled` property is set to `true` - - Make sure that a given source configuration (`sources.{group_name}`) is bind to a given communication platform (`bindings.sources: [{group_name}]`) - - If the source is not bound to any communication platform Botkube will not download and start such plugin. Even if it's enabled. - -- [Make sure that your plugin didn't crash](#plugin-process-exited). - -### Missing executor response - -**Symptoms** - -You run a given executor command in a chat window, but you don't get any response. - -**Debugging steps** - -- [Enable debugging mode for a given plugin](debug.md). - Once enabled, run a given executor command once again, and check the Botkube logs. You can filter them by your plugin name. You should see information about downloading and registering your executor. For example: - - ```bash - INFO[2023-01-09T21:21:24+01:00] Starting Plugin Manager for all enabled plugins component="Plugin Manager" enabledExecutors=botkube/echo - INFO[2023-01-09T21:21:24+01:00] Downloading plugin. binPath=/tmp/plugins/botkube/executor_v0.13.0_echo component="Plugin Manager" url="http://host.k3d.internal:3000/static/executor_echo_darwin_amd64" - INFO[2023-01-09T21:21:24+01:00] executor plugin registered successfully. binPath=/tmp/plugins/botkube/executor_v0.13.0_echo component="Plugin Manager" plugin=botkube/echo version=v0.13.0 - ``` - - If you don't see any of the above log messages: - - - Make sure that `executors.{group_name}.{plugin_name}.enabled` property is set to `true` - - Make sure that a given executor configuration (`executors.{group_name}`) is bind to a given communication platform (`bindings.executors: [{group_name}]`) - - If the executor is not bound to any communication platform Botkube will not download and start such plugin. Even if it's enabled. - -- [Make sure that your plugin didn't crash](#plugin-process-exited). - -### Plugin process exited - -**Symptoms** - -In Botkube logs, you see an error similar to: - -```bash -ERRO[2023-01-09T21:21:25+01:00] plugin process exited error="exit status 1" path=/tmp/plugins/botkube/executor_v0.13.0_echo pid=71127 plugin=botkube/echo -``` - -**Solution** - -It means that your plugin exited once it was started by Botkube [plugin manager](../architecture/index.md#plugin-manager). To start your plugin again, you need to restart the Botkube core process, as crashed plugins aren't restarted automatically. This issue is tracked in [botkube#878](https://github.com/kubeshop/botkube/issues/878). You need to make sure that our plugin doesn't exit once it's started. You should return each error on Botkube plugin interface, instead of crashing your application. To see your plugin standard output [set the `debug` for a given plugin](debug.md). - -### Plugin not found error - -**Symptoms** - -In Botkube logs, you see an error similar to: - -```bash -2023/01/09 21:37:04 while starting plugins manager: not found source plugin called "cm-test" in "botkube" repository -``` - -**Debugging steps** - -- Make sure that a given repository is defined under `plugins.repository`. -- Check that a given entry is defined in a given repository index file. You should find under `entries` a plugin with a given name, version and type (source or executor). - -### Botkube is killed by readiness probe while downloading plugins - -**Symptoms** - -In environments with low internet bandwidth Botkube might get killed by the readiness probe before it finishes downloading all plugins. -The solution to this problem is to increase the wait time of the readiness probe. - -**Solution** - -To increase the wait time of the readiness probe, you need to set the `initialDelaySeconds` property in -[values.yaml](https://github.com/kubeshop/botkube/blob/9e450fb63666b03118ee51fcf9b7eb6c3b74cbcf/helm/botkube/values.yaml#L794-L821) -to a higher value. For example: - -``` ---set deployment.readinessProbe.initialDelaySeconds=180 -``` diff --git a/versioned_docs/version-1.9/plugin/using-kubeconfig.md b/versioned_docs/version-1.9/plugin/using-kubeconfig.md deleted file mode 100644 index e958119b..00000000 --- a/versioned_docs/version-1.9/plugin/using-kubeconfig.md +++ /dev/null @@ -1,85 +0,0 @@ ---- -id: using-kubeconfig -title: Using kubeconfig -sidebar_position: 4 ---- - -You can request Botkube to generate and pass kubeconfig file to your plugin by adding RBAC section -to your plugin configuration. The following example requests a kubeconfig that impersonates -user **User.rbac.authorization.k8s.io** `read-only-user`. For more information refer to the -[RBAC section](../configuration/rbac.md). The example is for executor plugins, source plugins -can access kubeconfig in their `Stream()` function in `source.StreamInput`. - -RBAC config for an example plugin: - -```yaml -executors: - "reader-team-a": - kube-reader: - enabled: true - context: - user: - type: Static - static: - value: read-only-user -``` - -The kubeconfig is available in `executor.ExecuteInput` as a slice of bytes. -There are two options to instantiate a Kubernetes Go client with this config. - -1. From bytes - -```go -import ( - "context" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/kubernetes" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -func (ReaderExecutor) Execute(_ context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - config, err := clientcmd.RESTConfigFromKubeConfig(in.Context.KubeConfig) - if err != nil { - return executor.ExecuteOutput{}, err - } - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return executor.ExecuteOutput{}, err - } - ... -} -``` - -2. From file - -```go -import ( - "context" - "k8s.io/client-go/tools/clientcmd" - "k8s.io/client-go/kubernetes" - "github.com/kubeshop/botkube/pkg/api/executor" - "github.com/kubeshop/botkube/pkg/pluginx" -) - -func (ReaderExecutor) Execute(ctx context.Context, in executor.ExecuteInput) (executor.ExecuteOutput, error) { - kubeConfigPath, deleteFn, err := pluginx.PersistKubeConfig(ctx, in.Context.KubeConfig) - if err != nil { - return executor.ExecuteOutput{}, fmt.Errorf("while writing kubeconfig file: %w", err) - } - defer func() { - if deleteErr := deleteFn(ctx); deleteErr != nil { - fmt.Fprintf(os.Stderr, "failed to delete kubeconfig file %s: %v", kubeConfigPath, deleteErr) - } - }() - config, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath) - if err != nil { - return executor.ExecuteOutput{}, err - } - clientset, err := kubernetes.NewForConfig(config) - if err != nil { - return executor.ExecuteOutput{}, err - } - ... -} -``` diff --git a/versioned_docs/version-1.9/usage/assets/actionable-notifications.png b/versioned_docs/version-1.9/usage/assets/actionable-notifications.png deleted file mode 100644 index dd7f7656..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/actionable-notifications.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/disable-action.png b/versioned_docs/version-1.9/usage/assets/disable-action.png deleted file mode 100644 index ffb1c33d..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/disable-action.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/enable-action.png b/versioned_docs/version-1.9/usage/assets/enable-action.png deleted file mode 100644 index 6fcc249a..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/enable-action.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/flag_filter_kubectl_get_nodes.png b/versioned_docs/version-1.9/usage/assets/flag_filter_kubectl_get_nodes.png deleted file mode 100644 index 96deecce..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/flag_filter_kubectl_get_nodes.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/flag_filter_kubectl_logs.png b/versioned_docs/version-1.9/usage/assets/flag_filter_kubectl_logs.png deleted file mode 100644 index b2a8106e..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/flag_filter_kubectl_logs.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/list-actions.png b/versioned_docs/version-1.9/usage/assets/list-actions.png deleted file mode 100644 index 5bb5238f..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/list-actions.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/long-notification.png b/versioned_docs/version-1.9/usage/assets/long-notification.png deleted file mode 100644 index 68569f3e..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/long-notification.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/mm_notifier_start.png b/versioned_docs/version-1.9/usage/assets/mm_notifier_start.png deleted file mode 100644 index 63e8837d..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/mm_notifier_start.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/output-filtering-filter-response.png b/versioned_docs/version-1.9/usage/assets/output-filtering-filter-response.png deleted file mode 100644 index e34474b6..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/output-filtering-filter-response.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/output-filtering-get-pods-metrics.png b/versioned_docs/version-1.9/usage/assets/output-filtering-get-pods-metrics.png deleted file mode 100644 index 48a30c39..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/output-filtering-get-pods-metrics.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/output-filtering-get-pods.png b/versioned_docs/version-1.9/usage/assets/output-filtering-get-pods.png deleted file mode 100644 index 08793408..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/output-filtering-get-pods.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/output-filtering-logs-response.png b/versioned_docs/version-1.9/usage/assets/output-filtering-logs-response.png deleted file mode 100644 index 576dabf5..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/output-filtering-logs-response.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/output-filtering-metrics-logs-filter.png b/versioned_docs/version-1.9/usage/assets/output-filtering-metrics-logs-filter.png deleted file mode 100644 index d1fd07d3..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/output-filtering-metrics-logs-filter.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/output-filtering-metrics-logs.png b/versioned_docs/version-1.9/usage/assets/output-filtering-metrics-logs.png deleted file mode 100644 index 643d0334..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/output-filtering-metrics-logs.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/assets/short-notification.png b/versioned_docs/version-1.9/usage/assets/short-notification.png deleted file mode 100644 index 3234ac3e..00000000 Binary files a/versioned_docs/version-1.9/usage/assets/short-notification.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/automated-actions.md b/versioned_docs/version-1.9/usage/automated-actions.md deleted file mode 100644 index d6f1a7fa..00000000 --- a/versioned_docs/version-1.9/usage/automated-actions.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -id: automated-actions -title: "Automated actions" -sidebar_position: 3 ---- - -# Automated actions - -Actions allow you to automate your workflows by executing custom commands based on specific events. To read how to configure actions, see the [Action](../configuration/action.md) configuration document. - -## Manage actions - -Botkube allows you to manage actions using `@Botkube` commands. - -### List available actions - -Run `@Botkube list actions` to get list of configured actions and their running status: - -![List available actions](./assets/list-actions.png) - -### Disable action - -Run `@Botkube disable action {action-name}` to disable an action named `{action-name}`. The action settings are persisted across Botkube app restarts. - -![Disable action](./assets/disable-action.png) - -When you disable an action, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. - -### Enable action - -Run `@Botkube enable action {action-name}` to enable an action named `{action-name}`. The action settings are persisted across Botkube app restarts. - -![Enable action](./assets/enable-action.png) - -When you enable an action, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. diff --git a/versioned_docs/version-1.9/usage/event-notifications.md b/versioned_docs/version-1.9/usage/event-notifications.md deleted file mode 100644 index a59b60fe..00000000 --- a/versioned_docs/version-1.9/usage/event-notifications.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -id: event-notifications -title: "Event notifications" -sidebar_position: 1 ---- - -# Event notifications - -Botkube sends notifications according to the [sources](../configuration/source/index.md) configuration. - -## Actionable notifications - -If you have [`kubectl` executor enabled](../configuration/executor/kubectl.md) for a given channel, you can run commands related to a resource from the notification itself. Use the dropdown on the left to select and run a given command: - -![Actionable notifications](./assets/actionable-notifications.png) - -The command dropdown is disabled for resource deletion events. It uses executor bindings to determine which commands are available for a given resource. - -:::info -Actionable notifications are only available for the [Slack](../installation/slack/index.md) and [Microsoft Teams](../installation/teams/index.md) platforms that supports interactive messages. Currently, only a selected list of commands are supported, such as `describe`, `get`, or `logs`. -::: - -## Managing notifications - -Depending upon your configuration, you will receive notifications about Kubernetes resources lifecycle events and their health. -Botkube bot allows you to enable/disable notifications on each configured channel separately. Run `@Botkube help`, the bot will reply with the help message about the supported message formats. - -### View Botkube configuration - -Run `@Botkube show config` message from the configured channel where Botkube is added. The bot will reply to you with the configuration with which the controller is running. - -To see how to update the configuration, see the [Updating the configuration](../configuration/index.mdx#updating-the-configuration) section in the Configuration document. - -### Change notification sources - -To change the notification sources, you can: - -- run `@Botkube edit SourceBindings` command from the configured channel where Botkube is added. - - When you save the new notification sources, changes are applied once the Botkube is restarted. It is an automated process which usually takes a few seconds. - -- For Botkube Cloud: edit Botkube Instance configuration in the Botkube Cloud dashboard. -- For self-hosted installations: run `helm upgrade` with updated installation command. - -### Disable notifications - -If you want to stop receiving notifications from Botkube, run `@Botkube disable notifications` from the configured channel where Botkube is added. You will no longer receive notifications from the Botkube in a given communication platform. - -The notification settings are persisted across Botkube app restarts. - -### Enable notifications - -If you want to receive Botkube notifications again, run `@Botkube enable notifications` from the configured channel where Botkube is added. - -The notification settings are persisted across Botkube app restarts. - -### Check notifications status - -Run `@Botkube status notifications` to check if notifications are enabled for a given communication platform. diff --git a/versioned_docs/version-1.9/usage/executor/assets/demo-x.gif b/versioned_docs/version-1.9/usage/executor/assets/demo-x.gif deleted file mode 100644 index 572a0fd7..00000000 Binary files a/versioned_docs/version-1.9/usage/executor/assets/demo-x.gif and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/executor/assets/flux-diff.gif b/versioned_docs/version-1.9/usage/executor/assets/flux-diff.gif deleted file mode 100644 index 6ffc20bd..00000000 Binary files a/versioned_docs/version-1.9/usage/executor/assets/flux-diff.gif and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/executor/assets/flux-interactivity.gif b/versioned_docs/version-1.9/usage/executor/assets/flux-interactivity.gif deleted file mode 100644 index 083a6bff..00000000 Binary files a/versioned_docs/version-1.9/usage/executor/assets/flux-interactivity.gif and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/executor/assets/helm-install-filter.png b/versioned_docs/version-1.9/usage/executor/assets/helm-install-filter.png deleted file mode 100644 index 9502e61e..00000000 Binary files a/versioned_docs/version-1.9/usage/executor/assets/helm-install-filter.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/executor/assets/kc-cmd-builder.gif b/versioned_docs/version-1.9/usage/executor/assets/kc-cmd-builder.gif deleted file mode 100644 index 63f672b5..00000000 Binary files a/versioned_docs/version-1.9/usage/executor/assets/kc-cmd-builder.gif and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/executor/assets/parsed-space-table.png b/versioned_docs/version-1.9/usage/executor/assets/parsed-space-table.png deleted file mode 100644 index 9d523779..00000000 Binary files a/versioned_docs/version-1.9/usage/executor/assets/parsed-space-table.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/executor/assets/x-quickstart.png b/versioned_docs/version-1.9/usage/executor/assets/x-quickstart.png deleted file mode 100644 index a5b7d60a..00000000 Binary files a/versioned_docs/version-1.9/usage/executor/assets/x-quickstart.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/executor/doctor.md b/versioned_docs/version-1.9/usage/executor/doctor.md deleted file mode 100644 index 8d45227f..00000000 --- a/versioned_docs/version-1.9/usage/executor/doctor.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: doctor -title: "Doctor" -sidebar_position: 4 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube allows you to execute `doctor` commands on your Kubernetes cluster. By default, `doctor` command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/doctor.md#enabling-plugin) section from the `doctor` configuration documentation. - -To execute the `doctor` commands, send message in following formats in the channel where Botkube is already added: - -- Kubernetes native prompt: - ``` - @Botkube doctor --namespace=[namespace] --resource=[resource] --error=[error] - ``` -- Free-form question: - ``` - @Botkube doctor "[free-form question]" - ``` - -By default, `chatgpt` is configured as alias for the `doctor` command. You can use them on par with the `doctor` command. To read more about aliases configuration, see the [Alias](../../configuration/alias.md) section. - -This command needs to be executed from configured channel. diff --git a/versioned_docs/version-1.9/usage/executor/exec.mdx b/versioned_docs/version-1.9/usage/executor/exec.mdx deleted file mode 100644 index 16d6db43..00000000 --- a/versioned_docs/version-1.9/usage/executor/exec.mdx +++ /dev/null @@ -1,204 +0,0 @@ ---- -id: exec -title: "Exec" -sidebar_position: 3 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -The `exec` executor plugin allows you to install and run CLI applications directly from chat (e.g., Slack, Microsoft Teams, Discord, or Mattermost) without any hassle. - -It supports interactivity in the form of buttons and dropdowns. You can easily use all your favorite tools without typing, even from your mobile phone! - -![x-demo](./assets/demo-x.gif) - -:::note -To shorten the command, the `x` alias is used in all examples. Make sure you have it configured for your Botkube installation according to [Alias configuration](../../configuration/alias) document. - -In this context, the `x` stands for `extension` or `execution`. -::: - -# Usage - -## Install CLI - -To install a given CLI binary directly from a chat window, run: - -``` -@Botkube x install {source} -``` - -For downloading binaries, the `eget` library is used. It supports multiple URL formats and is able to unpack archives and extract binaries from them. For more details, see the documentation on the [`eget`](https://github.com/zyedidia/eget) GitHub repository. - -### Examples - -- `@Botkube x install https://get.helm.sh/helm-v3.10.3-linux-amd64.tar.gz --file helm` -- `@Botkube x install github.com/fluxcd/flux2` -- `@Botkube x install https://github.com/rikatz/kubepug --asset kubepug_darwin_amd64.tar.gz` - -## Execute CLI - -To execute a CLI command, run: - -``` -@Botkube x run {command} -``` - -### Examples - -- `@Botkube x run helm list -A` -- `@Botkube x run flux get sources git` - -:::tip -For convenience, you can configure a Botkube alias to simplify running `flux` commands, according to the [Alias configuration](../../configuration/alias) document. Later, you can simply type `@Botkube flux get sources git`. -::: - -# Templates - -The `exec` plugin supports defining templates for executed commands. As a result, you can specify how to process the CLI output or define your own message response. - -```yaml -# An array of templates that define how to convert the command output into an interactive message. -templates: - - trigger: - command: - # Specifies the prefix of the command that triggers the template and the parser used to parse the output. - # If specified, it has higher priority than the regex field. - prefix: "helm list" - # Specifies the regex that should match a given command - # If specified, it has lower priority than the prefix field. - regex: "regex: '^helm list(?:\s+(-A|-a))*\s?$'" - # Specifies the message template type. - type: "" - # Message template depending on the selected type. - message: { } -``` - -Supported template types: - -- [`parser:table:space`](#table-parser) -- [`wrapper`](#wrapper) -- [`tutorial`](#tutorial) - -Navigate to the [`exec`](https://github.com/kubeshop/botkube/tree/main/cmd/executor/x/templates) plugin directory to see official examples. - -## Table parser - -The `parser:table:space` template knows how to convert space-separated tables into an interactive message. This allows you to select a single item from a dropdown and perform additional actions in the context of the selected item without typing anything. - -For example, such a table: - -```shell -NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION -psql default 1 2023-04-27 19:30:48.042056 +0200 CEST deployed postgresql-12.2.7 15.2.0 -traefik kube-system 1 2023-04-19 20:58:57.709052559 +0000 UTC deployed traefik-10.19.300 2.6.2 -traefik-crd kube-system 1 2023-04-19 20:58:56.564578223 +0000 UTC deployed traefik-crd-10.19.300 -``` - -is displayed as: - -![](./assets/parsed-space-table.png) - -The table output is parsed with the following rules: - -- All headers are normalized using the [`Title`](https://pkg.go.dev/golang.org/x/text/cases#Title) function. For example: - - - `APP VERSION` is `AppVersion` - - `NAME` is `Name` - - `namespace` is `Namespace` - -- Empty cells are allowed, and they are printed as an empty string. - -By default, the first row is selected and displayed in the message. The `actions` and `preview` properties are rendered in the context of the selected row. - -### Syntax - -Here is an example syntax that converts the `helm list -A` command into an interactive message: - -```yaml -type: "parser:table:space" -message: - # Creates a dropdown menu with a given name, where the items are generated using the `keyTpl` parameter. - selects: - - name: "Release" - keyTpl: "{{ .Namespace }}/{{ .Name }}" - - # Defines additional actions that can be performed in the context of the selected item. In this example, the user can view notes, values, or delete the selected release. - # optional - actions: - notes: "helm get notes {{ .Name }} -n {{ .Namespace }}" - values: "helm get values {{ .Name }} -n {{ .Namespace }}" - delete: "helm delete {{ .Name }} -n {{ .Namespace }}" - - # Displays a preview of the selected item. Fields `Name`, `Namespace`, `Status`, and `Chart` are generated using the output of the command. It's useful to display only important context. - # optional - preview: | - Name: {{ .Name }} - Namespace: {{ .Namespace }} - Status: {{ .Status }} - Chart: {{ .Chart }} -``` - -## Wrapper - -The wrapper template allows adding extra buttons to the CLI output without modifying the output itself. It's useful to attach some pre-defined commands. - -### Syntax - -Here is an example syntax to add two predefined buttons to a given output message: - -```yaml -type: "wrapper" -message: - buttons: - - # Button name - name: "Get Help" - # URL to open on click. - url: "https://example.com/help" - - # Button name - name: "Initialize" - # Button command to run. Use `{{BotName}}` placeholder for commands that should be executed by Botkube - command: "{{BotName}} x run flux install" - # Button style, supported values: primary, danger - style: "primary" -``` - -## Tutorial - -The tutorial template allows you to define a custom response for a given command. For example, when the trigger command is set to `trigger.comand.prefix: "quickstart helm"` and a user types `@Botkube x run quickstart helm`, the command itself is not executed. Instead, a defined tutorial message is returned. - -![quickstart](./assets/x-quickstart.png) - -### Syntax - -Here is an example syntax to return tutorial with two predefined buttons: - -```yaml -type: "tutorial" -message: - # Pagination rules - paginate: - # Maximum number of rendered buttons per page - page: 5 - # Message header - header: "Helm Quick Start tutorial" - # Tutorial steps that are rendered in a given order. - buttons: - - # Button name - name: "Global Help" - # Button description to display on the left side of the button. - description: "{{BotName}} helm help" - # Button command to run. Use `{{BotName}}` placeholder for commands that should be executed by Botkube - command: "{{BotName}} x run helm help" - - name: "Version" - description: "{{BotName}} helm version" - command: "{{BotName}} x run helm version" -``` diff --git a/versioned_docs/version-1.9/usage/executor/flux.md b/versioned_docs/version-1.9/usage/executor/flux.md deleted file mode 100644 index 8582319f..00000000 --- a/versioned_docs/version-1.9/usage/executor/flux.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -id: flux -title: "Flux" -sidebar_position: 5 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube offers seamless execution of Flux CLI commands within your Kubernetes cluster. By default, Flux command execution is disabled. To enable it, refer to the [Enabling plugin](../../configuration/executor/flux.md#enabling-plugin) section. - -To execute the `flux` CLI commands, send a message in the channel where Botkube is present. For example: - -``` -@Botkube flux tutorial -``` - -## Interactive Usage - -We have also incorporated interactivity (tables, etc.) to simplify running Flux CLI commands e.g. from mobile devices. - -![flux-interactivity](./assets/flux-interactivity.gif) - -## Simplified Kustomization Diffing Flow - -With the Botkube Flux executor, you can execute a single command to perform a diff between a specific pull request and the cluster state. For instance: - -``` -@Botkube flux diff kustomization podinfo --path ./kustomize --github-ref [PR Number| URL | Branch] -``` - -![flux-diff](./assets/flux-diff.gif) - -This command automates several tasks: - -- Automatically discovering the associated GitHub repository for the given kustomization. -- Cloning the repository. -- Checking out a given pull request. -- Comparing pull request changes with the current cluster state. -- Sharing the diff report. - -The diff results are posted on the Slack channel, making it easy for team members to review and discuss the changes. Additionally, the returned message provides additional contextual actions: - -- Posting the diff report as a GitHub comment on the corresponding pull request. -- Approving the pull request. -- Viewing the pull request. - -### GitHub automation - -To enhance your workflow's efficiency, you can use the [GitHub Events](../../configuration/source/github-events.md) source for automatic notification of pull request events, complete with an integrated `flux diff` button. - -```yaml -github: - auth: - accessToken: "ghp_" # GitHub PAT - -repositories: - - name: { owner }/{name} - on: - pullRequests: - - types: [ "open" ] - paths: - # Patterns for included file changes in pull requests. - include: [ 'kustomize/.*' ] - notificationTemplate: - extraButtons: - - displayName: "Flux Diff" - commandTpl: "flux diff ks podinfo --path ./kustomize --github-ref {{ .HTMLURL }} " -``` - -Don't forget to bind the plugin to one of the channels. diff --git a/versioned_docs/version-1.9/usage/executor/helm.md b/versioned_docs/version-1.9/usage/executor/helm.md deleted file mode 100644 index f86d3db9..00000000 --- a/versioned_docs/version-1.9/usage/executor/helm.md +++ /dev/null @@ -1,70 +0,0 @@ ---- -id: helm -title: "Helm" -sidebar_position: 3 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube allows you to execute `helm` commands on your Kubernetes cluster. By default, `helm` command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/helm.md#enabling-plugin) section from the `helm` configuration documentation. - -To execute `helm` commands, send message in the following format in the channel where Botkube is already added: - -``` -@Botkube helm [command] [flags] -``` - -At least one `helm` executor needs to be enabled and bound to a given channel. - -:::caution -Using the interactive filter input field causes the Helm command to be re-executed. Be careful when using it for read-write commands. - -![Interactive Helm install filtering](./assets/helm-install-filter.png) - -This issue is tracked in [botkube#907](https://github.com/kubeshop/botkube/issues/907). -::: - -## Supported commands - -The Helm executor plugin has the exact same syntax as the Helm CLI. However, not all commands and flags are supported. If an unsupported flag is specified, you will get a dedicated error, e.g: - -``` -The "--wait" flag is not supported by the Botkube Helm plugin. Please remove it. -``` - -Additionally, the following flag syntax is not supported: - -- No whitespace between short flag name and its value. Instead of `-oyaml`, use `-o yaml`. -- Merging multiple short flags together. Instead of `-Aa`, use `-A -a`. - -### Read-only commands - -List of the read-only commands: - -- `@Botkube helm help` - shows the general Helm plugin help message. -- `@Botkube helm list` - lists all releases on cluster where Botkube is installed. - - The `--filter` flag is reserved by Botkube. As a result, to use the Helm filter functionality use `-f` instead, e.g. `helm list -f 'ara[a-z]+'`. -- `@Botkube helm status` - displays the status of the named release. -- `@Botkube helm version` - shows the version of the Helm CLI used by this Botkube plugin. - -### Read-write commands - -For the read-write commands the Botkube RBAC needs to be adjusted. For more information, see the [**Enabling plugin**](../../configuration/executor/helm.md#enabling-plugin) section. - -List of the read-write commands: - -- `@Botkube helm rollback` - rolls back a given release to a previous revision. -- `@Botkube helm test` - runs tests for a given release. -- `@Botkube helm uninstall` - uninstalls a given release. -- `@Botkube helm upgrade` - upgrades a given release. -- `@Botkube helm install` - installs a given chart to cluster where Botkube is installed. There are two different ways you to install a Helm chart: - - By absolute URL: `helm install mynginx https://example.com/charts/nginx-1.2.3.tgz` - - By chart reference and repository URL: `helm install --repo https://example.com/charts/ mynginx nginx` diff --git a/versioned_docs/version-1.9/usage/executor/index.md b/versioned_docs/version-1.9/usage/executor/index.md deleted file mode 100644 index b4f7614c..00000000 --- a/versioned_docs/version-1.9/usage/executor/index.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -id: executor -title: "Executor" -sidebar_position: 1 ---- - -While deploying Botkube, you can specify which [executors](../../configuration/executor) you want to enable. - -To check which executors are enabled, and get the aliases configured for them, run `@Botkube list executors`. - -## Aliases - -Alias is a shortcut for a longer command or just a part of it. It can be defined for all commands, including executor plugins and built-in Botkube commands. When you use an alias, the command is replaced with the underlying command before executing it. For example, `@Botkube k get pods` is replaced with `@Botkube kubectl get pods` before executing it. - -Once you configured aliases, you can use them interchangeably with a full command. For example: - -- `k` as `kubectl`, -- `kgp` as `kubectl get pods`, -- `kgpa` as `kubectl get pods -A`, -- `hh` as `helm history`, -- `a` as `list actions`, the built-in Botkube command, - -and so on. Your imagination is the limit! - -Aliases are defined globally for the whole Botkube installation. To see which aliases are available for current conversation, run `@Botkube list aliases`. - -To learn how to configure aliases and see the default configuration, see the [Alias](../../configuration/alias.md) section. - -## Specify cluster name - -:::warning -Multi-cluster approach is supported only for the Mattermost and Discord integrations. Slack and Microsoft Teams integrations require separate Slack or Microsoft Teams apps for each Botkube installation. -::: - -If you have installed Botkube backend on multiple clusters, you can pass `--cluster-name` flag to execute kubectl command on specific cluster. - -To get the list of all clusters configured in botkube, you can use the ping command. - -For cluster-specific response, use `--cluster-name` flag to specify the cluster's name on which command needs to be executed. -Use of this flag allows you to get response from any channel or group where Botkube is added. -The flag is ignored in notifier commands as they can be executed from the configured channel only. - -## Filtering text output - -Use the `--filter` flag to filter the output of Botkube executor commands. This returns any lines matching the flag's provided value. - -The `--filter` flag uses simple string matching. And, only works for Botkube executor commands that return text output, e.g. `kubectl` or `list executors` commands. - -### Filtering `kubectl` output - -![flag_filter_kubectl_get_nodes](../assets/flag_filter_kubectl_get_nodes.png) -![flag_filter_kubectl_logs](../assets/flag_filter_kubectl_logs.png) diff --git a/versioned_docs/version-1.9/usage/executor/kubectl.md b/versioned_docs/version-1.9/usage/executor/kubectl.md deleted file mode 100644 index 265f643c..00000000 --- a/versioned_docs/version-1.9/usage/executor/kubectl.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: kubectl -title: "Kubectl" -sidebar_position: 2 ---- - -Botkube allows you to execute `kubectl` commands on your Kubernetes cluster. By default, kubectl command execution is disabled. See the [**Enabling plugin**](../../configuration/executor/kubectl.md#enabling-plugin) section from the `kubectl` configuration documentation. - -To execute the `kubectl` commands, send message in following format in the channel where Botkube is already added: - -``` -@Botkube kubectl [verb] [resource] [flags] -``` - -By default, `k` and `kc` are configured as aliases for the `kubectl` command. You can use them on par with the `kubectl` command. To read more about aliases configuration, see the [Alias](../../configuration/alias.md) section. - -This command needs to be executed from configured channel. - -## Interactive kubectl commands builder - -Use the interactive `kubectl` command builder to construct a `kubectl` command just by selecting items from dropdowns. This is especially useful on mobile when typing the command is harder. - -The builder includes a resource name dropdown list. This is pre-populated with all the relevant resource names. It's great for discovering resources with the option to select them. E.g. Just grab a Pod name without needing to type or copy-and-paste. - -To start the interactive `kubectl` command builder, run `@Botkube kubectl` from the configured channel where Botkube is added. -You can also use any of the [configured aliases](../../configuration/alias.md) - for example, the default `k` one, as illustrated below: - -![kubectl command builder](./assets/kc-cmd-builder.gif) - -### Limitations - -Keep in mind that the interactive command builder may not support all the commands that you can run just by typing them directly in a chat window. The following policies are applied: - -- Under verbs' dropdown, we display verbs that are defined under the `interactiveBuilder.allowed.verbs` configuration. - :::tip - The default verbs for the `kubectl` plugin found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - If you ServiceAccount allow running other actions such as `delete`, you can add them directly under [`interactiveBuilder.allowed.verbs`](../../configuration/executor/kubectl.md#configuration-syntax). - ::: - -- Under resources' dropdown, we display resources that are defined under the `interactiveBuilder.allowed.resources` configuration and are allowed for already selected verb. For example, for the `logs` verb we display only `pods`, `statefulsets`, `deployments`, and `daemonsets`. - :::tip - The default resources for the `kubectl` plugin found in the [values.yaml](https://github.com/kubeshop/botkube/blob/main/helm/botkube/values.yaml) file. - - If you ServiceAccount allow access to more resources, you can add them directly under [`interactiveBuilder.allowed.resources`](../../configuration/executor/kubectl.md#configuration-syntax). - ::: - -- For resources that are namespace-scoped, under namespaces' dropdown, we display `interactiveBuilder.allowed.namespaces` if defined. If static namespaces are not specified, plugin needs to have access to fetch all Namespaces, otherwise Namespace dropdown won't be visible at all. - -- The `kubectl` command preview is displayed only if the command that you built is valid, and you have permission to run it. diff --git a/versioned_docs/version-1.9/usage/index.md b/versioned_docs/version-1.9/usage/index.md deleted file mode 100644 index d226cf77..00000000 --- a/versioned_docs/version-1.9/usage/index.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -id: usage -title: "Usage" -sidebar_position: 4 ---- - -# Usage - -Botkube allows you to monitor your Kubernetes cluster, as well as debug and troubleshoot your workloads. - -## See all available commands - -Run `@Botkube help` to find information about the supported commands. - -## Check Botkube status - -Run `@Botkube ping` to the channel where Botkube is added. The Botkube will respond you with the **pong** message from all the configured clusters. - -For [multi-cluster configuration](./executor/index.md#specify-cluster-name), use the `--cluster-name` flag to get response from the cluster mentioned in the flag. Else check the deployment in Kubernetes cluster in the **botkube** namespace. diff --git a/versioned_docs/version-1.9/usage/interactive-output-filtering.md b/versioned_docs/version-1.9/usage/interactive-output-filtering.md deleted file mode 100644 index ba96ae2f..00000000 --- a/versioned_docs/version-1.9/usage/interactive-output-filtering.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -id: interactive-output-filtering -title: "Interactive output filtering" -sidebar_position: 4 ---- - -:::info -Interactive output filtering is only available for the [Slack integration](../installation/slack/index.md) that supports interactive messages. -::: - -:::caution -Using the interactive filter input field causes the command to be re-executed. Be careful when using it for read-write commands. -This issue is tracked in [botkube#907](https://github.com/kubeshop/botkube/issues/907). -::: - -Sometimes you can get long response from a certain command and you may want to filter that to see a subset of the actual result. -For each communication platform, you can use the `--filter` flag at the end of your command. To learn more, see the [Flags](executor/index.md#filtering-kubectl-output) section. - -If you use the [Slack integration](../installation/slack/index.md) that supports interactive messages, there is another option to handle that: interactive output filtering. -Interactivity is achieved via an input action text box where you can add your filter criteria as text and press the **Enter** button. - -### Long response filtering - -Output Filter input text box will be attached to your command response if response has more than 15 lines. Let's see an example for this situation. - -1. List pods with `@Botkube kubectl get pods -n kube-system` - ![metrics_pods](assets/output-filtering-get-pods-metrics.png) -2. Let's check the logs of `metrics-server` with `@Botkube kubectl logs -f metrics-server-7cd5fcb6b7-hzvq8 -n kube-system` - ![metrics_logs](assets/output-filtering-metrics-logs.png) -3. Notice that Filter Output is attached to response. Type `RequestHeaderAuthRequestController` to filter and press `Enter`. - ![metrics_filter_logs](assets/output-filtering-metrics-logs-filter.png) - -## Attachment response filtering - -Command response is uploaded as text file once the actual size of response message reaches the limit of messaging platform. Let's take a look how Filter Output behaves for this situation. - -1. List the pods with `@Botkube kubectlc get pods -n kube-system` - ![get_pods](assets/output-filtering-get-pods.png) -2. Let's check the logs of Traefik with command `@Botkube kubectl logs -f traefik-df4ff85d6-f2mkz -n kube-system`. Notice that, you might have different pod list, so please select a suitable one for your case. - ![pod_logs](assets/output-filtering-get-pods.png) -3. Since the response is big, it is uploaded as file and you can realize a reply thread. Please expand it to see filter output. -4. Assume we want to see log lines only containing `Configuration` word. Type `Configuration` in the Filter Output input box and click enter. You will see filtered result as a response. - ![filter_response](assets/output-filtering-filter-response.png) diff --git a/versioned_docs/version-1.9/usage/source/argocd.md b/versioned_docs/version-1.9/usage/source/argocd.md deleted file mode 100644 index 44254265..00000000 --- a/versioned_docs/version-1.9/usage/source/argocd.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -id: argocd -title: ArgoCD -sidebar_position: 5 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube allows you to consume ArgoCD events on your Kubernetes cluster. By default, `argocd` plugin is disabled. See the [**Enabling source**](../../configuration/source/argocd#enabling-plugin) section from the `argocd` configuration documentation. - -Once it is enabled, the ArgoCD plugin will configure ArgoCD notifications so that Botkube receives them on its incoming webhook. Then, Botkube will send them to configured platforms as shown below. - -![ArgoCD events](./assets/argocd-events.png) - -## Interactive events - -For platforms that support interactivity, such as Slack and Microsoft Teams, Botkube sends interactive messages for ArgoCD events, that allow you to perform actions on the event. By default, the following actions are supported: - -- Run commands on the Application: - - `get` - - `describe` -- View the Application in the ArgoCD UI -- Open the source repository in the browser - -Interactive buttons and commands can be configured. See the [Configuration](../../configuration/source/argocd.md) document for more details. diff --git a/versioned_docs/version-1.9/usage/source/assets/argocd-events.png b/versioned_docs/version-1.9/usage/source/assets/argocd-events.png deleted file mode 100644 index 11447ddb..00000000 Binary files a/versioned_docs/version-1.9/usage/source/assets/argocd-events.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/source/assets/keptn-events.png b/versioned_docs/version-1.9/usage/source/assets/keptn-events.png deleted file mode 100644 index 755dbf69..00000000 Binary files a/versioned_docs/version-1.9/usage/source/assets/keptn-events.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/source/assets/pod-created.png b/versioned_docs/version-1.9/usage/source/assets/pod-created.png deleted file mode 100644 index cd8acde7..00000000 Binary files a/versioned_docs/version-1.9/usage/source/assets/pod-created.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/source/assets/prometheus-alerts.png b/versioned_docs/version-1.9/usage/source/assets/prometheus-alerts.png deleted file mode 100644 index 0fa8fef5..00000000 Binary files a/versioned_docs/version-1.9/usage/source/assets/prometheus-alerts.png and /dev/null differ diff --git a/versioned_docs/version-1.9/usage/source/index.md b/versioned_docs/version-1.9/usage/source/index.md deleted file mode 100644 index 206b1667..00000000 --- a/versioned_docs/version-1.9/usage/source/index.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -id: source -title: "Source" -sidebar_position: 1 ---- - -While deploying Botkube, you can specify which [sources](../../configuration/source) you want to enable. - -To check which sources are enabled, run `@Botkube list sources` diff --git a/versioned_docs/version-1.9/usage/source/keptn.md b/versioned_docs/version-1.9/usage/source/keptn.md deleted file mode 100644 index 65bb93ca..00000000 --- a/versioned_docs/version-1.9/usage/source/keptn.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -id: keptn -title: "Keptn" -sidebar_position: 4 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube allows you to consume `keptn` events on your Kubernetes cluster. By default, `keptn` plugin is disabled. See the [**Enabling plugin**](../../configuration/source/keptn#enabling-plugin) section from the `keptn` configuration documentation. - -Once it is enabled, Botkube Keptn plugin will consume Keptn events and send them to configured platforms as shown below. - -![Keptn Events](./assets/keptn-events.png) diff --git a/versioned_docs/version-1.9/usage/source/kubernetes.md b/versioned_docs/version-1.9/usage/source/kubernetes.md deleted file mode 100644 index 57feab7e..00000000 --- a/versioned_docs/version-1.9/usage/source/kubernetes.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -id: kubernetes -title: "Kubernetes" -sidebar_position: 2 ---- - -Botkube allows you to consume `kubernetes` events on your Kubernetes cluster. By default, `kubernetes` plugin is disabled. See the [**Enabling source**](../../configuration/source/kubernetes#enabling-plugin) section from the `kubernetes` configuration documentation. - -Once it is enabled, Botkube Kubernetes plugin will consume Kubernetes events and send them to configured platforms as shown below. - -![Pod Created](./assets/pod-created.png) diff --git a/versioned_docs/version-1.9/usage/source/prometheus.md b/versioned_docs/version-1.9/usage/source/prometheus.md deleted file mode 100644 index e8f61af7..00000000 --- a/versioned_docs/version-1.9/usage/source/prometheus.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -id: prometheus -title: "Prometheus" -sidebar_position: 3 ---- - -:::info - -**This plugin is available as a part of the Botkube Cloud offering.** - -Botkube is introducing new plugins with advanced functionality that will be part of the Botkube Team and Enterprise packages. These advanced plugins require cloud services provided by Botkube and are not part of the Botkube open source software. - -As part of this change, some of the existing Botkube plugins are being moved to a new repository. This repository requires authentication with a Botkube account. To continue using these Botkube plugins, create an account at https://app.botkube.io/ and configure a Botkube instance, or [migrate an existing installation with the Botkube CLI](../../cli/migrate.md). - -::: - -Botkube allows you to consume `prometheus` alerts on your Kubernetes cluster. By default, `prometheus` plugin is disabled. See the [**Enabling plugin**](../../configuration/source/prometheus#enabling-plugin) section from the `prometheus` configuration documentation. - -Once it is enabled, Botkube Prometheus plugin will consume Prometheus alerts and send them to configured platforms as shown below. - -![Prometheus Alerts](./assets/prometheus-alerts.png) diff --git a/versions-archived.json b/versions-archived.json index 4444d89b..fad22fec 100644 --- a/versions-archived.json +++ b/versions-archived.json @@ -1,4 +1,8 @@ { + "1.10": "https://cdf5286a.botkube-docs-58l.pages.dev/1.10/", + "1.9": "https://cdf5286a.botkube-docs-58l.pages.dev/1.9/", + "1.8": "https://cdf5286a.botkube-docs-58l.pages.dev/1.8/", + "1.7": "https://cdf5286a.botkube-docs-58l.pages.dev/1.7/", "1.6": "https://969c27c7.botkube-docs-58l.pages.dev/1.6/", "1.5": "https://969c27c7.botkube-docs-58l.pages.dev/1.5/", "1.4": "https://969c27c7.botkube-docs-58l.pages.dev/1.4/", diff --git a/versions.json b/versions.json index a4d428db..216138f2 100644 --- a/versions.json +++ b/versions.json @@ -1 +1 @@ -["1.13", "1.12", "1.11", "1.10", "1.9", "1.8", "1.7"] +["1.13", "1.12", "1.11"]