redis-cluster

by RADAR-Base

Helm chartv0.17.1App 0.17.1Verified publisher

Provides easy redis setup definitions for Kubernetes services, and deployment.

About this chart

redis

Redis is a key-value based distributed database, this helm chart is for redis cluster setup. This helm chart needs Redis Operator inside Kubernetes cluster. The redis cluster definition can be modified or changed by values.yaml.

Homepage: https://github.com/ot-container-kit/redis-operator

Maintainers

NameEmailUrl
iamabhishek-dubey
sandy724
shubham-cmyk

Pre-Requisities

  • Kubernetes 1.15+
  • Helm 3.X
  • Redis Operator 0.7.0

Source Code

helm repo add ot-helm https://ot-container-kit.github.io/helm-charts/

helm install <my-release> ot-helm/redis-cluster \
    --set redisCluster.clusterSize=3 --namespace <namespace>

Redis setup can be upgraded by using helm upgrade command:-

helm upgrade <my-release> ot-helm/redis-cluster --install \
    --set redisCluster.clusterSize=5 --namespace <namespace>

For uninstalling the chart:-

helm delete <my-release> --namespace <namespace>

Values

KeyTypeDefaultDescription
TLS.castring"ca.key"
TLS.certstring"tls.crt"
TLS.keystring"tls.key"
TLS.secret.secretNamestring""
acl.secret.secretNamestring""
envlist[]
externalConfig.datastring"tcp-keepalive 400\nslowlog-max-len 158\nstream-node-max-bytes 2048\n"
externalConfig.enabledboolfalse
externalService.enabledboolfalse
externalService.portint6379
externalService.serviceTypestring"LoadBalancer"
initContainer.argslist[]
initContainer.commandlist[]
initContainer.enabledboolfalse
initContainer.envlist[]
initContainer.imagestring""
initContainer.imagePullPolicystring"IfNotPresent"
initContainer.resourcesobject{}
labelsobject{}
podSecurityContext.fsGroupint1000
podSecurityContext.runAsUserint1000
priorityClassNamestring""
redisCluster.clusterSizeint3Default number of replicas for both leader and follower when not explicitly set
redisCluster.clusterVersionstring"v7"
redisCluster.enableMasterSlaveAntiAffinityboolfalseEnable pod anti-affinity between leader and follower pods by adding the appropriate label. Notice that this requires the operator to have its mutating webhook enabled, otherwise it will only add an annotation to the RedisCluster CR. Default is false.
redisCluster.follower.affinitystringnil
redisCluster.follower.livenessProbeobject{}
redisCluster.follower.nodeSelectorstringnil
redisCluster.follower.pdb.enabledboolfalse
redisCluster.follower.pdb.maxUnavailableint1
redisCluster.follower.pdb.minAvailableint1
redisCluster.follower.readinessProbeobject{}
redisCluster.follower.replicasint3Number of Redis follower (slave) nodes. If not set, uses clusterSize value
redisCluster.follower.securityContextobject{}
redisCluster.follower.serviceTypestring"ClusterIP"
redisCluster.follower.tolerationslist[]
redisCluster.imagestring"quay.io/opstree/redis"
redisCluster.imagePullPolicystring"IfNotPresent"
redisCluster.imagePullSecretsobject{}
redisCluster.leader.affinityobject{}
redisCluster.leader.livenessProbeobject{}
redisCluster.leader.nodeSelectorstringnil
redisCluster.leader.pdb.enabledboolfalse
redisCluster.leader.pdb.maxUnavailableint1
redisCluster.leader.pdb.minAvailableint1
redisCluster.leader.readinessProbeobject{}
redisCluster.leader.replicasint3Number of Redis leader (master) nodes. If not set, uses clusterSize value
redisCluster.leader.securityContextobject{}
redisCluster.leader.serviceTypestring"ClusterIP"
redisCluster.leader.tolerationslist[]
redisCluster.minReadySecondsint0
redisCluster.namestring""
redisCluster.persistenceEnabledbooltrue
redisCluster.recreateStatefulSetOnUpdateInvalidboolfalseSome fields of statefulset are immutable, such as volumeClaimTemplates. When set to true, the operator will delete the statefulset and recreate it. Default is false.
redisCluster.redisSecret.secretKeystring""
redisCluster.redisSecret.secretNamestring""
redisCluster.resourcesobject{}
redisCluster.tagstring"v7.0.15"
redisExporter.enabledboolfalse
redisExporter.envlist[]
redisExporter.imagestring"quay.io/opstree/redis-exporter"
redisExporter.imagePullPolicystring"IfNotPresent"
redisExporter.resourcesobject{}
redisExporter.securityContextobject{}
redisExporter.tagstring"v1.44.0"
serviceAccountNamestring""
serviceMonitor.enabledboolfalse
serviceMonitor.extraLabelsobject{}extraLabels are added to the servicemonitor when enabled set to true
serviceMonitor.intervalstring"30s"
serviceMonitor.namespacestring""Namespace where servicemonitor resource will be created, if empty it will be created in the same namespace as the redis-cluster
serviceMonitor.scrapeTimeoutstring"10s"
sidecars.envobject{}
sidecars.imagestring""
sidecars.imagePullPolicystring"IfNotPresent"
sidecars.namestring""
sidecars.resources.limits.cpustring"100m"
sidecars.resources.limits.memorystring"128Mi"
sidecars.resources.requests.cpustring"50m"
sidecars.resources.requests.memorystring"64Mi"
storageSpec.nodeConfVolumebooltrue
storageSpec.nodeConfVolumeClaimTemplate.spec.accessModes[0]string"ReadWriteOnce"
storageSpec.nodeConfVolumeClaimTemplate.spec.resources.requests.storagestring"1Gi"
storageSpec.volumeClaimTemplate.spec.accessModes[0]string"ReadWriteOnce"
storageSpec.volumeClaimTemplate.spec.resources.requests.storagestring"1Gi"

Deploy redis-cluster with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has redis-cluster on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartredis-cluster is pinned at v0.17.1 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply