https://github.com/smallcase/cdk8s-botkube
https://github.com/smallcase/cdk8s-botkube
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/smallcase/cdk8s-botkube
- Owner: smallcase
- License: apache-2.0
- Created: 2022-04-05T10:35:49.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-05T10:41:02.000Z (almost 4 years ago)
- Last Synced: 2025-05-11T12:06:10.248Z (10 months ago)
- Language: TypeScript
- Size: 490 KB
- Stars: 1
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# CDK8S BotKube
`cdk8s-botkube` is an open-source construct library for cdk8s to deploy a configurable instance of BotKube to your Kubernetes cluster. BotKube is a messaging bot for monitoring and debugging Kubernetes clusters.
You provide the configuration for BotKube, our construct library does the rest of the magic.
[Official website](https://www.botkube.io/)
## Installation
Install using NPM:
```
npm install @smallcase/cdk8s-botkube
```
Using yarn
```
yarn add @smallcase/cdk8s-botkube
```
### Configuration Helper
| Property | Type | Default | Description |
| ------------- | ------------------------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| secretName | string | botkube-communication-secret | Your BotKube communication secret name (Read below to see how to define your secret) |
| configMapData | string | [./configmap.yaml](./configmap.yaml) | YAML formatted string defining your BotKube monitoring config (Read below to see how to define your config) |
| replicas | number | 1 | Number of pod replicas for deployment |
| nodeSelector | { [key: string]: string } | {} | Node selectors for the BotKube deployment |
| tolerations | k8s.Toleration[] | [] | Tolerations for the BotKube deployment |
## Setting Up Secrets:
Since the communication configuration contains sensitive information like webhook and application tokens we recommend you deploy the configuration as a secret.
Template:
```
apiVersion: v1
kind: Secret
metadata:
name: botkube-communication-secret
labels:
app: botkube
type: Opaque
stringData:
comm_config.yaml: |
...
```
Fill in the communication secret as per your requirements, have a look at BotKube's official documentation [here](https://www.botkube.io/configuration/#comm_configyaml-syntax) to get an idea of the syntax.
## Setting Up the Resource Config
You can customize alerts from BotKube as per your needs by tweaking its config. You can leave this field empty and a [default config](./configmap.yaml) will be added, or you can specify a custom YAML config. See resource config syntax [here](https://www.botkube.io/configuration/#resource_configyaml-syntax).
## Using the construct
Import the library in your CDK8s project and pass the necessary parameters to the construct.
Example:
```
new BotKube(this, 'botkube-default', {
secretName: 'my-secret-name',
configMapData: 'Foo',
replicas: 2
});
```