Back to Charts

Redis

stable/redis/README.md

latest64.3 KB
Original Source

Redis

Redis is an advanced key-value cache and store. It is often referred to as a data structure server since keys can contain strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.

This Helm chart is deprecated

Given the stable deprecation timeline, the Bitnami maintained Redis Helm chart is now located at bitnami/charts.

The Bitnami repository is already included in the Hubs and we will continue providing the same cadence of updates, support, etc that we've been keeping here these years. Installation instructions are very similar, just adding the bitnami repo and using it during the installation (bitnami/<chart> instead of stable/<chart>)

bash
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/<chart>           # Helm 3
$ helm install --name my-release bitnami/<chart>    # Helm 2

To update an exisiting stable deployment with a chart hosted in the bitnami repository you can execute

bash
$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm upgrade my-release bitnami/<chart>

Issues and PRs related to the chart itself will be redirected to bitnami/charts GitHub repository. In the same way, we'll be happy to answer questions related to this migration process in this issue created as a common place for discussion.

TL;DR;

bash
# Testing configuration
$ helm install my-release stable/redis
bash
# Production configuration
$ helm install my-release stable/redis --values values-production.yaml

Introduction

This chart bootstraps a Redis deployment on a Kubernetes cluster using the Helm package manager.

Bitnami charts can be used with Kubeapps for deployment and management of Helm Charts in clusters. This chart has been tested to work with NGINX Ingress, cert-manager, fluentd and Prometheus on top of the BKPR.

Prerequisites

  • Kubernetes 1.12+
  • Helm 2.11+ or Helm 3.0-beta3+
  • PV provisioner support in the underlying infrastructure

Installing the Chart

To install the chart with the release name my-release:

bash
$ helm install my-release stable/redis

The command deploys Redis on the Kubernetes cluster in the default configuration. The Parameters section lists the parameters that can be configured during installation.

Tip: List all releases using helm list

Uninstalling the Chart

To uninstall/delete the my-release deployment:

bash
$ helm delete my-release

The command removes all the Kubernetes components associated with the chart and deletes the release.

Parameters

The following table lists the configurable parameters of the Redis chart and their default values.

ParameterDescriptionDefault
global.imageRegistryGlobal Docker image registrynil
global.imagePullSecretsGlobal Docker registry secret names as an array[] (does not add image pull secrets to deployed pods)
global.storageClassGlobal storage class for dynamic provisioningnil
global.redis.passwordRedis password (overrides password)nil
image.registryRedis Image registrydocker.io
image.repositoryRedis Image namebitnami/redis
image.tagRedis Image tag{TAG_NAME}
image.pullPolicyImage pull policyIfNotPresent
image.pullSecretsSpecify docker-registry secret names as an arraynil
nameOverrideString to partially override redis.fullname template with a string (will prepend the release name)nil
fullnameOverrideString to fully override redis.fullname template with a stringnil
cluster.enabledUse master-slave topologytrue
cluster.slaveCountNumber of slaves1
existingSecretName of existing secret object (for password authentication)nil
existingSecretPasswordKeyName of key containing password to be retrieved from the existing secretnil
usePasswordUse passwordtrue
usePasswordFileMount passwords as files instead of environment variablesfalse
passwordRedis password (ignored if existingSecret set)Randomly generated
configmapAdditional common Redis node configuration (this value is evaluated as a template)See values.yaml
clusterDomainKubernetes DNS Domain name to usecluster.local
networkPolicy.enabledEnable NetworkPolicyfalse
networkPolicy.allowExternalDon't require client label for connectionstrue
networkPolicy.ingressNSMatchLabelsAllow connections from other namespaces{}
networkPolicy.ingressNSPodMatchLabelsFor other namespaces match by pod labels and namespace labels{}
securityContext.enabledEnable security context (both redis master and slave pods)true
securityContext.fsGroupGroup ID for the container (both redis master and slave pods)1001
securityContext.runAsUserUser ID for the container (both redis master and slave pods)1001
securityContext.sysctlsSet namespaced sysctls for the container (both redis master and slave pods)nil
serviceAccount.createSpecifies whether a ServiceAccount should be createdfalse
serviceAccount.nameThe name of the ServiceAccount to createGenerated using the fullname template
rbac.createSpecifies whether RBAC resources should be createdfalse
rbac.role.rulesRules to create[]
metrics.enabledStart a side-car prometheus exporterfalse
metrics.image.registryRedis exporter image registrydocker.io
metrics.image.repositoryRedis exporter image namebitnami/redis-exporter
metrics.image.tagRedis exporter image tag{TAG_NAME}
metrics.image.pullPolicyImage pull policyIfNotPresent
metrics.image.pullSecretsSpecify docker-registry secret names as an arraynil
metrics.extraArgsExtra arguments for the binary; possible values here{}
metrics.podLabelsAdditional labels for Metrics exporter pod{}
metrics.podAnnotationsAdditional annotations for Metrics exporter pod{}
metrics.resourcesExporter resource requests/limitMemory: 256Mi, CPU: 100m
metrics.serviceMonitor.enabledif true, creates a Prometheus Operator ServiceMonitor (also requires metrics.enabled to be true)false
metrics.serviceMonitor.namespaceOptional namespace which Prometheus is running innil
metrics.serviceMonitor.intervalHow frequently to scrape metrics (use by default, falling back to Prometheus' default)nil
metrics.serviceMonitor.selectorDefault to kube-prometheus install (CoreOS recommended), but should be set according to Prometheus install{ prometheus: kube-prometheus }
metrics.service.typeKubernetes Service type (redis metrics)ClusterIP
metrics.service.annotationsAnnotations for the services to monitor (redis master and redis slave service){}
metrics.service.labelsAdditional labels for the metrics service{}
metrics.service.loadBalancerIPloadBalancerIP if redis metrics service type is LoadBalancernil
metrics.priorityClassNameMetrics exporter pod priorityClassName{}
metrics.prometheusRule.enabledSet this to true to create prometheusRules for Prometheus operatorfalse
metrics.prometheusRule.additionalLabelsAdditional labels that can be used so prometheusRules will be discovered by Prometheus{}
metrics.prometheusRule.namespacenamespace where prometheusRules resource should be createdSame namespace as redis
metrics.prometheusRule.rulesrules to be created, check values for an example.[]
persistence.existingClaimProvide an existing PersistentVolumeClaimnil
master.persistence.enabledUse a PVC to persist data (master node)true
master.persistence.pathPath to mount the volume at, to use other images/data
master.persistence.subPathSubdirectory of the volume to mount at""
master.persistence.storageClassStorage class of backing PVCgeneric
master.persistence.accessModesPersistent Volume Access Modes[ReadWriteOnce]
master.persistence.sizeSize of data volume8Gi
master.persistence.matchLabelsmatchLabels persistent volume selector{}
master.persistence.matchExpressionsmatchExpressions persistent volume selector{}
master.statefulset.updateStrategyUpdate strategy for StatefulSetonDelete
master.statefulset.rollingUpdatePartitionPartition update strategynil
master.podLabelsAdditional labels for Redis master pod{}
master.podAnnotationsAdditional annotations for Redis master pod{}
redisPortRedis port (in both master and slaves)6379
master.commandRedis master entrypoint string. The command redis-server is executed if this is not provided./run.sh
master.configmapAdditional Redis configuration for the master nodes (this value is evaluated as a template)nil
master.disableCommandsArray of Redis commands to disable (master)["FLUSHDB", "FLUSHALL"]
master.extraFlagsRedis master additional command line flags[]
master.nodeSelectorRedis master Node labels for pod assignment{"beta.kubernetes.io/arch": "amd64"}
master.tolerationsToleration labels for Redis master pod assignment[]
master.affinityAffinity settings for Redis master pod assignment{}
master.schedulerNameName of an alternate schedulernil
master.service.typeKubernetes Service type (redis master)ClusterIP
master.service.portKubernetes Service port (redis master)6379
master.service.nodePortKubernetes Service nodePort (redis master)nil
master.service.annotationsannotations for redis master service{}
master.service.labelsAdditional labels for redis master service{}
master.service.loadBalancerIPloadBalancerIP if redis master service type is LoadBalancernil
master.service.loadBalancerSourceRangesloadBalancerSourceRanges if redis master service type is LoadBalancernil
master.resourcesRedis master CPU/Memory resource requests/limitsMemory: 256Mi, CPU: 100m
master.livenessProbe.enabledTurn on and off liveness probe (redis master pod)true
master.livenessProbe.initialDelaySecondsDelay before liveness probe is initiated (redis master pod)30
master.livenessProbe.periodSecondsHow often to perform the probe (redis master pod)30
master.livenessProbe.timeoutSecondsWhen the probe times out (redis master pod)5
master.livenessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed (redis master pod)1
master.livenessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.5
master.readinessProbe.enabledTurn on and off readiness probe (redis master pod)true
master.readinessProbe.initialDelaySecondsDelay before readiness probe is initiated (redis master pod)5
master.readinessProbe.periodSecondsHow often to perform the probe (redis master pod)10
master.readinessProbe.timeoutSecondsWhen the probe times out (redis master pod)1
master.readinessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed (redis master pod)1
master.readinessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.5
master.priorityClassNameRedis Master pod priorityClassName{}
volumePermissions.enabledEnable init container that changes volume permissions in the registry (for cases where the default k8s runAsUser and fsUser values do not work)false
volumePermissions.image.registryInit container volume-permissions image registrydocker.io
volumePermissions.image.repositoryInit container volume-permissions image namebitnami/minideb
volumePermissions.image.tagInit container volume-permissions image tagbuster
volumePermissions.image.pullPolicyInit container volume-permissions image pull policyAlways
volumePermissions.resources Init container volume-permissions CPU/Memory resource requests/limits{}
slave.service.typeKubernetes Service type (redis slave)ClusterIP
slave.service.nodePortKubernetes Service nodePort (redis slave)nil
slave.service.annotationsannotations for redis slave service{}
slave.service.labelsAdditional labels for redis slave service{}
slave.service.portKubernetes Service port (redis slave)6379
slave.service.loadBalancerIPLoadBalancerIP if Redis slave service type is LoadBalancernil
slave.service.loadBalancerSourceRangesloadBalancerSourceRanges if Redis slave service type is LoadBalancernil
slave.commandRedis slave entrypoint array. The docker image's ENTRYPOINT is used if this is not provided./run.sh
slave.configmapAdditional Redis configuration for the slave nodes (this value is evaluated as a template)nil
slave.disableCommandsArray of Redis commands to disable (slave)[FLUSHDB, FLUSHALL]
slave.extraFlagsRedis slave additional command line flags[]
slave.livenessProbe.enabledTurn on and off liveness probe (redis slave pod)true
slave.livenessProbe.initialDelaySecondsDelay before liveness probe is initiated (redis slave pod)30
slave.livenessProbe.periodSecondsHow often to perform the probe (redis slave pod)10
slave.livenessProbe.timeoutSecondsWhen the probe times out (redis slave pod)5
slave.livenessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed (redis slave pod)1
slave.livenessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.5
slave.readinessProbe.enabledTurn on and off slave.readiness probe (redis slave pod)true
slave.readinessProbe.initialDelaySecondsDelay before slave.readiness probe is initiated (redis slave pod)5
slave.readinessProbe.periodSecondsHow often to perform the probe (redis slave pod)10
slave.readinessProbe.timeoutSecondsWhen the probe times out (redis slave pod)10
slave.readinessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed (redis slave pod)1
slave.readinessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded. (redis slave pod)5
slave.persistence.enabledUse a PVC to persist data (slave node)true
slave.persistence.pathPath to mount the volume at, to use other images/data
slave.persistence.subPathSubdirectory of the volume to mount at""
slave.persistence.storageClassStorage class of backing PVCgeneric
slave.persistence.accessModesPersistent Volume Access Modes[ReadWriteOnce]
slave.persistence.sizeSize of data volume8Gi
slave.persistence.matchLabelsmatchLabels persistent volume selector{}
slave.persistence.matchExpressionsmatchExpressions persistent volume selector{}
slave.statefulset.updateStrategyUpdate strategy for StatefulSetonDelete
slave.statefulset.rollingUpdatePartitionPartition update strategynil
slave.podLabelsAdditional labels for Redis slave podmaster.podLabels
slave.podAnnotationsAdditional annotations for Redis slave podmaster.podAnnotations
slave.schedulerNameName of an alternate schedulernil
slave.resourcesRedis slave CPU/Memory resource requests/limits{}
slave.affinityEnable node/pod affinity for slaves{}
slave.priorityClassNameRedis Slave pod priorityClassName{}
sentinel.enabledEnable sentinel containersfalse
sentinel.usePasswordUse password for sentinel containerstrue
sentinel.masterSetName of the sentinel master setmymaster
sentinel.initialCheckTimeoutTimeout for querying the redis sentinel service for the active sentinel list5
sentinel.quorumQuorum for electing a new master2
sentinel.downAfterMillisecondsTimeout for detecting a Redis node is down60000
sentinel.failoverTimeoutTimeout for performing a election failover18000
sentinel.parallelSyncsNumber of parallel syncs in the cluster1
sentinel.portRedis Sentinel port26379
sentinel.configmapAdditional Redis configuration for the sentinel nodes (this value is evaluated as a template)nil
sentinel.staticIDEnable static IDs for sentinel replicas (If disabled IDs will be randomly generated on startup)false
sentinel.service.typeKubernetes Service type (redis sentinel)ClusterIP
sentinel.service.nodePortKubernetes Service nodePort (redis sentinel)nil
sentinel.service.annotationsannotations for redis sentinel service{}
sentinel.service.labelsAdditional labels for redis sentinel service{}
sentinel.service.redisPortKubernetes Service port for Redis read only operations6379
sentinel.service.sentinelPortKubernetes Service port for Redis sentinel26379
sentinel.service.redisNodePortKubernetes Service node port for Redis read only operations``
sentinel.service.sentinelNodePortKubernetes Service node port for Redis sentinel``
sentinel.service.loadBalancerIPLoadBalancerIP if Redis sentinel service type is LoadBalancernil
sentinel.livenessProbe.enabledTurn on and off liveness probe (redis sentinel pod)true
sentinel.livenessProbe.initialDelaySecondsDelay before liveness probe is initiated (redis sentinel pod)5
sentinel.livenessProbe.periodSecondsHow often to perform the probe (redis sentinel container)5
sentinel.livenessProbe.timeoutSecondsWhen the probe times out (redis sentinel container)5
sentinel.livenessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed (redis sentinel container)1
sentinel.livenessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded.5
sentinel.readinessProbe.enabledTurn on and off sentinel.readiness probe (redis sentinel pod)true
sentinel.readinessProbe.initialDelaySecondsDelay before sentinel.readiness probe is initiated (redis sentinel pod)5
sentinel.readinessProbe.periodSecondsHow often to perform the probe (redis sentinel pod)5
sentinel.readinessProbe.timeoutSecondsWhen the probe times out (redis sentinel container)1
sentinel.readinessProbe.successThresholdMinimum consecutive successes for the probe to be considered successful after having failed (redis sentinel container)1
sentinel.readinessProbe.failureThresholdMinimum consecutive failures for the probe to be considered failed after having succeeded. (redis sentinel container)5
sentinel.resourcesRedis sentinel CPU/Memory resource requests/limits{}
sentinel.image.registryRedis Sentinel Image registrydocker.io
sentinel.image.repositoryRedis Sentinel Image namebitnami/redis-sentinel
sentinel.image.tagRedis Sentinel Image tag{TAG_NAME}
sentinel.image.pullPolicyImage pull policyIfNotPresent
sentinel.image.pullSecretsSpecify docker-registry secret names as an arraynil
sysctlImage.enabledEnable an init container to modify Kernel settingsfalse
sysctlImage.commandsysctlImage command to execute[]
sysctlImage.registrysysctlImage Init container registrydocker.io
sysctlImage.repositorysysctlImage Init container namebitnami/minideb
sysctlImage.tagsysctlImage Init container tagbuster
sysctlImage.pullPolicysysctlImage Init container pull policyAlways
sysctlImage.mountHostSysMount the host /sys folder to /host-sysfalse
sysctlImage.resourcessysctlImage Init container CPU/Memory resource requests/limits{}
podSecurityPolicy.createSpecifies whether a PodSecurityPolicy should be createdfalse

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example,

bash
$ helm install my-release \
  --set password=secretpassword \
    stable/redis

The above command sets the Redis server password to secretpassword.

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example,

bash
$ helm install my-release -f values.yaml stable/redis

Tip: You can use the default values.yaml

Note for minikube users: Current versions of minikube (v0.24.1 at the time of writing) provision hostPath persistent volumes that are only writable by root. Using chart defaults cause pod failure for the Redis pod as it attempts to write to the /bitnami directory. Consider installing Redis with --set persistence.enabled=false. See minikube issue 1990 for more information.

Configuration and installation details

Rolling VS Immutable tags

It is strongly recommended to use immutable tags in a production environment. This ensures your deployment does not change automatically if the same tag is updated with a different image.

Bitnami will release a new chart updating its containers if a new version of the main container, significant changes, or critical vulnerabilities exist.

Production configuration

This chart includes a values-production.yaml file where you can find some parameters oriented to production configuration in comparison to the regular values.yaml. You can use this file instead of the default one.

  • Number of slaves:
diff
- cluster.slaveCount: 2
+ cluster.slaveCount: 3
  • Enable NetworkPolicy:
diff
- networkPolicy.enabled: false
+ networkPolicy.enabled: true
  • Start a side-car prometheus exporter:
diff
- metrics.enabled: false
+ metrics.enabled: true

Cluster topologies

Default: Master-Slave

When installing the chart with cluster.enabled=true, it will deploy a Redis master StatefulSet (only one master node allowed) and a Redis slave StatefulSet. The slaves will be read-replicas of the master. Two services will be exposed:

  • Redis Master service: Points to the master, where read-write operations can be performed
  • Redis Slave service: Points to the slaves, where only read operations are allowed.

In case the master crashes, the slaves will wait until the master node is respawned again by the Kubernetes Controller Manager.

Master-Slave with Sentinel

When installing the chart with cluster.enabled=true and sentinel.enabled=true, it will deploy a Redis master StatefulSet (only one master allowed) and a Redis slave StatefulSet. In this case, the pods will contain en extra container with Redis Sentinel. This container will form a cluster of Redis Sentinel nodes, which will promote a new master in case the actual one fails. In addition to this, only one service is exposed:

  • Redis service: Exposes port 6379 for Redis read-only operations and port 26379 for accesing Redis Sentinel.

For read-only operations, access the service using port 6379. For write operations, it's necessary to access the Redis Sentinel cluster and query the current master using the command below (using redis-cli or similar:

SENTINEL get-master-addr-by-name <name of your MasterSet. Example: mymaster>

This command will return the address of the current master, which can be accessed from inside the cluster.

In case the current master crashes, the Sentinel containers will elect a new master node.

Using password file

To use a password file for Redis you need to create a secret containing the password.

NOTE: It is important that the file with the password must be called redis-password

And then deploy the Helm Chart using the secret name as parameter:

console
usePassword=true
usePasswordFile=true
existingSecret=redis-password-file
sentinels.enabled=true
metrics.enabled=true

Metrics

The chart optionally can start a metrics exporter for prometheus. The metrics endpoint (port 9121) is exposed in the service. Metrics can be scraped from within the cluster using something similar as the described in the example Prometheus scrape configuration. If metrics are to be scraped from outside the cluster, the Kubernetes API proxy can be utilized to access the endpoint.

Host Kernel Settings

Redis may require some changes in the kernel of the host machine to work as expected, in particular increasing the somaxconn value and disabling transparent huge pages. To do so, you can set up a privileged initContainer with the sysctlImage config values, for example:

sysctlImage:
  enabled: true
  mountHostSys: true
  command:
    - /bin/sh
    - -c
    - |-
      install_packages procps
      sysctl -w net.core.somaxconn=10000
      echo never > /host-sys/kernel/mm/transparent_hugepage/enabled

Alternatively, for Kubernetes 1.12+ you can set securityContext.sysctls which will configure sysctls for master and slave pods. Example:

yaml
securityContext:
  sysctls:
  - name: net.core.somaxconn
    value: "10000"

Note that this will not disable transparent huge tables.

Persistence

By default, the chart mounts a Persistent Volume at the /data path. The volume is created using dynamic volume provisioning. If a Persistent Volume Claim already exists, specify it during installation.

Existing PersistentVolumeClaim

  1. Create the PersistentVolume
  2. Create the PersistentVolumeClaim
  3. Install the chart
bash
$ helm install my-release --set persistence.existingClaim=PVC_NAME stable/redis

NetworkPolicy

To enable network policy for Redis, install a networking plugin that implements the Kubernetes NetworkPolicy spec, and set networkPolicy.enabled to true.

For Kubernetes v1.5 & v1.6, you must also turn on NetworkPolicy by setting the DefaultDeny namespace annotation. Note: this will enforce policy for all pods in the namespace:

kubectl annotate namespace default "net.beta.kubernetes.io/network-policy={\"ingress\":{\"isolation\":\"DefaultDeny\"}}"

With NetworkPolicy enabled, only pods with the generated client label will be able to connect to Redis. This label will be displayed in the output after a successful install.

With networkPolicy.ingressNSMatchLabels pods from other namespaces can connect to redis. Set networkPolicy.ingressNSPodMatchLabels to match pod labels in matched namespace. For example, for a namespace labeled redis=external and pods in that namespace labeled redis-client=true the fields should be set:

networkPolicy:
  enabled: true
  ingressNSMatchLabels:
    redis: external
  ingressNSPodMatchLabels:
    redis-client: true

Upgrading an existing Release to a new major version

A major chart version change (like v1.2.3 -> v2.0.0) indicates that there is an incompatible breaking change needing manual actions.

To 10.0.0

For releases with usePassword: true, the value sentinel.usePassword controls whether the password authentication also applies to the sentinel port. This defaults to true for a secure configuration, however it is possible to disable to account for the following cases:

  • Using a version of redis-sentinel prior to 5.0.1 where the authentication feature was introduced.
  • Where redis clients need to be updated to support sentinel authentication.

If using a master/slave topology, or with usePassword: false, no action is required.

To 8.0.18

For releases with metrics.enabled: true the default tag for the exporter image is now v1.x.x. This introduces many changes including metrics names. You'll want to use this dashboard now. Please see the redis_exporter github page for more details.

To 7.0.0

This version causes a change in the Redis Master StatefulSet definition, so the command helm upgrade would not work out of the box. As an alternative, one of the following could be done:

  • Recommended: Create a clone of the Redis Master PVC (for example, using projects like this one). Then launch a fresh release reusing this cloned PVC.
helm install my-release stable/redis --set persistence.existingClaim=<NEW PVC>
  • Alternative (not recommended, do at your own risk): helm delete --purge does not remove the PVC assigned to the Redis Master StatefulSet. As a consequence, the following commands can be done to upgrade the release
helm delete --purge <RELEASE>
helm install <RELEASE> stable/redis

Previous versions of the chart were not using persistence in the slaves, so this upgrade would add it to them. Another important change is that no values are inherited from master to slaves. For example, in 6.0.0 slaves.readinessProbe.periodSeconds, if empty, would be set to master.readinessProbe.periodSeconds. This approach lacked transparency and was difficult to maintain. From now on, all the slave parameters must be configured just as it is done with the masters.

Some values have changed as well:

  • master.port and slave.port have been changed to redisPort (same value for both master and slaves)
  • master.securityContext and slave.securityContext have been changed to securityContext(same values for both master and slaves)

By default, the upgrade will not change the cluster topology. In case you want to use Redis Sentinel, you must explicitly set sentinel.enabled to true.

To 6.0.0

Previous versions of the chart were using an init-container to change the permissions of the volumes. This was done in case the securityContext directive in the template was not enough for that (for example, with cephFS). In this new version of the chart, this container is disabled by default (which should not affect most of the deployments). If your installation still requires that init container, execute helm upgrade with the --set volumePermissions.enabled=true.

To 5.0.0

The default image in this release may be switched out for any image containing the redis-server and redis-cli binaries. If redis-server is not the default image ENTRYPOINT, master.command must be specified.

Breaking changes

  • master.args and slave.args are removed. Use master.command or slave.command instead in order to override the image entrypoint, or master.extraFlags to pass additional flags to redis-server.
  • disableCommands is now interpreted as an array of strings instead of a string of comma separated values.
  • master.persistence.path now defaults to /data.

4.0.0

This version removes the chart label from the spec.selector.matchLabels which is immutable since StatefulSet apps/v1beta2. It has been inadvertently added, causing any subsequent upgrade to fail. See https://github.com/helm/charts/issues/7726.

It also fixes https://github.com/helm/charts/issues/7726 where a deployment extensions/v1beta1 can not be upgraded if spec.selector is not explicitly set.

Finally, it fixes https://github.com/helm/charts/issues/7803 by removing mutable labels in spec.VolumeClaimTemplate.metadata.labels so that it is upgradable.

In order to upgrade, delete the Redis StatefulSet before upgrading:

bash
$ kubectl delete statefulsets.apps --cascade=false my-release-redis-master

And edit the Redis slave (and metrics if enabled) deployment:

bash
kubectl patch deployments my-release-redis-slave --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'
kubectl patch deployments my-release-redis-metrics --type=json -p='[{"op": "remove", "path": "/spec/selector/matchLabels/chart"}]'

Notable changes

9.0.0

The metrics exporter has been changed from a separate deployment to a sidecar container, due to the latest changes in the Redis exporter code. Check the official page for more information. The metrics container image was changed from oliver006/redis_exporter to bitnami/redis-exporter (Bitnami's maintained package of oliver006/redis_exporter).

7.0.0

In order to improve the performance in case of slave failure, we added persistence to the read-only slaves. That means that we moved from Deployment to StatefulSets. This should not affect upgrades from previous versions of the chart, as the deployments did not contain any persistence at all.

This version also allows enabling Redis Sentinel containers inside of the Redis Pods (feature disabled by default). In case the master crashes, a new Redis node will be elected as master. In order to query the current master (no redis master service is exposed), you need to query first the Sentinel cluster. Find more information in this section.