valkey-cluster
by stand-sure
Helm chartv1.1.0App 8.0.1Apache-2.0Verified publisher
A Helm chart for deploying Valkey in cluster or standalone mode with persistence, monitoring, and automated cluster initialization
About this chart
valkey-cluster
A Helm chart for deploying Valkey in cluster or standalone mode with persistence, monitoring, and automated cluster initialization
Homepage: https://innago-property-management.github.io/helm-charts/valkey-cluster
Maintainers
| Name | Url | |
|---|---|---|
| Innago | [email protected] |
Source Code
- https://github.com/innago-property-management/helm-charts/tree/main/charts/valkey-cluster
- https://github.com/valkey-io/valkey
Values
| Key | Type | Default | Description |
|---|---|---|---|
| affinity | object | {"podAntiAffinity":{"type":"preferred","weight":100}} | Affinity for pod assignment |
| affinity.podAntiAffinity | object | {"type":"preferred","weight":100} | Pod anti-affinity configuration |
| affinity.podAntiAffinity.type | string | "preferred" | Use preferred (soft) or required (hard) anti-affinity "preferred" allows pods to be scheduled on same node if necessary "required" enforces strict node distribution |
| affinity.podAntiAffinity.weight | int | 100 | Weight for preferred anti-affinity (1-100) |
| auth | object | {"autoGenerate":false,"enabled":false,"existingSecret":"","existingSecretPasswordKey":"password","password":""} | Valkey authentication configuration |
| auth.autoGenerate | bool | false | Auto-generate a random password if password is empty (and no existingSecret) When enabled, uses lookup function to preserve password across upgrades Set to true for development/testing. Use existingSecret for production. |
| auth.enabled | bool | false | Enable password authentication Set to true and configure ONE of: password, autoGenerate, or existingSecret |
| auth.existingSecret | string | "" | Name of existing secret containing Valkey password (recommended for production) |
| auth.existingSecretPasswordKey | string | "password" | Key in existing secret that contains the password |
| auth.password | string | "" | Valkey password (if not using existingSecret) IMPORTANT: You must configure ONE of: password, autoGenerate=true, or existingSecret Leave empty when using existingSecret or autoGenerate |
| cluster | object | {"allowReadsWhenDown":"no","enabled":true,"init":{"activeDeadlineSeconds":300,"backoffLimit":5,"enabled":true,"hookType":"argocd","readinessTimeout":300},"masterCount":3,"nodeTimeout":5000,"replicaValidityFactor":10,"replicasPerMaster":1,"requireFullCoverage":"no"} | Valkey cluster configuration |
| cluster.allowReadsWhenDown | string | "no" | Allow reads when cluster is marked as failed |
| cluster.enabled | bool | true | Enable cluster mode (requires minimum 6 replicas) |
| cluster.init | object | {"activeDeadlineSeconds":300,"backoffLimit":5,"enabled":true,"hookType":"argocd","readinessTimeout":300} | Enable cluster initialization job |
| cluster.init.activeDeadlineSeconds | int | 300 | Init job active deadline in seconds |
| cluster.init.backoffLimit | int | 5 | Init job backoff limit |
| cluster.init.hookType | string | "argocd" | Hook type: "argocd" or "helm" |
| cluster.init.readinessTimeout | int | 300 | Timeout waiting for pods to be ready before cluster creation (seconds) Increased from 180s to accommodate slow storage or large RDB restores |
| cluster.masterCount | int | 3 | Number of master shards (for cluster mode) Total replicas should be masterCount * (1 + replicasPerMaster) |
| cluster.nodeTimeout | int | 5000 | Cluster node timeout in milliseconds |
| cluster.replicaValidityFactor | int | 10 | Replica validity factor (default 10) Controls how long a replica can be disconnected before being invalid for failover |
| cluster.replicasPerMaster | int | 1 | Number of replicas per master shard |
| cluster.requireFullCoverage | string | "no" | Require full hash slot coverage for cluster to accept writes Set to "no" for partial availability during failures |
| config | object | {"appendfsync":"everysec","appendonly":"yes","custom":"","maxmemory":"1800mb","maxmemory-policy":"noeviction","save":"900 1 300 10 60 10000"} | Valkey configuration options These will be merged into valkey.conf |
| config.appendfsync | string | "everysec" | AOF fsync policy |
| config.appendonly | string | "yes" | Enable AOF persistence |
| config.custom | string | "" | Additional custom configuration Add any valkey.conf directives here |
| config.maxmemory | string | "1800mb" | Maximum memory limit (e.g., "1800mb") Should be ~90% of container memory limit (2Gi = 2048Mi → 1800mb recommended) Leave empty for no limit (not recommended for production) |
| config.maxmemory-policy | string | "noeviction" | Maximum memory policy |
| config.save | string | "900 1 300 10 60 10000" | Save snapshots to disk |
| containerEnvFrom | list | [] | Container environment from (ConfigMap/Secret references) |
| containerEnvironmentVariables | list | [] | Container environment variables |
| containerSecurityContext | object | {"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":false,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000} | Container security context |
| fullnameOverride | string | "" | String to fully override valkey-cluster.fullname |
| image.pullPolicy | string | "IfNotPresent" | Image pull policy |
| image.repository | string | "docker.io/valkey/valkey" | Valkey Docker image repository |
| image.tag | string | "" | Overrides the image tag whose default is the chart appVersion |
| imagePullSecrets | list | [] | Docker registry secret names as an array |
| lifecycle | object | {"preStop":{"delay":5,"enabled":true}} | Lifecycle hooks configuration |
| lifecycle.preStop | object | {"delay":5,"enabled":true} | preStop hook for graceful shutdown |
| lifecycle.preStop.delay | int | 5 | Delay in seconds after triggering BGSAVE before shutdown |
| lifecycle.preStop.enabled | bool | true | Enable preStop hook |
| livenessProbe | object | {"enabled":true,"failureThreshold":3,"initialDelaySeconds":30,"periodSeconds":10,"successThreshold":1,"timeoutSeconds":5} | Liveness probe configuration |
| metrics | object | {"enabled":true,"image":{"pullPolicy":"IfNotPresent","repository":"oliver006/redis_exporter","tag":"v1.66.0"},"port":9121,"resources":{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"50m","memory":"64Mi"}},"securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000}} | Prometheus metrics exporter configuration |
| metrics.enabled | bool | true | Enable redis_exporter sidecar for Prometheus metrics |
| metrics.image | object | {"pullPolicy":"IfNotPresent","repository":"oliver006/redis_exporter","tag":"v1.66.0"} | redis_exporter image |
| metrics.port | int | 9121 | redis_exporter port |
| metrics.resources | object | {"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"50m","memory":"64Mi"}} | redis_exporter resources |
| metrics.securityContext | object | {"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000} | redis_exporter security context |
| nameOverride | string | "" | String to partially override valkey-cluster.fullname |
| networkPolicy | object | {"egress":{"customRules":[],"dns":{"to":[]},"enabled":false},"enabled":false,"ingress":{"allowExternal":false,"customRules":[],"namespaceSelector":{},"podSelector":{},"prometheusNamespaceSelector":{}}} | Network policy configuration |
| networkPolicy.egress | object | {"customRules":[],"dns":{"to":[]},"enabled":false} | Egress rules configuration |
| networkPolicy.egress.customRules | list | [] | Custom egress rules (advanced) |
| networkPolicy.egress.dns | object | {"to":[]} | DNS egress configuration |
| networkPolicy.egress.dns.to | list | [] | Custom DNS egress selectors (overrides defaults) If unset, defaults to kube-system namespace with kube-dns labels For CoreDNS or different configurations, customize these selectors Example for custom CoreDNS: to: - namespaceSelector: matchLabels: kubernetes.io/metadata.name: kube-system - podSelector: matchLabels: k8s-app: coredns |
| networkPolicy.egress.enabled | bool | false | Enable egress rules (restricts outbound traffic) |
| networkPolicy.enabled | bool | false | Enable NetworkPolicy creation |
| networkPolicy.ingress | object | {"allowExternal":false,"customRules":[],"namespaceSelector":{},"podSelector":{},"prometheusNamespaceSelector":{}} | Ingress rules configuration |
| networkPolicy.ingress.allowExternal | bool | false | Allow external client connections (beyond pod-to-pod) Requires at least one of namespaceSelector or podSelector to be set |
| networkPolicy.ingress.customRules | list | [] | Custom ingress rules (advanced) |
| networkPolicy.ingress.namespaceSelector | object | {} | Namespace selector for allowed clients Example: namespaceSelector: { matchLabels: { name: "app-namespace" } } |
| networkPolicy.ingress.podSelector | object | {} | Pod selector for allowed clients Example: podSelector: { matchLabels: { app: "my-app" } } |
| networkPolicy.ingress.prometheusNamespaceSelector | object | {} | Namespace selector for Prometheus Example: prometheusNamespaceSelector: { matchLabels: { name: "monitoring" } } |
| nodeSelector | object | {} | Node selector for pod assignment Example for Karpenter: { karpenter.sh/nodepool: stateful } Example for node type: { node.kubernetes.io/instance-type: m5.large } |
| persistence | object | {"accessModes":["ReadWriteOnce"],"annotations":{},"enabled":true,"size":"8Gi","storageClass":""} | Persistence configuration |
| persistence.accessModes | list | ["ReadWriteOnce"] | PVC Access Mode |
| persistence.annotations | object | {} | Annotations for PVCs |
| persistence.enabled | bool | true | Enable persistence using PVC |
| persistence.size | string | "8Gi" | PVC Storage Request |
| persistence.storageClass | string | "" | PVC Storage Class Leave empty ("") to use cluster default storage class If set to "-", storageClassName: "", which disables dynamic provisioning Set to specific class name for cloud providers (e.g., "ebs-sc" for AWS, "standard-rwo" for GKE) |
| podAnnotations | object | {} | Annotations to add to the pod |
| podDisruptionBudget | object | {"enabled":true,"maxUnavailable":null,"minAvailable":null} | Pod disruption budget configuration |
| podDisruptionBudget.enabled | bool | true | Enable PodDisruptionBudget |
| podDisruptionBudget.maxUnavailable | string | nil | Maximum unavailable pods (alternative to minAvailable) If both minAvailable and maxUnavailable are null, minAvailable is auto-calculated |
| podDisruptionBudget.minAvailable | string | nil | Minimum available pods If not set, defaults to: - Cluster mode: masterCount + 1 [ensures quorum is maintained] - Standalone mode: 1 [keeps at least 1 instance] Set explicitly to override auto-calculation |
| podSecurityContext | object | {"fsGroup":1000,"runAsGroup":1000,"runAsUser":1000} | Pod security context |
| readinessProbe | object | {"enabled":true,"failureThreshold":3,"initialDelaySeconds":10,"periodSeconds":5,"successThreshold":1,"timeoutSeconds":3} | Readiness probe configuration |
| replicaCount | int | 6 | Number of Valkey replicas to deploy For cluster mode: minimum 6 (3 masters + 3 replicas) For standalone mode: 1-2 |
| resources | object | {"limits":{"cpu":"1000m","memory":"2Gi"},"requests":{"cpu":"250m","memory":"512Mi"}} | Resource limits and requests |
| service | object | {"client":{"annotations":{},"port":6379,"type":"ClusterIP"},"headless":{"annotations":{},"clusterIP":"None","type":"ClusterIP"}} | Service configuration |
| service.client | object | {"annotations":{},"port":6379,"type":"ClusterIP"} | Client service for application access |
| service.client.annotations | object | {} | Annotations for client service |
| service.client.port | int | 6379 | Service port |
| service.client.type | string | "ClusterIP" | Service type for client service |
| service.headless | object | {"annotations":{},"clusterIP":"None","type":"ClusterIP"} | Headless service for StatefulSet pod DNS |
| service.headless.annotations | object | {} | Annotations for headless service |
| service.headless.clusterIP | string | "None" | Cluster IP (use "None" for headless) |
| service.headless.type | string | "ClusterIP" | Service type for headless service |
| serviceAccount.annotations | object | {} | Annotations to add to the service account |
| serviceAccount.create | bool | true | Specifies whether a service account should be created |
| serviceAccount.name | string | "" | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
| serviceMonitor | object | {"enabled":true,"interval":"30s","labels":{"release":"prometheus"},"namespace":"","namespaceSelector":{},"scrapeTimeout":"10s"} | ServiceMonitor configuration for Prometheus Operator |
| serviceMonitor.enabled | bool | true | Enable ServiceMonitor creation |
| serviceMonitor.interval | string | "30s" | ServiceMonitor scrape interval |
| serviceMonitor.labels | object | {"release":"prometheus"} | ServiceMonitor labels |
| serviceMonitor.namespace | string | "" | ServiceMonitor namespace (defaults to release namespace) |
| serviceMonitor.namespaceSelector | object | {} | Namespace selector for ServiceMonitor (if monitoring across namespaces) Example: namespaceSelector: { matchNames: ["valkey-cluster"] } |
| serviceMonitor.scrapeTimeout | string | "10s" | ServiceM |
Deploy valkey-cluster with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has valkey-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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartvalkey-cluster is pinned at v1.1.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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