Skip to content

Commit ca32f12

Browse files
author
Benjamin Huo
authored
Merge pull request #7 from junotx/master
adjust rule engine dependency
2 parents a24970f + b179683 commit ca32f12

32 files changed

+726
-2161
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ Another component called Operator is responsible for the desired state of the pr
1111

1212
To learn more about the CRDs introduced by the kube-events have a look at the [design doc](doc/api.md).
1313

14+
The architecture diagram is as follows:
15+
![Architecture](doc/images/architecture.png)
16+
1417
# Quickstart
1518

1619
Install quickly kube-events into your kubernetes cluster with the following commands:

cmd/ruler/main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ import (
1010
"runtime"
1111
"time"
1212

13-
v1 "k8s.io/api/core/v1"
14-
1513
"github.com/julienschmidt/httprouter"
1614
"github.com/kubesphere/kube-events/pkg/config"
1715
"github.com/kubesphere/kube-events/pkg/ruler"
1816
rulertypes "github.com/kubesphere/kube-events/pkg/ruler/types"
1917
"github.com/kubesphere/kube-events/pkg/util"
2018
"github.com/panjf2000/ants/v2"
2119
"golang.org/x/sync/errgroup"
20+
"k8s.io/api/core/v1"
2221
"k8s.io/klog"
2322
ctrlconfig "sigs.k8s.io/controller-runtime/pkg/client/config"
2423
)
@@ -32,7 +31,7 @@ func init() {
3231
}
3332

3433
func main() {
35-
klog.InitFlags(nil)
34+
//klog.InitFlags(nil)
3635
flag.Parse()
3736

3837
kcfg, e := ctrlconfig.GetConfig()

config/bundle.yaml

Lines changed: 79 additions & 158 deletions
Large diffs are not rendered by default.

config/crd/bases/events.kubesphere.io_rules.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,17 @@ spec:
4444
additionalProperties:
4545
type: string
4646
description: 'Values of Annotations can use format string with
47-
the fields of the event. For example: `{"message": "%event.message"}`'
47+
the fields of the event. For example: `{"message": "%message"}`'
4848
type: object
4949
condition:
5050
description: 'Condition is a string similar with the where part
51-
of sql (please use double quotation to mark a string). For example:
52-
`event.type="Warning" and event.involvedObject.kind="Pod" and
53-
event.reason="FailedMount"`'
51+
of sql. See supported grammar details on https://github.com/kubesphere/event-rule-engine#supported-grammer
52+
. For example: `type="Warning" and involvedObject.kind="Pod"
53+
and reason="FailedMount"`'
5454
type: string
5555
enable:
56-
description: Enable is whether to enable the rule
56+
description: Enable is whether to enable the rule, default to
57+
`false`
5758
type: boolean
5859
labels:
5960
additionalProperties:

0 commit comments

Comments
 (0)