Signed-off-by: Zhe Huang <zhehuang@research.att.com>
Change-Id: I354562c1c3cdc41073d887fb22226e54455a5941
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: |
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
maxmemory-policy: "volatile-lru"
protected-mode: "no"
loadmodule: "/usr/local/libexec/redismodule/libredismodule.so"
- bind: 0.0.0.0
sentinel:
quorum: 2