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