Fix the bug of failure to write due to not sufficient good replicas in SA DBAAS 03/3303/2
authorZhe Huang <zhehuang@research.att.com>
Thu, 16 Apr 2020 21:21:07 +0000 (17:21 -0400)
committerZhe Huang <zhehuang@research.att.com>
Mon, 20 Apr 2020 20:13:56 +0000 (20:13 +0000)
Signed-off-by: Zhe Huang <zhehuang@research.att.com>
Change-Id: I354562c1c3cdc41073d887fb22226e54455a5941

helm/dbaas/templates/configmap.yaml
helm/dbaas/values.yaml

index 9f82b13..a9a0764 100644 (file)
@@ -27,9 +27,15 @@ metadata:
 data:
   redis.conf: |
     dir "/data"
-    {{- range $key, $value := .Values.dbaas.redis.config }}
+{{- if $.Values.dbaas.enableHighAvailability }}
+    {{- range $key, $value := .Values.dbaas.redis.ha_config }}
+    {{ $key }} {{ $value }}
+    {{- end }}
+{{- else }}
+    {{- range $key, $value := .Values.dbaas.redis.sa_config }}
     {{ $key }} {{ $value }}
     {{- end }}
+{{- end }}
 
 {{- if $.Values.dbaas.enableHighAvailability }}
   sentinel.conf: |
index c81ef98..7a5d1ae 100644 (file)
@@ -27,7 +27,12 @@ dbaas:
 
   redis:
     masterGroupName: dbaasmaster
-    config:
+    sa_config:
+      ## For /data/conf/redis.conf
+      protected-mode: "no"
+      loadmodule: "/usr/local/libexec/redismodule/libredismodule.so"
+      bind: 0.0.0.0
+    ha_config:
       ## For /data/conf/redis.conf
       min-slaves-to-write: 1
       min-slaves-max-lag: 5
@@ -35,7 +40,6 @@ dbaas:
       maxmemory-policy: "volatile-lru"
       protected-mode: "no"
       loadmodule: "/usr/local/libexec/redismodule/libredismodule.so"
-      bind: 0.0.0.0
 
   sentinel:
     quorum: 2