Skip to content

Marta is a Slack chatbot that will tell you the status, description and logs of a pod in you k8s cluster

Notifications You must be signed in to change notification settings

matiasozdy/marta

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Marta Chatbot

Description

Marta is a slack chatbot that will fetch some readonly values from the Kubernetes api from inside the cluster.

Creating bot in slack

Please refer to https://get.slack.help/hc/en-us/articles/115005265703-Create-a-bot-for-your-workspace

Installing roles

kubectl create -f k8s/roles.yaml

Generating secrets

TODO Create a secret for the SLACK_BOT_TOKEN inside k8s.

echo -n 'SLACK_TOKEN' | base64

with the output of that command, replace in the secret.yaml the correct value for SLACK_BOT_TOKEN.

...
data:
  SLACK_BOT_TOKEN: REPLACEME
...

then run

kubectl create -f k8s/secret.yaml

Running it

kubectl create -f k8s/deployment.yaml k8s/service.yaml

Running it locally with virtualenv

Make sure you have python installed, then:

EXPORT SLACK_BOT_TOKEN=TOKEN
EXPORT ENV=dev #To use local .kube/config file.
virtualenv venv/
source venv/bin/activate
pip install -r requirements.txt
python marta.py

About

Marta is a Slack chatbot that will tell you the status, description and logs of a pod in you k8s cluster

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published