Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

Commit

Permalink
keydb: improve liveness and readiness probes
Browse files Browse the repository at this point in the history
  • Loading branch information
Antiarchitect committed Jan 16, 2023
1 parent 085ab10 commit c578c86
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion keydb/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: keydb
description: A Helm chart for KeyDB multimaster setup
type: application
version: 0.43.1
version: 0.44.0
keywords:
- keydb
- redis
Expand Down
10 changes: 6 additions & 4 deletions keydb/templates/cm-health.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,17 @@ data:
set -e
loading_response="LOADING KeyDB is loading the dataset in memory"
[[ -n "${REDIS_PASSWORD}" ]] && export REDISCLI_AUTH="${REDIS_PASSWORD}"
response="$(
timeout -s 3 "${1}" \
keydb-cli \
-h localhost \
-p "${REDIS_PORT}" \
ping
GET {{ uuidv4 }} # Some random UUID which represents non-existent key
)"
if [ "${response}" != "PONG" ]; then
if [ "${response}" = "${loading_response}" ]; then
echo "${response}"
exit 1
fi
Expand All @@ -34,9 +36,9 @@ data:
keydb-cli \
-h localhost \
-p "${REDIS_PORT}" \
ping
PING
)"
if [ "${response}" != "PONG" ] && [[ ! "${response}" =~ ^.*LOADING.*$ ]]; then
if [ "${response}" != "PONG" ]; then
echo "${response}"
exit 1
fi
Expand Down

0 comments on commit c578c86

Please sign in to comment.