Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Fix haproxy check redis master configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Xu <jeremyxu2010@gmail.com>
  • Loading branch information
jeremyxu2010 committed Aug 30, 2019
1 parent c7f4254 commit 25edcea
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions stable/redis-ha/templates/redis-ha-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ data:
tcp-check send QUIT\r\n
tcp-check expect string +OK
{{- range $i := until $replicas }}
server R{{ $i }} {{ $fullName }}-announce-{{ $i }}:26379 check inter 1s
server R{{ $i }} {{ $fullName }}-announce-{{ $i }}:26379 check inter 2s
{{- end }}
{{- end }}

Expand All @@ -194,11 +194,13 @@ data:
tcp-check expect string +PONG
tcp-check send info\ replication\r\n
tcp-check expect string role:master
tcp-check send info\ replication\r\n
tcp-check expect string min_slaves_good_slaves:{{ sub $replicas 1 }}
tcp-check send QUIT\r\n
tcp-check expect string +OK
{{- range $i := until $replicas }}
use-server R{{ $i }} if { srv_is_up(R{{ $i }}) } { nbsrv(check_if_redis_is_master_{{ $i }}) ge 2 }
server R{{ $i }} {{ $fullName }}-announce-{{ $i }}:6379 check inter 1s fall 1 rise 1
server R{{ $i }} {{ $fullName }}-announce-{{ $i }}:6379 check inter 2s fall 1 rise 3
{{- end }}
{{- end }}
{{- end }}
Expand Down

0 comments on commit 25edcea

Please sign in to comment.