summaryrefslogtreecommitdiff
path: root/astroshop-platform/argocd-helmchart/templates/redis/health-configmap.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'astroshop-platform/argocd-helmchart/templates/redis/health-configmap.yaml')
-rw-r--r--astroshop-platform/argocd-helmchart/templates/redis/health-configmap.yaml37
1 files changed, 37 insertions, 0 deletions
diff --git a/astroshop-platform/argocd-helmchart/templates/redis/health-configmap.yaml b/astroshop-platform/argocd-helmchart/templates/redis/health-configmap.yaml
new file mode 100644
index 0000000..7443625
--- /dev/null
+++ b/astroshop-platform/argocd-helmchart/templates/redis/health-configmap.yaml
@@ -0,0 +1,37 @@
+{{- $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: {{ include "argo-cd.namespace" . }}
+ labels:
+ {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }}
+data:
+ redis_liveness.sh: |
+ response=$(
+ redis-cli \
+ -a "${REDIS_PASSWORD}" --no-auth-warning \
+ -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 \
+ -a "${REDIS_PASSWORD}" --no-auth-warning \
+ -h localhost \
+ -p {{ .Values.redis.containerPorts.redis }} \
+ ping
+ )
+ if [ "$response" != "PONG" ] ; then
+ echo "$response"
+ exit 1
+ fi
+ echo "response=$response"
+{{- end }}