From 4fa4f5b42d438d4bbe726eb257e6d2a6d1c7eccb Mon Sep 17 00:00:00 2001 From: Wenhao Zhou <34303854+zhou1203@users.noreply.github.com> Date: Wed, 23 Oct 2024 15:15:59 +0800 Subject: [PATCH] enhancement: disable redis when running as member cluster Signed-off-by: wenhaozhou --- config/ks-core/templates/kubesphere-config.yaml | 2 +- config/ks-core/templates/redis.yaml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/config/ks-core/templates/kubesphere-config.yaml b/config/ks-core/templates/kubesphere-config.yaml index e29deace0..9d14dbe24 100644 --- a/config/ks-core/templates/kubesphere-config.yaml +++ b/config/ks-core/templates/kubesphere-config.yaml @@ -73,7 +73,7 @@ data: telemetry: ksCloudURL: "https://kubesphere.cloud" {{- end }} - {{- if .Values.ha.enabled -}} + {{- if and (eq (include "role" .) "host" .Values.ha.enabled) -}} {{- if .Values.ha.cache }} cache: {{- toYaml .Values.ha.cache | nindent 6}} {{- else }} diff --git a/config/ks-core/templates/redis.yaml b/config/ks-core/templates/redis.yaml index a77753aa9..942ed4f5d 100644 --- a/config/ks-core/templates/redis.yaml +++ b/config/ks-core/templates/redis.yaml @@ -1,3 +1,4 @@ +{{- if eq (include "role" .) "host" }} {{- if and .Values.ha.enabled (not .Values.ha.cache) }} {{- if lookup "v1" "Secret" "kubesphere-system" "redis-secret" }} {{- lookup "v1" "Secret" "kubesphere-system" "redis-secret" | toYaml }} @@ -146,3 +147,4 @@ spec: {{- end }} {{- end }} +{{- end }} \ No newline at end of file