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)
This commit is contained in:
Ilya Kreymer 2023-09-28 13:00:31 -07:00 committed by GitHub
parent 7eac0fdf95
commit d6bc467c54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 4 deletions

View File

@ -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 %}

View File

@ -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"