BotKube backend reads configurations from config.yaml file placed at CONFIG_PATH
The configuration file contains,
## Resources you want to watch resources: - name: NAME_OF_THE_RESOURCE # Name of the resources e.g pods, deployments, ingresses, etc. (Resource name must be in plural form) namespaces: # List of namespaces, "all" will watch all the namespaces - all events: # List of lifecycle events you want to receive, e.g create, update, delete, error OR all - create - delete - error - name: pods namespaces: - kube-system events: - create - delete - error # Check true if you want to receive recommendations # about the best practices for the created resource recommendations: true # Communcation mediums configuration communications: # Settings for Slack slack: enabled: false channel: 'SLACK_CHANNEL' # Slack channel name without '#' prefix where you have added BotKube and want to receive notifications in token: 'SLACK_API_TOKEN' # Settings for Mattermost mattermost: enabled: false url: 'MATTERMOST_SERVER_URL' # URL where Mattermost is running. e.g https://example.com:9243 token: 'MATTERMOST_TOKEN' # Personal Access token generated by BotKube user team: 'MATTERMOST_TEAM' # Mattermost Team to configure with BotKube channel: 'MATTERMOST_CHANNEL' # Mattermost Channel for receiving BotKube alerts # Settings for ELS elasticsearch: enabled: false server: 'ELASTICSEARCH_ADDRESS' # e.g https://example.com:9243 username: 'ELASTICSEARCH_USERNAME' password: 'ELASTICSEARCH_PASSWORD' # ELS index settings index: name: botkube type: botkube-event shards: 1 replicas: 0 # Setting to support multiple clusters settings: # Cluster name to differentiate incoming messages clustername: not-configured # Set true to enable kubectl commands execution allowkubectl: false # Set false to disable upgrade notification upgradeNotifier: true
The default configuration can be found at:
For all-in-one deployment spec: https://github.com/infracloudio/botkube/blob/master/deploy-all-in-one.yaml
As of now, BotKube can watch following types of resources:
You can update the configuration and use
helm upgrade to update configuration values for the BotKube.
You can also change values directly in ConfigMap - which is not reccomended but is great for quick experimentation. You have to edit the configmap which will also restart the BotKube pod to update mounted configuration in the pod.
$ kubectl edit configmap botkube-configmap -n botkube
This command will open configmap specs in an editor. Do the required changes, save and exit. The BotKube pod will automatically restart to have these configuration in effect.