{"id":28200982,"url":"https://github.com/payu/kubeobserver","last_synced_at":"2025-10-12T16:33:34.827Z","repository":{"id":53732180,"uuid":"260684128","full_name":"PayU/kubeobserver","owner":"PayU","description":"Observe Kubernetes events, collect metrics \u0026 trigger endpoint receivers ","archived":false,"fork":false,"pushed_at":"2023-02-15T03:35:08.000Z","size":298,"stargazers_count":21,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-06-12T18:32:23.535Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PayU.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-02T12:38:52.000Z","updated_at":"2023-07-10T16:50:04.000Z","dependencies_parsed_at":"2025-06-12T18:32:26.288Z","dependency_job_id":"d18256fc-8da6-4e5e-8b12-76a6d76b06e5","html_url":"https://github.com/PayU/kubeobserver","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/PayU/kubeobserver","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayU%2Fkubeobserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayU%2Fkubeobserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayU%2Fkubeobserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayU%2Fkubeobserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PayU","download_url":"https://codeload.github.com/PayU/kubeobserver/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PayU%2Fkubeobserver/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260937871,"owners_count":23085763,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-16T22:14:47.561Z","updated_at":"2025-10-12T16:33:34.820Z","avatar_url":"https://github.com/PayU.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![logo](kubeobserver_logo.png)\n\nObserve Kubernetes events, collect metrics \u0026 trigger endpoint receivers\n\n## Run Locally\n\n```console\n# First, download and install kubewatch using go package installer\n$ go get -u -v github.com/PayU/kubeobserver\n$ cd ~/go/src/github.com/PayU/kubeobserver\n```\n\n#### Build from Scratch\n\n```bash\n$ make build\n$ ./kubeobserver\n```\n\n#### Run local inside docker\n```bash\n$ docker build .\n$ docker run -v \u003clocal_path_to_kube_config\u003e:/home -e PORT=8000 -e K8S_CLUSTER_NAME=cluster-name -e K8S_CONF_FILE_PATH=/home/config -p 8000:8000 \u003cdocker_image_id\u003e\n```\n\n## Run Using Offical Docker\n\n```bash\ndocker run zooz/kubeobserver:1.2.0\n```\n\n## Configuration\n\n### Kubeobserver Configuration\n\nKubeobserver is configurable through environment variables.\n\n| Variable name | Mandatory | Description | Default |\n| --- | --- | --- | --- |\n| K8S_CLUSTER_NAME | true | the cluster name kubeobserver deployed to (for example: \"dev-cluster\") | - |\n| EXCLUDE_POD_NAME_PATTERNS | false | a comma separated string of values to be ignored by the podWatcher. Any pod that has one of these values in its name will be ignored (for example, when EXCLUDE_POD_NAME_PATTERNS=\"runner\" pod name \"ruuner-353332dsdsa\" will be ignored | empty-string |\n| SLACK_CHANNEL_NAMES | false | a comma separated string of slack channel IDs for slack receiver to publish events to | empty-string |\n| SLACK_TOKEN | false | slack bot app token for slack recevier | empty-string |\n| K8S_CONF_FILE_PATH | false | outside of a k8s cluster\", \"a k8s config file | empty-string |\n| DEFAULT_RECEIVER | false | name of the default recevier for all controller watchers | \"slack\" |\n| WATCHER_THREADS | false | number of goroutines for each controller watcher | 10 |\n| PORT | true | http server port kubeobserver listens on | - |\n\n### Client settings\n\nWhen kubeobserver is running inside k8s, client (pods, config-maps and so on) can define what to watch and which receviers they want to use.\u003cbr\u003e\nThe configuration is made by using k8s controller annotations under the root template, for example:\n\n```bash\n...\n template:\n    metadata:\n      labels:\n        app: {{ template \"name\" . }}\n    annotations:\n        pod-init-container-kubeobserver.io/watch: true\n        kubeobserver.io/receivers \"slack,alert-manager\"\n...        \n```\n\n\u003cb\u003eNote: if annotations are not defined, default values will be used based on kubeobserver configuration\u003c/b\u003e\u003cbr\u003e\n\n\n| Controller name | Annotation | Value type | Description | Default |\n| --- | --- | --- | --- | --- |\n| pod-watcher | pod-kubeobserver.io/ignore | boolean | pod watcher will ignore all the pod events | false |\n| pod-watcher | pod-init-container-kubeobserver.io/watch | boolean | pod watcher will trigger events for init containers related to the pod | false |\n| *All* | kubeobserver.io/receivers | comma separated string | a comma separated string of recevier names that the events will be publish to. unknown names will be ignored | default recevier is defined in kubeobserver using DEFAULT_RECEIVER env variable |\n| pod-watcher | pod-update-kubeobserver.io/watch | boolean | pod watcher will notify on 'Update' events if set to true. 'Add' and 'Delete' events always notified | false |\n| pod-watcher | pod-watch-kubeobserver.io/slack_users_id | comma separated string | comma separated string of slack users IDs. These users will be mentioned on Kubeobserver's slack message if and when crashLoopBack events will occur | \"\" |\n| hpa-watcher | hpa-watch-kubeobserver.io/slack_users_id | comma separated string | comma separated string of slack users IDs. These users will be mentioned on Kubeobserver's slack message if and when Horizontal Pod Autoscaler events will occur | \"\" |\n\n## Receivers\n\n- \u003cb\u003eSlack\u003c/b\u003e\n\n    In order to take advantage of all the possibilities of the slack receiver, make sure your slack token has the following permissions:\u003cbr\u003e\n    \n    ```console\n    chat:write\n    Send messages as @kubeobserver\n\n    chat:write.customize\n    Send messages as @kubeobserver with a customized username and avatar\n\n    groups:write\n    Manage private channels that kubeobserver has been added to and create new ones\n\n    incoming-webhook\n    Post messages to specific channels in Slack\n\n    users.profile:read\n    View profile details about people in the workspace\n\n    users:read\n    View people in the workspace\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpayu%2Fkubeobserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpayu%2Fkubeobserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpayu%2Fkubeobserver/lists"}