From aed7e29efa666f013fcbfb21af30f00e54380405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=B4=E5=B0=8F=E7=99=BD?= <296015668@qq.com> Date: Wed, 16 Nov 2022 16:10:45 +0800 Subject: [PATCH] [bitnami/redis-cluster] perf: add cluster-announce port and bus-port (#13647) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 吴小白 <296015668@qq.com> Signed-off-by: 吴小白 <296015668@qq.com> --- .../debian-11/rootfs/opt/bitnami/scripts/librediscluster.sh | 6 ++++++ .../debian-11/rootfs/opt/bitnami/scripts/librediscluster.sh | 6 ++++++ bitnami/redis-cluster/README.md | 2 ++ 3 files changed, 14 insertions(+) diff --git a/bitnami/redis-cluster/6.2/debian-11/rootfs/opt/bitnami/scripts/librediscluster.sh b/bitnami/redis-cluster/6.2/debian-11/rootfs/opt/bitnami/scripts/librediscluster.sh index acff6859d394..d2be062c6aeb 100644 --- a/bitnami/redis-cluster/6.2/debian-11/rootfs/opt/bitnami/scripts/librediscluster.sh +++ b/bitnami/redis-cluster/6.2/debian-11/rootfs/opt/bitnami/scripts/librediscluster.sh @@ -91,6 +91,12 @@ redis_cluster_override_conf() { redis_conf_set tls-cluster yes redis_conf_set tls-replication yes fi + if ! is_empty_value "$REDIS_CLUSTER_ANNOUNCE_PORT"; then + redis_conf_set "cluster-announce-port" "$REDIS_CLUSTER_ANNOUNCE_PORT" + fi + if ! is_empty_value "$REDIS_CLUSTER_ANNOUNCE_BUS_PORT"; then + redis_conf_set "cluster-announce-bus-port" "$REDIS_CLUSTER_ANNOUNCE_BUS_PORT" + fi # Multithreading configuration if ! is_empty_value "$REDIS_IO_THREADS_DO_READS"; then redis_conf_set "io-threads-do-reads" "$REDIS_IO_THREADS_DO_READS" diff --git a/bitnami/redis-cluster/7.0/debian-11/rootfs/opt/bitnami/scripts/librediscluster.sh b/bitnami/redis-cluster/7.0/debian-11/rootfs/opt/bitnami/scripts/librediscluster.sh index acff6859d394..d2be062c6aeb 100644 --- a/bitnami/redis-cluster/7.0/debian-11/rootfs/opt/bitnami/scripts/librediscluster.sh +++ b/bitnami/redis-cluster/7.0/debian-11/rootfs/opt/bitnami/scripts/librediscluster.sh @@ -91,6 +91,12 @@ redis_cluster_override_conf() { redis_conf_set tls-cluster yes redis_conf_set tls-replication yes fi + if ! is_empty_value "$REDIS_CLUSTER_ANNOUNCE_PORT"; then + redis_conf_set "cluster-announce-port" "$REDIS_CLUSTER_ANNOUNCE_PORT" + fi + if ! is_empty_value "$REDIS_CLUSTER_ANNOUNCE_BUS_PORT"; then + redis_conf_set "cluster-announce-bus-port" "$REDIS_CLUSTER_ANNOUNCE_BUS_PORT" + fi # Multithreading configuration if ! is_empty_value "$REDIS_IO_THREADS_DO_READS"; then redis_conf_set "io-threads-do-reads" "$REDIS_IO_THREADS_DO_READS" diff --git a/bitnami/redis-cluster/README.md b/bitnami/redis-cluster/README.md index 897ae3c4e164..40b463fb56e0 100644 --- a/bitnami/redis-cluster/README.md +++ b/bitnami/redis-cluster/README.md @@ -181,6 +181,8 @@ The following env vars are supported for this container: | `REDIS_CLUSTER_REPLICAS` | Number of replicas for every master that the cluster will have. | | `REDIS_NODES` | String delimited by spaces containing the hostnames of all of the nodes that will be part of the cluster | | `REDIS_CLUSTER_ANNOUNCE_IP` | IP that the node should announce, used for non dynamic ip environents | +| `REDIS_CLUSTER_ANNOUNCE_PORT` | Port that the node should announce, used for non dynamic ip environents | +| `REDIS_CLUSTER_ANNOUNCE_BUS_PORT` | The cluster bus port to announce | | `REDIS_CLUSTER_DYNAMIC_IPS` | Set to `no` if your Redis(R) cluster will be created with statical IPs. Default: `yes` | | `REDIS_TLS_ENABLED` | Whether to enable TLS for traffic or not. Defaults to `no`. | | `REDIS_TLS_PORT` | Port used for TLS secure traffic. Defaults to `6379`. |