Chowkidar, an Urdu word, is used for Watchman in Pakistan. This Chowkidar will watch over your cluster, looking for any anomaly in the cluster and will act as you want it to.
We would like to watch for relevant events happening inside kubernetes and then perform actions depending upon the criteria. e.g. I would like to get a slack notification when a pod is submitted without requests & limits.
Chowkidar allows you to have multiple controllers that will continuously watch types in all the namespaces and automatically perform any actions given in the yaml file. With this, you can easily check for any criteria on your Pods/other types and take corresponding actions.
You have to first clone or download the repository contents. The kubernetes deployment and files are provided inside deployments/kubernetes/manifests
folder.
First of all you need to modify configs/config.yaml
file. Following are the available options that you can use to customize the controllers:
Key | Description |
---|---|
type | The type of Resource you want to monitor, like Pods, Deployments, etc |
watchcriterion | The criterion for which you want to take actions for the controller e.g. ResourceExists,etc |
actions | The Array of actions that you want to take, e.g. send message to Slack, etc |
Currently we are supporting,
- Pods
We will be adding support for other Types as well in the future
Currently we are supporting following Criterion
- resourceExists: It will make sure Pods should have Resources and if not found, it will take action
We will be adding support for other Criterion as well in the future
Currently we are supporting following Actions with their Parameters,
- Slack: you need to provide
token
andChannel Name
as Parameters in the yaml file
We will be adding support for other Actions as well in the future
You can deploy Chowkidar by running the following kubectl commands:
kubectl apply -f configmap.yaml -n <namespace>
kubectl apply -f rbac.yaml -n <namespace>
kubectl apply -f deployment.yaml -n <namespace>
Or alternatively if you configured helm
on your cluster, you can deploy Chowkidar via helm chart located under deployments/kubernetes/chart/Chowkidar
folder.
Got a question? File a GitHub issue, or send us an email.
Join and talk to us on the #tools-imc channel for discussing Chowkidar
Please use the issue tracker to report any bugs or file feature requests.
PRs are welcome. In general, we follow the "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
View our closed Pull Requests.
Apache2 © Stakater
Chowkidar
is maintained by Stakater. Like it? Please let us know at hello@stakater.com
See our other projects or contact us in case of professional services and queries on hello@stakater.com