kubesphere/kube-events là một trong những repo mã nguồn mở mà TopGit theo dõi, hiện có 218 sao, viết chủ yếu bằng Go. K8s Event Exporting, Filtering and Alerting in Multi-Tenant Environment
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
Kube-events revolves around Kubernetes Event, covering multi-dimensional processing of them, such as emitting events to sinks, issuing notifications and generating alerts. In some of these dimensions, configurable filtering rules are provided to meet different business needs.
Kube-events contains two major business components, Exporter and Ruler. Exporter watches Kubernetes Event and emits events to sinks. Ruler receives events, filters them by rules, then issues notifications or processes them as alerts which will eventually be sent to alertmanager or webhooks.
Another component called Operator is responsible for the desired state of the previous business components. This relies on the following three crds to achieve:
Exporter, which defines a desired Exporter deployment. Operator ensures at all times that a Exporter matching the resource definition is running.
Ruler, which defines a desired Ruler deployment. The Operator ensures at all times that a Ruler matching the resource definition is running.
Rule, which defines a desired Rule set, which will be used to filter events by Ruler.
To learn more about the CRDs introduced by the kube-events have a look at the design doc.
The architecture diagram is as follows:
Quickstart
Install quickly kube-events into your kubernetes cluster with the following commands:
K8s events exporting, filtering, alerting and notification in multi-tenant env
Usage
Rule
Rule is used to define filtering rules for events. Each Rule instance can be configured with a set of rules. When configuring these instances, set a label called kubesphere.io/rule-scope to distinguish the scope of rules, to meet the needs of multi-tenancy.
kubesphere.io/rule-scope: cluster
This level of Rule does not need to specify the namespace when it is configured, it will be stored in the namespace which the operator belongs to. Filtering rules in it will be applied to the events of the entire cluster.
kubesphere.io/rule-scope: namespace
When configuring a Rule instance at this level, you need to specify the namespace. Rules in it will be applied to the events whose involvedObject.namespace equals to the namespace which this Rule instance belongs to.
kubesphere.io/rule-scope: workspace
This is an intermediate level of scope control. It will act on events of multiple namespaces. It needs to be specified a label called kubesphere.io/workspace, which will be used to select the namespaces with the same label. Rules in it will be applied to the events whose involvedObject.namespace is in these selected namespaces. (It will be stored in the same namespace to the cluster-level instances)
Exporter
Exporter component is configured by Exporter. Exporter currently supports output events to stdout and webhook. In fact, Ruler component is such a webhook.
If you want to collect events from the exporter's stdout and output them to a specific place, fluentbit is a good choice. To achieve this, by fluentbit-operator which provides flexibility and convenience of fluentbit configuration, just add some Input/Filter/Output plugins as needed. For example, the following provides plugins which will finally output events to es:
Ruler component is configured by Ruler. Ruler component filters the received events through rules and may generate event notifications or alerts. Alert messages can be configured to be sent to the alertmanager service.
And webhooks can be also configured to receive these notifications or alerts.
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/kubesphere/kube-events là nguồn chính thức.
kubesphere/kube-events có phải mã nguồn mở không?
Có — kubesphere/kube-events phát hành theo license Apache-2.0, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/kubesphere/kube-events.
kubesphere/kube-events là gì?
kubesphere/kube-events (kubesphere/kube-events) là dự án Go trên GitHub. Theo mô tả gốc: K8s Event Exporting, Filtering and Alerting in Multi-Tenant Environment
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về kube-events?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về kube-events.