Skip to content

Commit

Permalink
redis fix (#4331)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaedalusG committed May 27, 2024
1 parent 331a5d5 commit 97f205f
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 4 deletions.
18 changes: 16 additions & 2 deletions base/redis/redis-cache.Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,22 @@ spec:
name: redis
readinessProbe:
initialDelaySeconds: 5
tcpSocket:
port: redis
exec:
command:
- /bin/sh
- -c
- |
#!/bin/bash
if [ -f /etc/redis/redis.conf ]; then
export REDISCLI_AUTH=$(grep -h "requirepass" /etc/redis/redis.conf | cut -d ' ' -f 2)
fi
response=$(
redis-cli ping
)
if [ "$response" != "PONG" ]; then
echo "$response"
exit 1
fi
resources:
limits:
cpu: "1"
Expand Down
18 changes: 16 additions & 2 deletions base/redis/redis-store.Deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,22 @@ spec:
name: redis
readinessProbe:
initialDelaySeconds: 5
tcpSocket:
port: redis
exec:
command:
- /bin/sh
- -c
- |
#!/bin/bash
if [ -f /etc/redis/redis.conf ]; then
export REDISCLI_AUTH=$(grep -h "requirepass" /etc/redis/redis.conf | cut -d ' ' -f 2)
fi
response=$(
redis-cli ping
)
if [ "$response" != "PONG" ]; then
echo "$response"
exit 1
fi
resources:
limits:
cpu: "1"
Expand Down

0 comments on commit 97f205f

Please sign in to comment.