From d6bc467c54d52a45351b6bb7efc003818b613198 Mon Sep 17 00:00:00 2001 From: Ilya Kreymer Date: Thu, 28 Sep 2023 13:00:31 -0700 Subject: [PATCH] improvements to redis pod: (#1219) - add liveness check/fix readiness check - ensure 'redis-cli ping' actually returns 'PONG', as exit code is 0 even if errors will detect situations where redis is not available, such as due to to max clients being reached - bump redis memory/cpu for now (until autoscaling/automatic adjustment is available) --- backend/btrixcloud/templates/redis.yaml | 17 +++++++++++++++-- chart/values.yaml | 4 ++-- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/backend/btrixcloud/templates/redis.yaml b/backend/btrixcloud/templates/redis.yaml index 1efa9500..d41abc3c 100644 --- a/backend/btrixcloud/templates/redis.yaml +++ b/backend/btrixcloud/templates/redis.yaml @@ -110,8 +110,21 @@ spec: memory: {{ redis_memory }} readinessProbe: + initialDelaySeconds: 10 + timeoutSeconds: 5 exec: command: - - redis-cli - - ping + - bash + - -c + - "res=$(redis-cli ping); [[ $res = 'PONG' ]]" + + livenessProbe: + initialDelaySeconds: 10 + timeoutSeconds: 5 + exec: + command: + - bash + - -c + - "res=$(redis-cli ping); [[ $res = 'PONG' ]]" + {% endif %} diff --git a/chart/values.yaml b/chart/values.yaml index 86391a1f..67f0aa6b 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -170,9 +170,9 @@ redis_pull_policy: "IfNotPresent" redis_url: "redis://local-redis.default:6379/1" -redis_cpu: "5m" +redis_cpu: "10m" -redis_memory: "48Mi" +redis_memory: "200Mi" redis_storage: "3Gi"