Skip to content

Commit

Permalink
Apply suggestions after review
Browse files Browse the repository at this point in the history
  • Loading branch information
mszostok committed Mar 29, 2023
1 parent feebe04 commit bb0c839
Show file tree
Hide file tree
Showing 10 changed files with 144 additions and 642 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ tags
/analytics.yaml
/resource_config.yaml
/comm_config.yaml
/local_config.yaml

/bin

Expand Down
39 changes: 28 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,36 @@ For faster development, you can also build and run Botkube outside K8s cluster.
go build ./cmd/botkube/
```

2. Use templates to create configuration files:

```sh
cp global_config.yaml.tpl resource_config.yaml
cp comm_config.yaml.tpl comm_config.yaml
2. Create a local configuration file to override default values. For example, set communication credentials, specify cluster name, and disable analytics:

```yaml
cat <<EOF > local_config.yaml
communications:
default-group:
socketSlack:
enabled: true
channels:
default:
name: random
appToken: "xapp-xxxx"
botToken: "xoxb-xxxx"
configWatcher:
enabled: false
settings:
clusterName: "labs"
analytics:
# -- If true, sending anonymous analytics is disabled. To learn what date we collect,
# see [Privacy Policy](https://botkube.io/privacy#privacy-policy).
disable: true
EOF
```
Edit the newly created `resource_config.yaml` and `comm_config.yaml` files to configure resource and set communication credentials.

3. Export the path to directory of `config.yaml`
To learn more about configuration, visit https://docs.botkube.io/configuration/.
3. Export paths to configuration files. The priority will be given to the last (right-most) file specified.
```sh
export BOTKUBE_CONFIG_PATHS="$(pwd)/resource_config.yaml,$(pwd)/comm_config.yaml"
export BOTKUBE_CONFIG_PATHS="$(pwd)/helm/botkube/values.yaml,$(pwd)/local_config.yaml"
```
4. Export the path to Kubeconfig:
Expand Down Expand Up @@ -145,8 +162,8 @@ For faster development, you can also build and run Botkube outside K8s cluster.
go run test/helpers/plugin_server.go
```
> **Note**
> If Botkube runs inside the k3d cluster, export the `PLUGIN_SERVER_HOST=http://host.k3d.internal` environment variable.
> **Note**
> If Botkube runs inside the k3d cluster, export the `PLUGIN_SERVER_HOST=http://host.k3d.internal` environment variable.
2. Export Botkube plugins cache directory:
Expand Down
121 changes: 0 additions & 121 deletions comm_config.yaml.tpl

This file was deleted.

Loading

0 comments on commit bb0c839

Please sign in to comment.