From a8332d6cdfc33466bf621d6322ef4d09731fd504 Mon Sep 17 00:00:00 2001 From: Juan Ariza Toledano Date: Wed, 3 Jul 2019 15:26:31 +0200 Subject: [PATCH] [stable/redis] Collect metrics from sentinels when enabled (#15156) * [stable/redis] Collect metrics from sentinels when enabled Signed-off-by: juan131 * Rebase branch from master Signed-off-by: juan131 --- stable/redis/Chart.yaml | 2 +- stable/redis/templates/metrics-deployment.yaml | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/stable/redis/Chart.yaml b/stable/redis/Chart.yaml index e609194478..4f007bb446 100644 --- a/stable/redis/Chart.yaml +++ b/stable/redis/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: redis -version: 8.0.15 +version: 8.0.16 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/metrics-deployment.yaml b/stable/redis/templates/metrics-deployment.yaml index 0e45535b42..acd961717d 100644 --- a/stable/redis/templates/metrics-deployment.yaml +++ b/stable/redis/templates/metrics-deployment.yaml @@ -53,10 +53,12 @@ spec: {{- end }} env: - name: REDIS_ADDR - {{- if .Values.cluster.enabled }} + {{- if and .Values.cluster.enabled .Values.sentinel.enabled }} + value: {{ printf "%s:%d" ( include "redis.fullname" . ) ( int .Values.sentinel.service.redisPort ) | quote }} + {{- else if .Values.cluster.enabled }} value: {{ printf "%s-master:%d,%s-slave:%d" ( include "redis.fullname" . ) ( int .Values.redisPort ) ( include "redis.fullname" . ) ( int .Values.redisPort ) | quote }} {{- else }} - value: {{ printf "%s-master:%d" (include "redis.fullname" . ) (int .Values.redisPort) | quote }} + value: {{ printf "%s-master:%d" ( include "redis.fullname" . ) (int .Values.redisPort) | quote }} {{- end }} - name: REDIS_ALIAS value: {{ template "redis.fullname" . }}