diff --git a/charts/argo-cd/templates/redis/_configs.tpl b/charts/argo-cd/templates/redis/_configs.tpl deleted file mode 100644 index 7810f010..00000000 --- a/charts/argo-cd/templates/redis/_configs.tpl +++ /dev/null @@ -1,29 +0,0 @@ -{{/* vim: set filetype=mustache: */}} - -{{- define "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" -{{- end }} - -{{- define "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 }} diff --git a/charts/argo-cd/templates/redis/health-configmap.yaml b/charts/argo-cd/templates/redis/health-configmap.yaml index ca7af228..fd0ecff7 100644 --- a/charts/argo-cd/templates/redis/health-configmap.yaml +++ b/charts/argo-cd/templates/redis/health-configmap.yaml @@ -9,7 +9,27 @@ metadata: {{- include "argo-cd.labels" (dict "context" . "component" .Values.redis.name "name" .Values.redis.name) | nindent 4 }} data: redis_liveness.sh: | -{{- include "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: | -{{- include "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 }}