Skip to content

Commit

Permalink
Merge pull request #7 from junotx/master
Browse files Browse the repository at this point in the history
adjust rule engine dependency
  • Loading branch information
Benjamin Huo authored Aug 10, 2020
2 parents a24970f + b179683 commit ca32f12
Show file tree
Hide file tree
Showing 32 changed files with 726 additions and 2,161 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Another component called Operator is responsible for the desired state of the pr

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

The architecture diagram is as follows:
![Architecture](doc/images/architecture.png)

# Quickstart

Install quickly kube-events into your kubernetes cluster with the following commands:
Expand Down
5 changes: 2 additions & 3 deletions cmd/ruler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ import (
"runtime"
"time"

v1 "k8s.io/api/core/v1"

"github.com/julienschmidt/httprouter"
"github.com/kubesphere/kube-events/pkg/config"
"github.com/kubesphere/kube-events/pkg/ruler"
rulertypes "github.com/kubesphere/kube-events/pkg/ruler/types"
"github.com/kubesphere/kube-events/pkg/util"
"github.com/panjf2000/ants/v2"
"golang.org/x/sync/errgroup"
"k8s.io/api/core/v1"
"k8s.io/klog"
ctrlconfig "sigs.k8s.io/controller-runtime/pkg/client/config"
)
Expand All @@ -32,7 +31,7 @@ func init() {
}

func main() {
klog.InitFlags(nil)
//klog.InitFlags(nil)
flag.Parse()

kcfg, e := ctrlconfig.GetConfig()
Expand Down
237 changes: 79 additions & 158 deletions config/bundle.yaml

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions config/crd/bases/events.kubesphere.io_rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,17 @@ spec:
additionalProperties:
type: string
description: 'Values of Annotations can use format string with
the fields of the event. For example: `{"message": "%event.message"}`'
the fields of the event. For example: `{"message": "%message"}`'
type: object
condition:
description: 'Condition is a string similar with the where part
of sql (please use double quotation to mark a string). For example:
`event.type="Warning" and event.involvedObject.kind="Pod" and
event.reason="FailedMount"`'
of sql. See supported grammar details on https://github.com/kubesphere/event-rule-engine#supported-grammer
. For example: `type="Warning" and involvedObject.kind="Pod"
and reason="FailedMount"`'
type: string
enable:
description: Enable is whether to enable the rule
description: Enable is whether to enable the rule, default to
`false`
type: boolean
labels:
additionalProperties:
Expand Down
Loading

0 comments on commit ca32f12

Please sign in to comment.