{"id":13644577,"url":"https://github.com/olegsu/iris","last_synced_at":"2025-10-27T14:31:13.293Z","repository":{"id":34251501,"uuid":"143752502","full_name":"olegsu/iris","owner":"olegsu","description":"Watch on Kubernetes events, filter and send them as standard wehbook to any system","archived":false,"fork":false,"pushed_at":"2023-05-05T02:20:35.000Z","size":12672,"stargazers_count":65,"open_issues_count":7,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-02-01T06:31:44.301Z","etag":null,"topics":["codefresh","kubernetes","kubernetes-cluster","slack","webhook","webhooks"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/olegsu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-08-06T16:05:39.000Z","updated_at":"2024-10-07T22:34:54.000Z","dependencies_parsed_at":"2024-01-14T09:32:39.601Z","dependency_job_id":null,"html_url":"https://github.com/olegsu/iris","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegsu%2Firis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegsu%2Firis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegsu%2Firis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/olegsu%2Firis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/olegsu","download_url":"https://codeload.github.com/olegsu/iris/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238508834,"owners_count":19484213,"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":["codefresh","kubernetes","kubernetes-cluster","slack","webhook","webhooks"],"created_at":"2024-08-02T01:02:08.305Z","updated_at":"2025-10-27T14:31:12.883Z","avatar_url":"https://github.com/olegsu.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# IRIS\n\n\u003cimg src=\"https://github.com/olegsu/iris/raw/master/Iris.jpg\" width=\"200\" align=\"right\"\u003e\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/olegsu/iris)](https://goreportcard.com/report/github.com/olegsu/iris)\n[![codecov](https://codecov.io/gh/olegsu/iris/branch/master/graph/badge.svg)](https://codecov.io/gh/olegsu/iris)\n\n\u003csub\u003e**_In Greek mythology, Iris is the personification of the rainbow and messenger of the gods._**\u003c/sub\u003e\n\n- [IRIS](#iris)\n  - [Run in cluster](#run-in-cluster)\n    - [Using Helm](#using-helm)\n  - [Build](#build)\n  - [Filters](#filters)\n    - [Reason](#reason)\n    - [Namespace](#namespace)\n    - [JSONPath](#jsonpath)\n    - [Labels](#labels)\n    - [Any](#any)\n  - [Destinations](#destinations)\n    - [Default](#default)\n    - [Codefresh](#codefresh)\n  - [Integrations](#integrations)\n\nEasily configure webhooks on Kubernetes events using highly customizable filters\n\n* This project is not stable yet and may be changed anytime without any notice.\n\n## Run in cluster\n### Using Helm\n* clone or fork this repository\n* create your iris.yaml file\n* install chart from local directory `helm install ./iris --values ./iris.yaml`\n* by default the chart will be installed into namespace `iris`, see default values to overwrite it\n\n## Build\n* clone or fork this repo\n* `make install`\n* `make build`\n* Limitations:\n  * Execute out of cluster `iris run --help`\n  * Execute on non GCP cluster\n\nQuick example:\n\nIn this example we will configure to listen on any Kubernetes event that been reported by the pod controller and matched to the filter will be sent to the destination.\n\n```yaml\nfilters:\n  - name: MatchDefaultNamespace\n    type: namespace\n    namespace: default\n  - name: MatchPodKind\n    type: jsonpath\n    path: $.involvedObject.kind\n    value: Pod\n\ndestinations:\n  - name: prod\n    url: http://localhost\n\nintegrations:\n  - name: Report\n    destinations: \n    - prod\n    filters:\n    - MatchPodKind\n    - MatchDefaultNamespace\n```\n\n## Filters\nSet of rules that will be applied on each [Kubernetes event](https://github.com/kubernetes/api/blob/master/core/v1/types.go#L4501).  \nKubernetes event that will pass all required filters will be passed to the destination to be reported  \nTypes of filters:\n### Reason\nReason filter is a syntactic sugar for [JSONPath](#jsonpath) filter with `path: $.reason` and `value: {{reason}}`\n```yaml\nfilters:\n  - name: PodScheduled\n    reason: \"Scheduled\"\n```\n\n### Namespace\nNamespace filter is a syntactic sugar for [JSONPath](#jsonpath) filter with `path: $.metadata.namespace` and `value: {{reason}}`\n```yaml\nfilters:\n  - name: FromDefaultNamespace\n    namespace: default\n```\n\n### JSONPath\nWith JSONPath gives the ability to match any field from [Kubernetes event](https://github.com/kubernetes/api/blob/master/core/v1/types.go#L5478).\nThe value from the fields can be matched to exec value using `value: {{value}}` or matched by regex using `regexp: {{regexp}}`\n```yaml\nfilters:\n  # Match to Warning event type\n  - name: WarningLevel\n    type: jsonpath\n    path: $.type\n    value: Warning\n  # Match to any event that the name matched to regexp /tiller/\n  - name: MatchToRegexpTiller\n    type: jsonpath\n    path: $.metadata.name\n    regexp: tiller\n```\n\n\n\n### Labels\nLabels filter will try to get the original resource from the event with the given filters.\nThe filter considers as passed if any resource were found\n```yaml\nfilters:\n   - name: MatchLabels\n     type: labels\n     labels:\n       app: helm\n```\n\n### Any\n```yaml\nfilters:\n  - name: WarningLevel\n    type: any\n    filters:\n    - FromDefaultNamespace\n    - WarningLevel\n```\n\n## Destinations\nEach destination is an api endpoint where the Kubernetes event will be sent\nTypes of destinations:\n### Default\nThe default destinations will attempt to send POST request with the event json in the request body\nIf `secret` is given, hash string will be calculated using the given key on the request body and the result will be set in the request header as `X-IRIS-HMAC: hash`\n```yaml\ndestinations:\n  - name: Webhook\n    url: https://webhook.site\n    secret: SECRET\n```\n### Codefresh\nWith Iris, you can execute Codefresh pipelines.\nAdd destinations with Codefresh type:\n* name: pipeline full name can be found easily using [Codefresh CLI](https://codefresh-io.github.io/cli/) - `codefresh get pipelines`\n* branch: which branch of the repo should be cloned\n* cftoken: Token to Codefresh API can be generated in [Account settings/Tokens](https://g.codefresh.io/account-conf/tokens) view\n```yaml\n  - name: ExecuteCodefreshPipeline\n    type: Codefresh\n    pipeline: PIPELINE_NAME\n    cftoken: API_TOKEN\n    branch: master\n```\n\n## Integrations\nConnecting between filters and destinations\n```yaml\nintegrations:\n  - name: Report\n    destinations:\n    - {{name of destination}}\n    filters:\n    - {{name of filters to apply}}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folegsu%2Firis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Folegsu%2Firis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Folegsu%2Firis/lists"}