From 175da9d3886a99bffe75f42387bc28d760a1e216 Mon Sep 17 00:00:00 2001 From: Abdul Munim Dibosh Date: Mon, 15 Mar 2021 19:23:10 +0800 Subject: [PATCH] [bitnami/redis-cluster] Update instruction for nodes in values.yaml (#5735) * Update instruction for nodes in values.yaml It might be a case, where people will override the node count and will set to something less than 3 and will not necessarily understand the inclusion of replica count. More importantly, if the node count does not allow at least 3 master nodes to be created e.g. nodes=3/4 with replicas=1, the cluster creation will fail. This has to be clearly mentioned to avoid further confusion. * Update readme * Bump patch number * Fix trailing spaces * Update readme and values.yaml comments as per review Co-authored-by: Abdul Munim Dibosh --- bitnami/redis-cluster/Chart.yaml | 2 +- bitnami/redis-cluster/README.md | 8 +++++--- bitnami/redis-cluster/values.yaml | 7 +++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/bitnami/redis-cluster/Chart.yaml b/bitnami/redis-cluster/Chart.yaml index 4953da93e..ca62f3e83 100644 --- a/bitnami/redis-cluster/Chart.yaml +++ b/bitnami/redis-cluster/Chart.yaml @@ -23,4 +23,4 @@ name: redis-cluster sources: - https://github.com/bitnami/bitnami-docker-redis - http://redis.io/ -version: 4.4.0 +version: 4.4.1 diff --git a/bitnami/redis-cluster/README.md b/bitnami/redis-cluster/README.md index 2c0dc5395..d1bb8b645 100644 --- a/bitnami/redis-cluster/README.md +++ b/bitnami/redis-cluster/README.md @@ -251,8 +251,8 @@ The following table lists the configurable parameters of the RedisTM | Parameter | Description | Default | |-------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|----------------| | `cluster.init` | Enable the creation of a job that initializes the RedisTM Cluster | `true` | -| `cluster.nodes` | Number of nodes in the RedisTM cluster | `6` | -| `cluster.replicas` | Number of replicas for every master in the cluster | `1` | +| `cluster.nodes` | Total Number of nodes in the RedisTM cluster including `replicas`. See the "Cluster topology" section | `6` | +| `cluster.replicas` | Number of replicas for every master in the cluster | `1` | | `cluster.externalAccess.enabled` | Enable access to the RedisTM cluster from Outside the Kubernetes Cluster | `false` | | `cluster.externalAccess.service.type` | Type for the services used to expose every Pod | `LoadBalancer` | | `cluster.externalAccess.service.port` | Port for the services used to expose every Pod | `6379` | @@ -338,7 +338,9 @@ To modify the RedisTM version used in this chart you can specify a [v ### Cluster topology -The Helm Chart will deploy by default 3 redis masters and 3 replicas. By default the RedisTM Cluster is not accessible from outside the Kubernetes cluster, to access the RedisTM Cluster from outside you have to set `cluster.externalAccess.enabled=true` at deployment time. It will create in the first installation only 6 LoadBalancer services, one for each RedisTM node, once you have the external IPs of each service you will need to perform an upgrade passing those IPs to the `cluster.externalAccess.service.loadbalancerIP` array. +To successfully set the cluster up, it will need to have at least 3 master nodes. The total number of nodes is calculated like- `nodes = numOfMasterNodes + numOfMasterNodes * replicas`. Hence, the defaults `cluster.nodes = 6` and `cluster.replicas = 1` means, 3 master and 3 replica nodes will be deployed by the chart. + +By default the RedisTM Cluster is not accessible from outside the Kubernetes cluster, to access the RedisTM Cluster from outside you have to set `cluster.externalAccess.enabled=true` at deployment time. It will create in the first installation only 6 LoadBalancer services, one for each RedisTM node, once you have the external IPs of each service you will need to perform an upgrade passing those IPs to the `cluster.externalAccess.service.loadbalancerIP` array. The replicas will be read-only replicas of the masters. By default only one service is exposed (when not using the external access mode). You will connect your client to the exposed service, regardless you need to read or write. When a write operation arrives to a replica it will redirect the client to the proper master node. For example, using `redis-cli` you will need to provide the `-c` flag for `redis-cli` to follow the redirection automatically. diff --git a/bitnami/redis-cluster/values.yaml b/bitnami/redis-cluster/values.yaml index dd92b179f..f7432f90c 100644 --- a/bitnami/redis-cluster/values.yaml +++ b/bitnami/redis-cluster/values.yaml @@ -47,6 +47,13 @@ cluster: init: true ## Number of Redis(TM) nodes to be deployed ## + ## Note: + ## This is total number of nodes including the replicas. Meaning there will be 3 master and 3 replica + ## nodes (as replica count is set to 1 by default, there will be 1 replica per master node). + ## Hence, nodes = numberOfMasterNodes + numberOfMasterNodes * replicas + ## + ## The number of master nodes should always be >= 3, otherwise cluster creation will fail + ## nodes: 6 ## Parameter to be passed as --cluster-replicas to the redis-cli --cluster create ## 1 means that we want a replica for every master created