From 1adb31cb7e622b33b745c822fc162aa9073ea77f Mon Sep 17 00:00:00 2001 From: Sameer Naik Date: Fri, 5 Jul 2019 16:22:36 +0530 Subject: [PATCH] [stable/redis] fix master joining cluster as slave (#15258) Fixes #15115 Signed-off-by: Sameer Naik --- stable/redis/Chart.yaml | 2 +- stable/redis/templates/redis-master-statefulset.yaml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/stable/redis/Chart.yaml b/stable/redis/Chart.yaml index 4f007bb446..1efd6d4c28 100644 --- a/stable/redis/Chart.yaml +++ b/stable/redis/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: redis -version: 8.0.16 +version: 8.0.17 appVersion: 5.0.5 description: Open source, advanced key-value store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets and sorted sets. keywords: diff --git a/stable/redis/templates/redis-master-statefulset.yaml b/stable/redis/templates/redis-master-statefulset.yaml index 69bd70e237..18f2bbce90 100644 --- a/stable/redis/templates/redis-master-statefulset.yaml +++ b/stable/redis/templates/redis-master-statefulset.yaml @@ -179,6 +179,10 @@ spec: printf "\nsentinel auth-pass {{ .Values.sentinel.masterSet }} $REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf {{- end }} fi + echo "Getting information about current running sentinels" + # Get information from existing sentinels + existing_sentinels=$(timeout -s 9 {{ .Values.sentinel.initialCheckTimeout }} redis-cli --raw -h {{ template "redis.fullname" . }} -a $REDIS_PASSWORD -p {{ .Values.sentinel.service.sentinelPort }} SENTINEL sentinels {{ .Values.sentinel.masterSet }}) + echo "$existing_sentinels" | awk -f /health/parse_sentinels.awk | tee -a /opt/bitnami/redis-sentinel/etc/sentinel.conf redis-server /opt/bitnami/redis-sentinel/etc/sentinel.conf --sentinel env: