https://github.com/hajowieland/kubewatch-python
kubewatch clone written in Python with Slack support
https://github.com/hajowieland/kubewatch-python
asyncio kubernetes python python3 slack
Last synced: 2 months ago
JSON representation
kubewatch clone written in Python with Slack support
- Host: GitHub
- URL: https://github.com/hajowieland/kubewatch-python
- Owner: hajowieland
- License: gpl-3.0
- Created: 2019-06-02T10:00:43.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-22T22:31:01.000Z (about 3 years ago)
- Last Synced: 2026-03-02T01:39:58.882Z (4 months ago)
- Topics: asyncio, kubernetes, python, python3, slack
- Language: Python
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kubewatch-python
A kubewatch-like application written in Python with Slack support.
Can be deployed with the Helm chart in the charts/ subfolder.
## Features
* Python asyncio
* Slack _"ChatOps"_ alerts
* Prometheus Metrics endpoint
* Helm Chart
## Requirements
* Python >= 3.7
### pip
* [asyncio](https://pypi.org/project/asyncio/)
* [requests](https://pypi.org/project/requests/)
* [kubernetes_asyncio](https://pypi.org/project/kubernetes_asyncio/)
* [prometheus_client](https://pypi.org/project/prometheus_client/)
### ENVVARs
* `SLACK_WEBHOOK` _(Slack Webook URL)_
* `CLUSTER` _(cluster name to show in Slack messages)_
* Custom Slack emoji `:k8s:` (Kubernetes icon)
You can configure the below resources via envvars with the following convention:
* Prefixed with *ENABLE_*
* Plural form of K8s resource
* Value: *true* or *false*
#### Example
**ENABLE_DAEMONSETS** or **ENABLE_INGRESSES**
## Watchable Resources
* ClusterRole
* ClusterRoleBinding
* ConfigMap _(namespaced, defaults to *default* namespace)_
* CronJob
* DaemonSet
* Deployment
* Ingress
* Job
* LimitRange
* NetworkPolicy
* Node
* PersistentVolume
* PersistentVolumeClaim
* Pod
* PodDisruptionBudget
* PodTemplate
* PodSecurityPolicy
* ReplicaSet
* ResourceQuota
* Role
* RoleBinding
* Secret
* Service
* ServiceAccount
* StatefulSet
## Prometheus
The Prometheus metrics endpoint is available at Port *8000*.
In addition to the basic Python metrics, there are these two which can be scraped:
* success_webhooks = Counter of how many times the Slack Webhook was successfully triggered
* failed_webhooks = Counter of how many times the Slack Webhook failed
## Notes
The first run will give you some history of events