From f582506d7c0974724969dd8dfd92a4b45a333441 Mon Sep 17 00:00:00 2001 From: yangw Date: Wed, 10 Jul 2024 14:31:55 +0800 Subject: [PATCH] feat: add redisReplicationPassword values to connect secured replication (#1021) feat: add redisReplicationPassword values to connect secured replication cluster Signed-off-by: drivebyer Signed-off-by: Matt Robinson --- charts/redis-sentinel/Chart.yaml | 4 ++-- charts/redis-sentinel/templates/redis-sentinel.yaml | 6 ++++++ charts/redis-sentinel/values.yaml | 3 +++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/charts/redis-sentinel/Chart.yaml b/charts/redis-sentinel/Chart.yaml index e03c8dbba..6bb96122f 100644 --- a/charts/redis-sentinel/Chart.yaml +++ b/charts/redis-sentinel/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 name: redis-sentinel description: Provides easy redis setup definitions for Kubernetes services, and deployment. -version: 0.16.0 -appVersion: "0.16.0" +version: 0.16.1 +appVersion: "0.16.1" home: https://github.com/ot-container-kit/redis-operator sources: - https://github.com/ot-container-kit/redis-operator diff --git a/charts/redis-sentinel/templates/redis-sentinel.yaml b/charts/redis-sentinel/templates/redis-sentinel.yaml index c65ad5843..491b8ecf0 100644 --- a/charts/redis-sentinel/templates/redis-sentinel.yaml +++ b/charts/redis-sentinel/templates/redis-sentinel.yaml @@ -9,6 +9,12 @@ spec: # Sentinel Config redisSentinelConfig: redisReplicationName: {{ .Values.redisSentinelConfig.redisReplicationName}} + {{- if and .Values.redisSentinelConfig.redisReplicationPassword.secretName .Values.redisSentinelConfig.redisReplicationPassword.secretKey }} + redisReplicationPassword: + secretKeyRef: + name: {{ .Values.redisSentinelConfig.redisReplicationPassword.secretName | quote }} + key: {{ .Values.redisSentinelConfig.redisReplicationPassword.secretKey | quote }} + {{- end }} masterGroupName : {{ .Values.redisSentinelConfig.masterGroupName | default "myMaster" | quote}} redisPort: {{ .Values.redisSentinelConfig.redisPort | default "6379" | quote}} quorum: {{ .Values.redisSentinelConfig.quorum | default "2" | quote}} diff --git a/charts/redis-sentinel/values.yaml b/charts/redis-sentinel/values.yaml index 43d8c86a2..13041b2d7 100644 --- a/charts/redis-sentinel/values.yaml +++ b/charts/redis-sentinel/values.yaml @@ -30,6 +30,9 @@ labels: {} redisSentinelConfig: redisReplicationName: "redis-replication" + redisReplicationPassword: + secretName: "" + secretKey: "" masterGroupName: "" redisPort: "" quorum: ""