Skip to content

Commit 87e0fd5

Browse files
authored
fix the readiness probe fix, to correctly handle for passwords (#138)
* fix the readiness probe fix, to correctly handle for passwords * add exec:
1 parent 99191e2 commit 87e0fd5

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

base/sourcegraph/redis/redis-cache.Deployment.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,17 @@ spec:
3636
- containerPort: 6379
3737
name: redis
3838
readinessProbe:
39-
initialDelaySeconds: 5
39+
initialDelaySeconds: 10
40+
timeoutSeconds: 5
4041
exec:
4142
command:
4243
- /bin/sh
4344
- -c
4445
- |
4546
#!/bin/bash
46-
if [ -f /etc/redis/redis.conf ]; then
47-
export REDISCLI_AUTH=$(grep -h "requirepass" /etc/redis/redis.conf | cut -d ' ' -f 2)
47+
PASS_CHECK=$(grep -h "requirepass" /etc/redis/redis.conf | cut -d ' ' -f 2)
48+
if [ ! -z "$PASS_CHECK" ]; then
49+
export REDISCLI_AUTH="$PASS_CHECK"
4850
fi
4951
response=$(
5052
redis-cli ping

base/sourcegraph/redis/redis-store.Deployment.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,17 @@ spec:
3535
- containerPort: 6379
3636
name: redis
3737
readinessProbe:
38-
initialDelaySeconds: 5
38+
initialDelaySeconds: 10
39+
timeoutSeconds: 5
3940
exec:
4041
command:
4142
- /bin/sh
4243
- -c
4344
- |
4445
#!/bin/bash
45-
if [ -f /etc/redis/redis.conf ]; then
46-
export REDISCLI_AUTH=$(grep -h "requirepass" /etc/redis/redis.conf | cut -d ' ' -f 2)
46+
PASS_CHECK=$(grep -h "requirepass" /etc/redis/redis.conf | cut -d ' ' -f 2)
47+
if [ ! -z "$PASS_CHECK" ]; then
48+
export REDISCLI_AUTH="$PASS_CHECK"
4749
fi
4850
response=$(
4951
redis-cli ping

0 commit comments

Comments
 (0)