{"id":18293091,"url":"https://github.com/kubesphere/event-rule-engine","last_synced_at":"2025-04-05T11:30:52.135Z","repository":{"id":57501441,"uuid":"200645065","full_name":"kubesphere/event-rule-engine","owner":"kubesphere","description":null,"archived":false,"fork":false,"pushed_at":"2023-06-02T10:13:48.000Z","size":2103,"stargazers_count":10,"open_issues_count":0,"forks_count":6,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-13T21:43:07.534Z","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/kubesphere.png","metadata":{"files":{"readme":"README.md","changelog":null,"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}},"created_at":"2019-08-05T11:46:13.000Z","updated_at":"2024-04-08T12:12:06.000Z","dependencies_parsed_at":"2024-03-04T20:30:56.144Z","dependency_job_id":"f1973a94-9ce3-45dc-8021-d1b700cb28f6","html_url":"https://github.com/kubesphere/event-rule-engine","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fevent-rule-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fevent-rule-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fevent-rule-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kubesphere%2Fevent-rule-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kubesphere","download_url":"https://codeload.github.com/kubesphere/event-rule-engine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223184131,"owners_count":17102009,"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":"2024-11-05T14:21:55.243Z","updated_at":"2024-11-05T14:21:55.942Z","avatar_url":"https://github.com/kubesphere.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Event Rule Engine\n[![License](http://img.shields.io/badge/license-apache%20v2-blue.svg)](https://github.com/KubeSphere/KubeSphere/blob/master/LICENSE)\n\n----\n\n## Introduction\n\nEvent Rule Engine is an rule script evaluating engine for KubeSphere event processing. It can run expression calculation on json members.\n\n## Supported grammer\n\n### Boolean calculation\n\nOperation supported: and, or, not, =, !=\n\nVariables contain json boolean member can calculate directly.\n\n```\nExamples\nopen and involvedObject.apiVersion=\"v1\"\n!open\nopen = true\nopen != true\n```\n\n\u003eThe bool value suport three formates, TRUE True true\n\n### Number comparision\n\nOperation supported: =, !=, \u003e, \u003c, \u003e=, \u003c=, in, not in\n\nData type supported: int, long, float, double\n\n```\nExamples\ncount \u003e= 20\n```\n\n### String comparision\n\nOperation supported: =, !=, \u003e, \u003c, \u003e=, \u003c=, in, not in, contains, not contains\n\n```\nExamples\nmetadata.namespace = \"kube-system\"\nmetadata.namespace in (\"kube-system\", \"default\")\nmetadata.namespace contains \"system\"\n```\n\n### Regular comparision\n\nOperation supported: like, not like, regex, not regex\n\n```\nExamples\nmetadata.namespace like \"ks*\"\nmetadata.name like \"redis-?\"\nmetadata.namespace in (\"kube-system\", \"default\")\nmetadata.namespace contains \"system\"\n```\n\n\u003eUse '*' to substitute any string, use '?' to substitute a character。\n\u003eRegexp, not regexp operation only suport standard regular syntax.\n\n### Array comparision\n\nOperation supported: all\n\n```\nExamples\nResponseObject.status.images[28].names[0].names = \"redis\"\n```\n\n\u003eYou can use '*' to substitute the index of array, this means if any element of the array match the right value, then expression holds。\n\u003eYou can use \"start:end\" such as \"1:5\" to specify a subset of th array. You can omitted either the start index or the end index,\n\u003eit means the subset start at the begining of array, or end at the ending of array.\n\n## Complex examples\n\n```\nExamples\n(metadata.namespace in (\"kube-system\", \"default\") or count \u003e= 20) and involvedObject.apiVersion contains \"v1\"\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubesphere%2Fevent-rule-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkubesphere%2Fevent-rule-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkubesphere%2Fevent-rule-engine/lists"}