diff --git a/stable/redis/Chart.yaml b/stable/redis/Chart.yaml index 4e9efdaef9..b9dfee132e 100644 --- a/stable/redis/Chart.yaml +++ b/stable/redis/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: redis -version: 10.0.2 +version: 10.1.0 appVersion: 5.0.7 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/README.md b/stable/redis/README.md index 5e631ca694..55ac789e0a 100644 --- a/stable/redis/README.md +++ b/stable/redis/README.md @@ -199,6 +199,7 @@ The following table lists the configurable parameters of the Redis chart and the | `sentinel.parallelSyncs` | Number of parallel syncs in the cluster | `1` | | `sentinel.port` | Redis Sentinel port | `26379` | | `sentinel.configmap` | Additional Redis configuration for the sentinel nodes (this value is evaluated as a template) | `nil` | +| `sentinel.staticID` | Enable static IDs for sentinel replicas (If disabled IDs will be randomly generated on startup) | `false` | | `sentinel.service.type` | Kubernetes Service type (redis sentinel) | `ClusterIP` | | `sentinel.service.nodePort` | Kubernetes Service nodePort (redis sentinel) | `nil` | | `sentinel.service.annotations` | annotations for redis sentinel service | {} | diff --git a/stable/redis/templates/redis-master-statefulset.yaml b/stable/redis/templates/redis-master-statefulset.yaml index a870ba0e50..99ec1f1428 100644 --- a/stable/redis/templates/redis-master-statefulset.yaml +++ b/stable/redis/templates/redis-master-statefulset.yaml @@ -200,6 +200,9 @@ spec: printf "\nrequirepass $REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf {{- end }} {{- end }} + {{- if .Values.sentinel.staticID }} + printf "\nsentinel myid $(echo $HOSTNAME | openssl sha1 | awk '{ print $2 }')" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf + {{- end }} fi echo "Getting information about current running sentinels" # Get information from existing sentinels diff --git a/stable/redis/templates/redis-slave-statefulset.yaml b/stable/redis/templates/redis-slave-statefulset.yaml index 1b96484c89..59a7896709 100644 --- a/stable/redis/templates/redis-slave-statefulset.yaml +++ b/stable/redis/templates/redis-slave-statefulset.yaml @@ -230,6 +230,9 @@ spec: printf "\nrequirepass $REDIS_PASSWORD" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf {{- end }} {{- end }} + {{- if .Values.sentinel.staticID }} + printf "\nsentinel myid $(echo $HOSTNAME | openssl sha1 | awk '{ print $2 }')" >> /opt/bitnami/redis-sentinel/etc/sentinel.conf + {{- end }} fi redis-server /opt/bitnami/redis-sentinel/etc/sentinel.conf --sentinel diff --git a/stable/redis/values-production.yaml b/stable/redis/values-production.yaml index 9a0ab8ebaa..5cc7f996e4 100644 --- a/stable/redis/values-production.yaml +++ b/stable/redis/values-production.yaml @@ -83,6 +83,11 @@ sentinel: ## ref: https://redis.io/topics/config ## configmap: + ## Enable or disable static sentinel IDs for each replicas + ## If disabled each sentinel will generate a random id at startup + ## If enabled, each replicas will have a constant ID on each start-up + ## + staticID: false ## Configure extra options for Redis Sentinel liveness and readiness probes ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) ## diff --git a/stable/redis/values.yaml b/stable/redis/values.yaml index 3dc81ccaff..4315491099 100644 --- a/stable/redis/values.yaml +++ b/stable/redis/values.yaml @@ -83,6 +83,11 @@ sentinel: ## ref: https://redis.io/topics/config ## configmap: + ## Enable or disable static sentinel IDs for each replicas + ## If disabled each sentinel will generate a random id at startup + ## If enabled, each replicas will have a constant ID on each start-up + ## + staticID: false ## Configure extra options for Redis Sentinel liveness and readiness probes ## ref: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#configure-probes) ##