2019-01-15 09:19:12 +00:00
---
2020-04-18 13:57:31 +00:00
apiVersion : v1
kind : Namespace
metadata :
name : botkube
---
2019-01-15 09:19:12 +00:00
# Configmap
apiVersion : v1
kind : ConfigMap
metadata :
name : botkube-configmap
2020-04-18 13:57:31 +00:00
namespace : botkube
2019-01-15 09:19:12 +00:00
labels :
app : botkube
data :
2020-04-18 13:57:31 +00:00
resource_config.yaml : |
2019-03-22 07:45:56 +00:00
## Resources you want to watch
2019-01-15 09:19:12 +00:00
resources :
2020-09-07 17:28:55 +00:00
- name : v1/pods # Name of the resource. Resource name must be in group/version/resource (G/V/R) format
# resource name should be plural (e.g apps/v1/deployments, v1/pods)
namespaces : # List of namespaces, "all" will watch all the namespaces
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
2020-10-02 16:07:09 +00:00
ignore: # List of namespaces to be ignored (omitempty), used only with include : all, can contain a wildcard (*)
- # example : include [all], ignore [x,y,secret-ns-*]
2019-08-20 07:19:27 +00:00
events : # List of lifecycle events you want to receive, e.g create, update, delete, error OR all
2019-01-15 09:19:12 +00:00
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : v1/services
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
2019-11-12 06:10:11 +00:00
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : apps/v1/deployments
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
2019-08-18 16:09:06 +00:00
- update
2019-01-15 09:19:12 +00:00
- delete
2019-05-29 17:18:45 +00:00
- error
2019-12-02 16:01:15 +00:00
updateSetting :
includeDiff : true
fields :
2020-01-08 06:32:40 +00:00
- spec.template.spec.containers[*].image
- status.availableReplicas
2020-09-07 17:28:55 +00:00
- name : apps/v1/statefulsets
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
2019-08-18 16:09:06 +00:00
- update
2019-01-15 09:19:12 +00:00
- delete
2019-05-29 17:18:45 +00:00
- error
2019-12-02 16:01:15 +00:00
updateSetting :
includeDiff : true
2020-01-08 06:32:40 +00:00
fields :
- spec.template.spec.containers[*].image
- status.readyReplicas
2020-09-07 17:28:55 +00:00
- name : networking.k8s.io/v1beta1/ingresses
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : v1/nodes
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : v1/namespaces
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : v1/persistentvolumes
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : v1/persistentvolumeclaims
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : v1/configmaps
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : apps/v1/daemonsets
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
2019-08-20 07:19:27 +00:00
- update
2019-01-15 09:19:12 +00:00
- delete
2019-05-29 17:18:45 +00:00
- error
2019-12-02 16:01:15 +00:00
updateSetting :
includeDiff : true
fields :
2020-01-08 06:32:40 +00:00
- spec.template.spec.containers[*].image
- status.numberReady
2020-09-07 17:28:55 +00:00
- name : batch/v1/jobs
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
2019-08-09 09:24:10 +00:00
- update
2019-01-15 09:19:12 +00:00
- delete
2019-05-29 17:18:45 +00:00
- error
2019-12-02 16:01:15 +00:00
updateSetting :
includeDiff : true
fields :
2020-01-08 06:32:40 +00:00
- spec.template.spec.containers[*].image
- status.conditions[*].type
2020-09-07 17:28:55 +00:00
- name : rbac.authorization.k8s.io/v1/roles
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : rbac.authorization.k8s.io/v1/rolebindings
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : rbac.authorization.k8s.io/v1/clusterrolebindings
2019-08-09 09:24:10 +00:00
namespaces :
2019-10-11 09:27:47 +00:00
include :
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2020-09-07 17:28:55 +00:00
- name : rbac.authorization.k8s.io/v1/clusterroles
2019-01-15 09:19:12 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-01-15 09:19:12 +00:00
events :
- create
- delete
2019-05-29 17:18:45 +00:00
- error
2019-11-12 06:10:11 +00:00
2019-01-15 09:19:12 +00:00
# Check true if you want to receive recommendations
# about the best practices for the created resource
recommendations : true
2019-11-12 06:10:11 +00:00
2019-12-22 13:01:49 +00:00
# Setting to support multiple clusters
settings :
# Cluster name to differentiate incoming messages
clustername : not-configured
2020-05-01 13:38:10 +00:00
# Kubectl executor configs
kubectl :
# Set true to enable kubectl commands execution
enabled : false
2020-06-21 11:26:30 +00:00
commands :
# method which are allowed
verbs : [ "api-resources" , "api-versions" , "cluster-info" , "describe" , "diff" , "explain" , "get" , "logs" , "top" , "auth" ]
# resource configuration which is allowed
resources : [ "deployments" , "pods" , "namespaces" , "daemonsets" , "statefulsets" , "storageclasses" , "nodes" ]
2020-05-01 13:38:10 +00:00
# set Namespace to execute botkube kubectl commands by default
defaultNamespace : default
# Set true to enable commands execution from configured channel only
restrictAccess : false
2019-12-22 13:01:49 +00:00
# Set true to enable config watcher
configwatcher : true
# Set false to disable upgrade notification
upgradeNotifier : true
---
# secret
apiVersion : v1
kind : Secret
metadata :
name : botkube-communication-secret
2020-04-18 13:57:31 +00:00
namespace : botkube
2019-12-22 13:01:49 +00:00
labels :
app : botkube
type : Opaque
stringData :
comm_config.yaml : |
# Communication settings
2019-01-15 09:19:12 +00:00
communications :
2019-03-22 07:45:56 +00:00
# Settings for Slack
2019-01-15 09:19:12 +00:00
slack :
2019-03-14 18:46:46 +00:00
enabled : false
2019-03-22 07:45:56 +00:00
channel : 'SLACK_CHANNEL'
token : 'SLACK_API_TOKEN'
2019-07-26 06:29:15 +00:00
notiftype : short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified)
2019-11-12 06:10:11 +00:00
2019-03-14 18:46:46 +00:00
# Settings for Mattermost
mattermost :
enabled : false
2019-04-03 11:36:25 +00:00
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
2019-07-26 06:29:15 +00:00
notiftype : short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified)
2020-10-06 04:37:49 +00:00
# Settings for Discord
discord :
enabled : false
token : 'DISCORD_TOKEN' # BotKube Bot Token
botid : 'DISCORD_BOT_ID' # BotKube Application Client ID
channel : 'DISCORD_CHANNEL_ID' # Discord Channel id for receiving BotKube alerts
notiftype : short # Change notification type short/long you want to receive. notiftype is optional and Default notification type is short (if not specified)
2019-11-12 06:10:11 +00:00
2019-03-22 07:45:56 +00:00
# Settings for ELS
elasticsearch :
2020-07-02 05:50:42 +00:00
enabled : false
awsSigning :
2020-07-06 15:30:55 +00:00
enabled : false # enable awsSigning using IAM for Elastisearch hosted on AWS, if true make sure AWS environment variables are set. Refer https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-envvars.html
awsRegion : 'us-east-1' # AWS region where Elasticsearch is deployed
roleArn : '' # AWS IAM Role arn to assume for credentials, use this only if you dont want to use the EC2 instance role or not running on AWS instance
server : 'ELASTICSEARCH_ADDRESS' # e.g https://example.com:9243
username : 'ELASTICSEARCH_USERNAME' # Basic Auth
2019-03-22 07:45:56 +00:00
password : 'ELASTICSEARCH_PASSWORD'
2021-07-02 03:55:06 +00:00
skipTLSVerify : false # toggle verification of TLS certificate of the Elastic nodes. Verification is skipped when option is true. Enable to connect to clusters with self-signed certs
2019-03-22 07:45:56 +00:00
# ELS index settings
index :
name : botkube
type : botkube-event
shards : 1
replicas : 0
2020-08-11 06:12:09 +00:00
# Settings for MS Teams
teams :
enabled : false
appID : 'APPLICATION_ID'
appPassword : 'APPLICATION_PASSWORD'
notiftype : short
port : 3978
2019-09-01 15:55:07 +00:00
# Settings for Webhook
webhook :
enabled : false
url : 'WEBHOOK_URL' # e.g https://example.com:80
2019-01-15 09:19:12 +00:00
---
# serviceaccount
apiVersion : v1
kind : ServiceAccount
metadata :
name : botkube-sa
2020-04-18 13:57:31 +00:00
namespace : botkube
2019-01-15 09:19:12 +00:00
labels :
app : botkube
---
# Source: botkube/templates/clusterrole.yaml
apiVersion : rbac.authorization.k8s.io/v1
kind : ClusterRole
metadata :
name : botkube-clusterrole
labels :
app : botkube
rules :
- apiGroups : [ "*" ]
resources : [ "*" ]
verbs : [ "get" , "watch" , "list" ]
---
# clusterrolebinding
apiVersion : rbac.authorization.k8s.io/v1
kind : ClusterRoleBinding
metadata :
name : botkube-clusterrolebinding
labels :
app : botkube
roleRef :
apiGroup : rbac.authorization.k8s.io
kind : ClusterRole
name : botkube-clusterrole
subjects :
- kind : ServiceAccount
name : botkube-sa
namespace : botkube
---
# deployment
2019-10-10 09:58:47 +00:00
apiVersion : apps/v1
2019-01-15 09:19:12 +00:00
kind : Deployment
metadata :
name : botkube
2020-04-18 13:57:31 +00:00
namespace : botkube
2019-01-15 09:19:12 +00:00
labels :
component : controller
app : botkube
spec :
replicas : 1
selector :
matchLabels :
component : controller
app : botkube
template :
metadata :
labels :
component : controller
app : botkube
spec :
serviceAccountName : botkube-sa
containers :
- name : botkube
2021-07-21 05:14:22 +00:00
image : "ghcr.io/infracloudio/botkube:v0.12.1"
2021-04-15 08:57:41 +00:00
imagePullPolicy : IfNotPresent
2019-01-15 09:19:12 +00:00
volumeMounts :
- name : config-volume
mountPath : "/config"
env :
- name : CONFIG_PATH
value : "/config/"
2019-03-27 05:38:04 +00:00
# set one of the log levels- info, warn, debug, error, fatal, panic
- name : LOG_LEVEL
value : "info"
2019-01-15 09:19:12 +00:00
volumes :
- name : config-volume
2019-12-22 13:01:49 +00:00
projected :
sources :
- configMap :
name : botkube-configmap
- secret :
name : botkube-communication-secret
2020-10-01 16:52:57 +00:00
# run as non privileged user
2019-09-01 05:38:29 +00:00
securityContext :
runAsUser : 101
2019-09-30 08:26:19 +00:00
runAsGroup : 101
2020-09-26 14:19:40 +00:00
---
## Uncomment following resources for Teams support
#apiVersion: v1
#kind: Service
#metadata:
# name: botkube
# labels:
# app: botkube
#spec:
# type: ClusterIP
# ports:
# - name: "teams"
# port: 3978
# selector:
# app: botkube
#---
## Source: botkube/templates/ingress.yaml
#apiVersion: extensions/v1beta1
#kind: Ingress
#metadata:
# name: botkube
# labels:
# app: botkube
# annotations:
# kubernetes.io/ingress.class: nginx
#spec:
# tls:
# - hosts:
# - HOST
# secretName: TLS_SECRET_NAME
# rules:
# - http:
# paths:
# - path: URLPATH
# backend:
# serviceName: botkube
# servicePort: 3978
# host: HOST