Skip to content

Commit 432661f

Browse files
authored
Merge pull request #588 from spotahome/zekena2/master
fix: sentinel readiness probe to fail when monitoring localhost
2 parents d1319bf + ccbdde3 commit 432661f

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

charts/redisoperator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ appVersion: 1.2.4
44
apiVersion: v1
55
description: A Helm chart for the Spotahome Redis Operator
66
name: redis-operator
7-
version: 3.2.7
7+
version: 3.2.8
88
home: https://github.com/spotahome/redis-operator
99
keywords:
1010
- "golang"

operator/redisfailover/service/generator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ func generateSentinelDeployment(rf *redisfailoverv1.RedisFailover, labels map[st
567567
Command: []string{
568568
"sh",
569569
"-c",
570-
"redis-cli -h $(hostname) -p 26379 ping",
570+
"redis-cli -h $(hostname) -p 26379 sentinel get-master-addr-by-name mymaster | head -n 1 | grep -vq '127.0.0.1'",
571571
},
572572
},
573573
},

operator/redisfailover/service/generator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2158,7 +2158,7 @@ func TestSentinelCustomReadinessProbe(t *testing.T) {
21582158
Command: []string{
21592159
"sh",
21602160
"-c",
2161-
"redis-cli -h $(hostname) -p 26379 ping",
2161+
"redis-cli -h $(hostname) -p 26379 sentinel get-master-addr-by-name mymaster | head -n 1 | grep -vq '127.0.0.1'",
21622162
},
21632163
},
21642164
},

0 commit comments

Comments
 (0)