Skip to content

Commit 4735a04

Browse files
committed
2 parents e702a3f + 57fc827 commit 4735a04

4 files changed

Lines changed: 28 additions & 5 deletions

File tree

addons/redis-cluster/7.0/chart/redis-cluster/templates/configmap.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ data:
1414
{{- if .Values.proxy.enabled }}
1515
redis-proxy-default.toml: |-
1616
[log]
17-
level = "libredis_proxy=warn" # "trace" "info" "debug" "warn" "error"
17+
level = "libproxy=error" # "trace" "info" "debug" "warn" "error"
1818
ansi = true # support ANSI colors
1919
stdout = true # print logs to stdout
2020
directory = "/tmp" # log file directory
21-
file_name = "redis-proxy.log" # log file name
21+
file_name = "redis-cluster-proxy.log" # log file name
2222
2323
[metrics]
2424
port = 2110
@@ -27,12 +27,12 @@ data:
2727
name = "redis-cluster-proxy"
2828
listen_addr = "0.0.0.0:{{ .Values.proxy.containerPorts.proxy }}"
2929
hash_tag = "{}"
30-
thread = 1
30+
thread = 2
3131
cache_type = "redis_cluster"
3232
servers = ["127.0.0.1:{{ .Values.redis.containerPorts.redis }}"]
3333
34-
fetch_interval = 1800000 # 1800s , 30 minutes
35-
fetch_since_latest_cmd = 1000 # 3600s , 1 hour
34+
fetch_interval = 300000
35+
fetch_since_latest_cmd = 300
3636
read_from_slave = false
3737
3838
ping_fail_limit = 10

addons/redis-cluster/7.0/chart/redis-cluster/templates/redis-statefulset.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ spec:
110110
ips=($(echo "{{ .Values.cluster.externalAccess.service.loadBalancerIP }}" | cut -d [ -f2 | cut -d ] -f 1))
111111
export REDIS_CLUSTER_ANNOUNCE_IP="${ips[$pod_index]}"
112112
export REDIS_NODES="${ips[@]}"
113+
export REDIS_CLUSTER_ANNOUNCE_HOSTNAME="$(POD_NAME).$(HEADLESS_SERVICE_NAME)"
113114
{{- if .Values.cluster.init }}
114115
if [[ "$pod_index" == "0" ]]; then
115116
export REDIS_CLUSTER_CREATOR="yes"
@@ -121,6 +122,7 @@ spec:
121122
args:
122123
- |
123124
# Backwards compatibility change
125+
export REDIS_CLUSTER_ANNOUNCE_HOSTNAME="$(POD_NAME).{{ template "common.names.fullname" $ }}-headless"
124126
if ! [[ -f /opt/drycc/redis/etc/redis.conf ]]; then
125127
echo COPYING FILE
126128
cp /opt/drycc/redis/etc/redis-default.conf /opt/drycc/redis/etc/redis.conf
@@ -140,6 +142,16 @@ spec:
140142
valueFrom:
141143
fieldRef:
142144
fieldPath: metadata.name
145+
- name: REDIS_CLUSTER_PREFERRED_ENDPOINT_TYPE
146+
value: "hostname"
147+
- name: HEADLESS_SERVICE_NAME
148+
value: {{ template "common.names.fullname" $ }}-headless
149+
{{- if .Values.ioThread.enabled }}
150+
- name: REDIS_IO_THREADS_DO_READS
151+
value: {{ .Values.ioThread.doReads }}
152+
- name: REDIS_IO_THREADS
153+
value: {{ .Values.ioThread.counts | quote }}
154+
{{- end }}
143155
{{- if .Values.cluster.externalAccess.enabled }}
144156
- name: REDIS_CLUSTER_DYNAMIC_IPS
145157
value: "no"

addons/redis-cluster/7.0/chart/redis-cluster/values.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ existingSecretPasswordKey: ""
195195
## @param usePasswordFile Mount passwords as files instead of environment variables
196196
##
197197
usePasswordFile: false
198+
## io-thread
199+
ioThread:
200+
enabled: false
201+
doReads: "yes"
202+
counts: 2
198203
##
199204
## TLS configuration
200205
##

addons/redis-cluster/7.0/plans/standard-65536/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
##
33
fullnameOverride: "hb-redis-cluster-standard-65536"
44

5+
## io-thread
6+
ioThread:
7+
enabled: true
8+
doReads: "yes"
9+
counts: 2
10+
511
## Enable persistence using Persistent Volume Claims
612
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
713
##

0 commit comments

Comments
 (0)