From da4c61f224c52391c6cc7325e0071df47a3ba202 Mon Sep 17 00:00:00 2001 From: junotxiang Date: Fri, 31 Dec 2021 16:33:20 +0800 Subject: [PATCH 1/2] fix closure variables Signed-off-by: junotxiang --- pkg/ruler/kube_events_ruler.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/ruler/kube_events_ruler.go b/pkg/ruler/kube_events_ruler.go index 21fb128..2bd2d9b 100644 --- a/pkg/ruler/kube_events_ruler.go +++ b/pkg/ruler/kube_events_ruler.go @@ -215,7 +215,8 @@ func (r *KubeEventsRuler) evalEvents(ctx context.Context) { } r.evtQueue.Done(evt) } - for _, evt := range evts { + for _, event := range evts { + evt := event if err := r.taskPool.Submit(func() { var err error defer func() { From e87414dca24161dc149ea469d4237961b9de9203 Mon Sep 17 00:00:00 2001 From: junotxiang Date: Thu, 6 Jan 2022 12:10:13 +0800 Subject: [PATCH 2/2] upgrade version to v0.3.1 Signed-off-by: junotxiang --- Makefile | 2 +- config/bundle.yaml | 2 +- config/crs/bundle.yaml | 5 +++-- config/crs/kustomization.yaml | 4 ++-- config/kustomization.yaml | 2 +- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 87ace10..7848fa8 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ REGISTRY?=kubesphere REPO_OPERATOR?=$(REGISTRY)/kube-events-operator REPO_EXPORTER?=$(REGISTRY)/kube-events-exporter REPO_RULER?=$(REGISTRY)/kube-events-ruler -TAG?=v0.3.0 +TAG?=v0.3.1 GO_PKG?=github.com/kubesphere/kube-events diff --git a/config/bundle.yaml b/config/bundle.yaml index 994fdea..4d40ce2 100644 --- a/config/bundle.yaml +++ b/config/bundle.yaml @@ -1375,7 +1375,7 @@ spec: valueFrom: fieldRef: fieldPath: metadata.namespace - image: kubesphere/kube-events-operator:latest + image: kubesphere/kube-events-operator:v0.3.1 name: events-operator ports: - containerPort: 9443 diff --git a/config/crs/bundle.yaml b/config/crs/bundle.yaml index fabc155..bb8251a 100644 --- a/config/crs/bundle.yaml +++ b/config/crs/bundle.yaml @@ -4,7 +4,7 @@ metadata: name: kube-events-exporter namespace: kubesphere-logging-system spec: - image: kubesphere/kube-events-exporter:latest + image: kubesphere/kube-events-exporter:v0.3.1 resources: {} sinks: stdout: {} @@ -893,8 +893,9 @@ metadata: name: kube-events-ruler namespace: kubesphere-logging-system spec: - image: kubesphere/kube-events-ruler:latest + image: kubesphere/kube-events-ruler:v0.3.1 replicas: 2 + resources: {} sinks: alertmanager: name: alertmanager-main diff --git a/config/crs/kustomization.yaml b/config/crs/kustomization.yaml index 32f5e2a..a7d5c6e 100644 --- a/config/crs/kustomization.yaml +++ b/config/crs/kustomization.yaml @@ -11,9 +11,9 @@ patchesStrategicMerge: images: - name: exporter newName: kubesphere/kube-events-exporter - newTag: latest + newTag: v0.3.1 - name: ruler newName: kubesphere/kube-events-ruler - newTag: latest + newTag: v0.3.1 apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization diff --git a/config/kustomization.yaml b/config/kustomization.yaml index 09e7a8b..4c37b4f 100644 --- a/config/kustomization.yaml +++ b/config/kustomization.yaml @@ -9,6 +9,6 @@ configurations: images: - name: operator newName: kubesphere/kube-events-operator - newTag: latest + newTag: v0.3.1 apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization