2019-04-24 10:44:40 +00:00
---
2020-04-18 13:57:31 +00:00
apiVersion : v1
kind : Namespace
metadata :
name : botkube
---
2019-04-24 10:44:40 +00:00
# Configmap
apiVersion : v1
kind : ConfigMap
metadata :
name : botkube-configmap
2020-04-18 13:57:31 +00:00
namespace : botkube
2019-04-24 10:44:40 +00:00
labels :
app : botkube
data :
2020-04-18 13:57:31 +00:00
resource_config.yaml : |
2019-04-24 10:44:40 +00:00
## Resources you want to watch
resources :
2020-01-08 06:32:40 +00:00
- name : pod # Name of the resources e.g pod, deployment, ingress, etc. (Resource name must be in singular form)
2019-08-20 07:19:27 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore: # List of namespaces to be ignored (omitempty), used only with include : all
2019-11-12 06:10:11 +00:00
- # example : include [all], ignore [x,y,z]
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-04-24 10:44:40 +00:00
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : service
2019-04-24 10:44:40 +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-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : deployment
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
2019-08-18 16:09:06 +00:00
- update
2019-04-24 10:44:40 +00:00
- delete
2019-06-25 13:20:11 +00:00
- error
2020-01-08 06:32:40 +00:00
updateSetting :
includeDiff : true
fields :
- spec.template.spec.containers[*].image
- status.availableReplicas
2019-08-09 09:24:10 +00:00
- name : statefulset
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
2019-08-18 16:09:06 +00:00
- update
2019-04-24 10:44:40 +00:00
- delete
2019-06-25 13:20:11 +00:00
- error
2020-01-08 06:32:40 +00:00
updateSetting :
includeDiff : true
fields :
- spec.template.spec.containers[*].image
- status.readyReplicas
2019-08-09 09:24:10 +00:00
- name : ingress
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : node
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : namespace
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : persistentvolume
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : persistentvolumeclaim
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : configmap
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : daemonset
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
2019-08-20 07:19:27 +00:00
- update
2020-01-08 06:32:40 +00:00
- delete
2019-06-25 13:20:11 +00:00
- error
2020-01-08 06:32:40 +00:00
updateSetting :
includeDiff : true
fields :
- spec.template.spec.containers[*].image
- status.numberReady
2019-08-09 09:24:10 +00:00
- name : job
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
2019-08-09 09:24:10 +00:00
- update
2019-04-24 10:44:40 +00:00
- delete
2019-06-25 13:20:11 +00:00
- error
2020-01-08 06:32:40 +00:00
updateSetting :
includeDiff : true
fields :
- spec.template.spec.containers[*].image
- status.conditions[*].type
2019-08-09 09:24:10 +00:00
- name : role
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : rolebinding
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : clusterrole
namespaces :
2019-10-11 09:27:47 +00:00
include :
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-08-09 09:24:10 +00:00
- name : clusterrolebinding
2019-04-24 10:44:40 +00:00
namespaces :
2019-11-12 06:10:11 +00:00
include :
2019-08-20 07:19:27 +00:00
- all
ignore :
-
2019-04-24 10:44:40 +00:00
events :
- create
- delete
2019-06-25 13:20:11 +00:00
- error
2019-11-12 06:10:11 +00:00
2019-04-24 10:44:40 +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-04-24 10:44:40 +00:00
communications :
# Settings for Slack
slack :
enabled : false
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-04-24 10:44:40 +00:00
# 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
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-04-24 10:44:40 +00:00
# Settings for ELS
elasticsearch :
enable : 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
2019-11-12 06:10:11 +00:00
2019-09-01 15:55:07 +00:00
# Settings for Webhook
webhook :
enabled : false
url : 'WEBHOOK_URL' # e.g https://example.com:80
2019-04-24 10:44:40 +00:00
---
# serviceaccount
apiVersion : v1
kind : ServiceAccount
metadata :
name : botkube-sa
2020-04-18 13:57:31 +00:00
namespace : botkube
2019-04-24 10:44:40 +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
---
2019-11-12 06:10:11 +00:00
# Certificate for Mattermost integration: https://www.botkube.io/installation/mattermost/
2019-04-24 10:44:40 +00:00
apiVersion : v1
kind : Secret
metadata :
2019-12-22 13:01:49 +00:00
name : botkube-certificate-secret
2019-04-24 10:44:40 +00:00
labels :
2019-11-12 06:10:11 +00:00
app : botkube
2019-04-24 10:44:40 +00:00
data :
2019-11-12 06:10:11 +00:00
ca-certificates.crt : ENCODED_CERTIFICATE
2019-04-24 10:44:40 +00:00
---
# deployment
2019-10-10 09:58:47 +00:00
apiVersion : apps/v1
2019-04-24 10:44:40 +00:00
kind : Deployment
metadata :
name : botkube
2020-04-18 13:57:31 +00:00
namespace : botkube
2019-04-24 10:44:40 +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
2020-04-27 04:28:06 +00:00
image : "infracloudio/botkube:v0.10.0"
2019-04-24 10:44:40 +00:00
imagePullPolicy : Always
volumeMounts :
- name : config-volume
mountPath : "/config"
- name : certs
mountPath : "/etc/ssl/certs"
env :
- name : CONFIG_PATH
value : "/config/"
# set one of the log levels- info, warn, debug, error, fatal, panic
- name : LOG_LEVEL
value : "info"
# set BotKube release version
- name : BOTKUBE_VERSION
2020-04-27 04:28:06 +00:00
value : v0.10.0
2019-04-24 10:44:40 +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
2019-04-24 10:44:40 +00:00
- name : certs
secret :
2019-12-22 13:01:49 +00:00
secretName : botkube-certificate-secret
2019-09-01 05:38:29 +00:00
# run as non privilaged user
securityContext :
runAsUser : 101
runAsGroup : 101