feat(argo-cd): Add Probes for redis (#2400)
* feat(argo-cd): Add Probes for redis Signed-off-by: François Blondel <francois.blondel@diva-e.com> * fix: redis: move probes scripts from tpl file into configmap Signed-off-by: François Blondel <francois.blondel@diva-e.com> * Version Bump Signed-off-by: François Blondel <francois.blondel@diva-e.com> * feat: set Redis probes optionnal and disabled by default Signed-off-by: François Blondel <francois.blondel@diva-e.com> --------- Signed-off-by: François Blondel <francois.blondel@diva-e.com> Co-authored-by: François Blondel <francois.blondel@diva-e.com>
This commit is contained in:
parent
4a50afcc77
commit
5da598289d
5 changed files with 176 additions and 5 deletions
35
charts/argo-cd/templates/redis/health-configmap.yaml
Normal file
35
charts/argo-cd/templates/redis/health-configmap.yaml
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{{- $redisHa := index .Values "redis-ha" -}}
|
||||
{{- if and .Values.redis.enabled (not $redisHa.enabled) -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "argo-cd.redis.fullname" . }}-health-configmap
|
||||
namespace: {{ .Release.Namespace | quote }}
|
||||
labels:
|
||||
{{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
|
||||
data:
|
||||
redis_liveness.sh: |
|
||||
response=$(
|
||||
redis-cli \
|
||||
-h localhost \
|
||||
-p {{ .Values.redis.containerPorts.redis }} \
|
||||
ping
|
||||
)
|
||||
if [ "$response" != "PONG" ] && [ "${response:0:7}" != "LOADING" ] ; then
|
||||
echo "$response"
|
||||
exit 1
|
||||
fi
|
||||
echo "response=$response"
|
||||
redis_readiness.sh: |
|
||||
response=$(
|
||||
redis-cli \
|
||||
-h localhost \
|
||||
-p {{ .Values.redis.containerPorts.redis }} \
|
||||
ping
|
||||
)
|
||||
if [ "$response" != "PONG" ] ; then
|
||||
echo "$response"
|
||||
exit 1
|
||||
fi
|
||||
echo "response=$response"
|
||||
{{- end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue