From f5bef146f165165599992e4fd67a04ac1dd9c71e Mon Sep 17 00:00:00 2001 From: wanjunlei Date: Thu, 21 Mar 2024 11:25:48 +0800 Subject: [PATCH] pre release v2.5.0 Signed-off-by: wanjunlei --- CHANGLOG.md | 21 +++++++++++++++++++++ README.md | 10 +++++----- RELEASE.md | 2 ++ VERSION | 2 +- config/bundle.yaml | 2 +- config/manager/kustomization.yaml | 2 +- config/samples/bundle.yaml | 11 ++++++++++- helm/values.yaml | 13 ++----------- sidecar/kubesphere/4.0.0/Makefile | 2 +- 9 files changed, 44 insertions(+), 21 deletions(-) diff --git a/CHANGLOG.md b/CHANGLOG.md index 15f34cc..f786c2d 100644 --- a/CHANGLOG.md +++ b/CHANGLOG.md @@ -1,3 +1,24 @@ +## v2.5.0 / 2024-03-21 + +### FEATURES + +- Support sending notification history without adaptor(#227). @wanjunlei +- New tenant sidecar for kubesphere v4.0.0(#231). @wanjunlei + +### Enhancements + +- Add receiver name to the notification(#235). @wanjunlei +- Add annotation of alert to the notification(#238). @wanjunlei +- Update go version to 1.20(#236). @wanjunlei + +### Deprecations + +- Delete the v2beta1 version of the CRD(#230). @wanjunlei + +### Bugfix + +- Fix a bug that notification manager will crash when the smtp server is not available(#245). @Gentleelephant + ## v2.4.0 / 2023-09-20 ### FEATURES diff --git a/README.md b/README.md index e6936a6..771c568 100644 --- a/README.md +++ b/README.md @@ -82,17 +82,17 @@ We assume you already have a Kubernetes cluster (v1.16+). You can install one us ```shell # Deploy CRDs and the Notification Manager Operator: -kubectl apply -f https://github.com/kubesphere/notification-manager/releases/download/v2.4.0/bundle.yaml +kubectl apply -f https://github.com/kubesphere/notification-manager/releases/download/v2.5.0/bundle.yaml # Deploy default template: -kubectl apply -f https://github.com/kubesphere/notification-manager/releases/download/v2.4.0/template.yaml +kubectl apply -f https://github.com/kubesphere/notification-manager/releases/download/v2.5.0/template.yaml # Deploy built-in language packs. -kubectl apply -f https://github.com/kubesphere/notification-manager/releases/download/v2.4.0/zh-cn.yaml +kubectl apply -f https://github.com/kubesphere/notification-manager/releases/download/v2.5.0/zh-cn.yaml ``` #### Install with helm ```shell -helm install notification-manager --create-namespace -n kubesphere-monitoring-system https://github.com/kubesphere/notification-manager/releases/download/v2.4.0/notification-manager.tgz +helm install notification-manager --create-namespace -n kubesphere-monitoring-system https://github.com/kubesphere/notification-manager/releases/download/v2.5.0/notification-manager.tgz ``` ### Configure NotificationManager @@ -103,7 +103,7 @@ ensures a deployment meeting the resource requirements is running. We should create a NotificationManager CR first, skip this when using helm install. ```shell -kubectl apply -f https://github.com/kubesphere/notification-manager/releases/download/v2.4.0/notification_manager.yaml +kubectl apply -f https://github.com/kubesphere/notification-manager/releases/download/v2.5.0/notification_manager.yaml ``` ### Configure sender diff --git a/RELEASE.md b/RELEASE.md index 3069fc5..55f4690 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -17,6 +17,8 @@ This page describes the release process and the currently planned schedule for u | v2.3.0-rc.0 | 2023-02-07 | leiwanjun (GitHub: @leiwanjun) | | v2.3.0 | 2023-04-12 | leiwanjun (GitHub: @leiwanjun) | | v2.4.0 | 2023-09-20 | leiwanjun (GitHub: @leiwanjun) | +| v2.5.0 | 2024-03-21 | leiwanjun (GitHub: @leiwanjun) | + # How to cut a new release diff --git a/VERSION b/VERSION index 4ba84b1..21222ce 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.5.0-rc.3 +v2.5.0 diff --git a/config/bundle.yaml b/config/bundle.yaml index 41d8dd0..bb6c94b 100644 --- a/config/bundle.yaml +++ b/config/bundle.yaml @@ -8044,7 +8044,7 @@ spec: fieldRef: apiVersion: v1 fieldPath: metadata.namespace - image: kubesphere/notification-manager-operator:v2.5.0-rc.0 + image: kubesphere/notification-manager-operator:v2.5.0 imagePullPolicy: Always name: notification-manager-operator ports: diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index d9ca8aa..968fbc1 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -5,4 +5,4 @@ kind: Kustomization images: - name: controller newName: kubesphere/notification-manager-operator - newTag: v2.5.0-rc.0 + newTag: v2.5.0 diff --git a/config/samples/bundle.yaml b/config/samples/bundle.yaml index fdf76db..3b16a58 100644 --- a/config/samples/bundle.yaml +++ b/config/samples/bundle.yaml @@ -9,11 +9,13 @@ data: {{ define "nm.default.text" }}{{ range .Alerts }}{{ template "nm.default.message" . }} {{ range .Labels.SortedPairs }} {{ .Name | translate }}: {{ .Value }} + {{ end }}{{ range .Annotations.SortedPairs.Filter "runbook_url" "message" "summary" "summary_cn" }} {{ .Name | translate }}: {{ .Value }} {{ end }} {{ end }}{{- end }} {{ define "nm.default.markdown" }}{{ range .Alerts }}### {{ template "nm.default.message" . }} {{ range .Labels.SortedPairs }}- {{ .Name | translate }}: {{ .Value }} + {{ end }}{{ range .Annotations.SortedPairs.Filter "runbook_url" "message" "summary" "summary_cn" }}- {{ .Name | translate }}: {{ .Value }} {{ end }} {{ end }}{{- end }} @@ -26,12 +28,18 @@ data: - - tag: text text: ' {{ .Name | translate }}: {{ .Value }}' {{- end }} + {{ if ne (len .Annotations.SortedPairs.Filter) 0 }} + {{ range .Annotations.SortedPairs.Filter "runbook_url" "message" "summary" "summary_cn" }} + - - tag: text + text: ' {{ .Name | translate }}: {{ .Value }}' + {{- end }} + {{- end }} - - tag: text text: ' ' {{- end }} {{- end }} - {{ define "nm.feishu.text" }}{{ range .Alerts }}{{ template "nm.default.message" . }}{{ "\n" }}{{ range .Labels.SortedPairs }} {{ .Name | translate }}: {{ .Value }}{{ "\n" }}{{ end }}{{ "\n" }}{{ end }}{{- end }} + {{ define "nm.feishu.text" }}{{ range .Alerts }}{{ template "nm.default.message" . }}{{ "\n" }}{{ range .Labels.SortedPairs }} {{ .Name | translate }}: {{ .Value }}{{ "\n" }}{{ end }}{{ range .Annotations.SortedPairs.Filter "runbook_url" "message" "summary" "summary_cn" }} {{ .Name | translate }}: {{ .Value }}{{ "\n" }}{{ end }}{{ "\n" }}{{ end }}{{- end }} {{ define "nm.default.html" }} @@ -50,6 +58,7 @@ data: {{ template "nm.default.message" . }}
{{ range .Labels.SortedPairs }}  {{ .Name | translate }}: {{ .Value }}
{{ end }} + {{ range .Annotations.SortedPairs.Filter "runbook_url" "message" "summary" "summary_cn" }}  {{ .Name | translate }}: {{ .Value }}
{{ end }} {{ end }} diff --git a/helm/values.yaml b/helm/values.yaml index e8730a6..dd4fa1b 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -28,7 +28,7 @@ operator: operator: image: repo: kubesphere/notification-manager-operator - tag: v2.5.0-rc.2 + tag: v2.5.0 pullPolicy: IfNotPresent resources: limits: @@ -44,18 +44,9 @@ operator: # value of notification-manager notificationmanager: - sidecar: - tenant: - resources: - limits: - cpu: 200m - memory: 256Mi - requests: - cpu: 200m - memory: 256Mi image: repo: kubesphere/notification-manager - tag: v2.5.0-rc.2 + tag: v2.5.0 pullPolicy: IfNotPresent sidecar: image: diff --git a/sidecar/kubesphere/4.0.0/Makefile b/sidecar/kubesphere/4.0.0/Makefile index 1495b90..cd3fdbe 100644 --- a/sidecar/kubesphere/4.0.0/Makefile +++ b/sidecar/kubesphere/4.0.0/Makefile @@ -2,7 +2,7 @@ # Use of this source code is governed by a Apache license # that can be found in the LICENSE file. -IMG ?= leiwanjun/notification-tenant-sidecar:v4.0.0 +IMG ?= kubesphere/notification-tenant-sidecar:v4.0.0 AMD64 ?= -amd64 all: docker-build