From 2318d1a8079b758963454f1fcbab5f81bf7bc86d Mon Sep 17 00:00:00 2001 From: drivebyer Date: Wed, 31 Jul 2024 18:01:12 +0800 Subject: [PATCH] Fix parameter cluster-preferred-endpoint-type is incompatible with redis version 6 Signed-off-by: drivebyer --- entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index a4da1ae..4ab74b7 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -63,8 +63,13 @@ tls_setup() { { echo tls-replication yes echo tls-cluster yes - echo cluster-preferred-endpoint-type hostname } >> /etc/redis/redis.conf + + if [[ "${REDIS_MAJOR_VERSION}" == "v7" ]]; then + { + echo cluster-preferred-endpoint-type hostname + } >> /etc/redis/redis.conf + fi fi else echo "Running without TLS mode"