diff --git a/stable/redis-ha/Chart.yaml b/stable/redis-ha/Chart.yaml index 039aa42b59e9..722370061d97 100644 --- a/stable/redis-ha/Chart.yaml +++ b/stable/redis-ha/Chart.yaml @@ -6,7 +6,7 @@ keywords: - redis - keyvalue - database -version: 3.5.1 +version: 3.5.2 appVersion: 5.0.3 description: Highly available Kubernetes implementation of Redis icon: https://upload.wikimedia.org/wikipedia/en/thumb/6/6b/Redis_Logo.svg/1200px-Redis_Logo.svg.png diff --git a/stable/redis-ha/templates/redis-ha-healthchecks.yaml b/stable/redis-ha/templates/redis-ha-healthchecks.yaml index bef98ae37b00..53c78f2afebf 100644 --- a/stable/redis-ha/templates/redis-ha-healthchecks.yaml +++ b/stable/redis-ha/templates/redis-ha-healthchecks.yaml @@ -39,3 +39,13 @@ data: echo "Server check failed with: $CHECK_SERVER" exit 1 fi + + liveness.sh: | + #!/bin/sh + set -eu + CHECK_SERVER="$(redis-cli -p "$1"{{ if .Values.auth }} -a "$AUTH"{{ end }} ping)" + + if [ "$CHECK_SERVER" != "PONG" ] && [ "$CHECK_SERVER" != "LOADING Redis is loading the dataset in memory" ]; then + echo "Server check failed with: $CHECK_SERVER" + exit 1 + fi diff --git a/stable/redis-ha/templates/redis-ha-statefulset.yaml b/stable/redis-ha/templates/redis-ha-statefulset.yaml index dd87b0501f9d..a5facd29182a 100644 --- a/stable/redis-ha/templates/redis-ha-statefulset.yaml +++ b/stable/redis-ha/templates/redis-ha-statefulset.yaml @@ -136,7 +136,7 @@ spec: {{- end }} livenessProbe: exec: - command: [ "sh", "/probes/readiness.sh", "{{ .Values.redis.port }}"] + command: [ "sh", "/probes/liveness.sh", "{{ .Values.redis.port }}"] initialDelaySeconds: 15 periodSeconds: 5 readinessProbe: