From 348a592504ccee636b3dc8d60fc2d56077061eb7 Mon Sep 17 00:00:00 2001 From: wanjunlei Date: Fri, 15 Dec 2023 10:58:36 +0800 Subject: [PATCH] update helm Signed-off-by: wanjunlei --- helm/templates/clusterrolebindings.yaml | 4 +++- helm/templates/clusterroles.yaml | 4 +++- helm/templates/notificationmanagers.yaml | 6 +++--- helm/values.yaml | 17 ++++------------- 4 files changed, 13 insertions(+), 18 deletions(-) diff --git a/helm/templates/clusterrolebindings.yaml b/helm/templates/clusterrolebindings.yaml index fe753d1d..54f75eba 100644 --- a/helm/templates/clusterrolebindings.yaml +++ b/helm/templates/clusterrolebindings.yaml @@ -25,7 +25,8 @@ subjects: name: notification-manager-sa namespace: {{ .Release.Namespace }} -{{- if eq .Values.kubesphere true }} +{{- if .Values.kubesphere.enabled }} +{{- if or (eq .Values.kubesphere.version "v3.1.0") (eq .Values.kubesphere.version "v3.2.0") }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding @@ -40,3 +41,4 @@ subjects: name: notification-manager-sa namespace: {{ .Release.Namespace }} {{- end}} +{{- end}} diff --git a/helm/templates/clusterroles.yaml b/helm/templates/clusterroles.yaml index dbc58390..1c7935f1 100644 --- a/helm/templates/clusterroles.yaml +++ b/helm/templates/clusterroles.yaml @@ -98,7 +98,8 @@ rules: verbs: - create -{{- if eq .Values.kubesphere true }} +{{- if .Values.kubesphere.enabled }} +{{- if or (eq .Values.kubesphere.version "v3.1.0") (eq .Values.kubesphere.version "v3.2.0") }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -148,4 +149,5 @@ rules: - list - watch {{- end}} +{{- end}} diff --git a/helm/templates/notificationmanagers.yaml b/helm/templates/notificationmanagers.yaml index 2a20fcec..e654ec96 100644 --- a/helm/templates/notificationmanagers.yaml +++ b/helm/templates/notificationmanagers.yaml @@ -35,13 +35,13 @@ spec: {{- toYaml .Values.notificationmanager.volumes | nindent 4 }} defaultSecretNamespace: {{- toYaml .Values.notificationmanager.defaultSecretNamespace | nindent 4 }} - {{- if eq .Values.kubesphere true }} + {{- if .Values.kubesphere.enabled }} sidecars: tenant: - image: kubesphere/notification-tenant-sidecar:v3.2.0 + image: kubesphere/notification-tenant-sidecar:{{ .Values.kubesphere.version }} name: tenant type: kubesphere - {{- end}} + {{- end }} template: {{- toYaml .Values.notificationmanager.template | nindent 4 }} groupLabels: diff --git a/helm/values.yaml b/helm/values.yaml index 76b8cba9..c56ff741 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -1,16 +1,7 @@ -# Whether Notification manager is running at the kubesphere. -kubesphere: false - -hook: - postInstall: - image: - repo: kubesphere/kubectl - tag: v1.22.0 - pullPolicy: IfNotPresent - backoffLimit: 1 - -# Set timezone to be injected into containers -# timezone: "America/Toronto" +kubesphere: + enabled: fase + # supported version: v3.1.0, v3.2.0 + version: v3.2.0 # value of notification-manager-operator operator: