Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
76d40b0
fix: RedisCluster - make scale-out resilient by waiting for node conv…
simonnorra-sap Feb 4, 2026
9299c99
fix: Fix ACL SAVE when using ACL from PVC (#1645)
naimadswdn Feb 5, 2026
2eb7d56
docs: update architecture diagram with Meshery design (#1686)
Mohamed-Magdy-Dewidar Feb 23, 2026
6d1208b
docs: fix minor typos (#1674)
arpan57 Feb 24, 2026
7ae2c18
feat: Add sentinel support to redis-replication chart (#1684)
vvyushmanov Feb 24, 2026
bafe989
fix: Make RedisCluster scaling resilient to failover and open slots (…
shubham-cmyk Mar 2, 2026
7f56593
fix: correct namespaces RBAC resource (#1673)
arpan57 Mar 4, 2026
587ed19
fix: race condition with global serviceType variable (#1696)
JulianPaulus Mar 5, 2026
cd4c9b3
fix: respect persistenceEnabled for initContainer (#1671)
arpan57 Mar 5, 2026
b3598b2
docs: add nodeConfVolume to cluster example (#1670)
arpan57 Mar 5, 2026
64b573c
feat(metrics): Add Redis Exporter metrics service for cluster, replic…
naimadswdn Mar 5, 2026
5af3ac9
fix: Skip PVC shrink attempts in HandlePVCResizing (#1669)
arpan57 Mar 5, 2026
9ddef46
docs: fix example redisSecret indentation (#1675)
arpan57 Mar 5, 2026
1cf6cca
fix!: use ca.crt instead of ca.key, resolve startup failure when usin…
ryan4yin Mar 5, 2026
79726f2
fix: aggregate operator ClusterRole into admin (#1672)
arpan57 Mar 5, 2026
b16c482
fix: default leader/follower replicas to clusterSize (#1681)
arpan57 Mar 6, 2026
a466960
chore(deps): bump hadolint/hadolint-action from 3.1.0 to 3.3.0 (#1554)
dependabot[bot] Mar 6, 2026
c8e22c1
chore(deps): bump actions/setup-python from 5 to 6 (#1555)
dependabot[bot] Mar 6, 2026
7ad5c9e
chore(deps): bump actions/stale from 9 to 10 (#1553)
dependabot[bot] Mar 6, 2026
22e39a1
fix: do not create empty PVC when storage has only volumeMount
aa1ex Jan 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ jobs:
uses: actions/checkout@v5

- name: Execute dockerlinter
uses: hadolint/hadolint-action@v3.1.0
uses: hadolint/hadolint-action@v3.3.0
with:
dockerfile: Dockerfile
ignore: DL3007,DL3018
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pr-semantics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
replication
sentinel
cluster
metrics
ignoreLabels: |
bot
ignore-semantic-pull-request
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-charts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
version: v3.5.4

- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: '3.9'
check-latest: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
- uses: actions/stale@v10
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
ascending: true
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

For development and testing of operator on local system, we need to set up a [Minikube](https://minikube.sigs.k8s.io/docs/start/) or local Kubernetes cluster.

Minikube is a single node Kubernetes cluster that generally gets used for the development and testing on Kubernetes. For creating a Minkube cluster we need to simply run:
Minikube is a single node Kubernetes cluster that generally gets used for the development and testing on Kubernetes. For creating a Minikube cluster we need to simply run:

```shell
$ minikube start --vm-driver virtualbox
Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,4 @@ GOBIN=$(LOCALBIN) go install $${package} ;\
mv "$$(echo "$(1)" | sed "s/-$(3)$$//")" $(1) ;\
}
endef

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This operator only supports versions of Redis `>=6`.
## Architecture

<div align="center">
<img src="./static/redis-operator-architecture.png">
<img src="./static/updated-redis-operator-architecture-using-meshery.jpg">
</div>

## Purpose
Expand Down
7 changes: 4 additions & 3 deletions api/common/v1beta2/common_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ type RedisConfig struct {
AdditionalRedisConfig *string `json:"additionalRedisConfig,omitempty"`
}

// Storage is the inteface to add pvc and pv support in redis
// Storage is the interface to add pvc and pv support in redis
// +k8s:deepcopy-gen=true
type Storage struct {
KeepAfterDelete bool `json:"keepAfterDelete,omitempty"`
Expand All @@ -178,7 +178,7 @@ type AdditionalVolume struct {
// TLS Configuration for redis instances
// +k8s:deepcopy-gen=true
type TLSConfig struct {
CaKeyFile string `json:"ca,omitempty"`
CaCertFile string `json:"ca,omitempty"`
CertKeyFile string `json:"cert,omitempty"`
KeyFile string `json:"key,omitempty"`
// Reference to secret which contains the certificates
Expand Down Expand Up @@ -288,7 +288,8 @@ type ACLConfig struct {
Secret *corev1.SecretVolumeSource `json:"secret,omitempty"`
// PersistentVolumeClaim-based ACL configuration
// Specify the PVC name to mount ACL file from persistent storage
// The operator will automatically mount /etc/redis/user.acl from the PVC
// The operator mounts the PVC at /data/redis so Redis can read and update /data/redis/user.acl
// This feature requires the GenerateConfigInInitContainer feature gate to be enabled.
PersistentVolumeClaim *string `json:"persistentVolumeClaim,omitempty"`
}

Expand Down
6 changes: 3 additions & 3 deletions charts/redis-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ helm delete <my-release> --namespace <namespace>

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| TLS.ca | string | `"ca.key"` | |
| TLS.ca | string | `"ca.crt"` | |
| TLS.cert | string | `"tls.crt"` | |
| TLS.key | string | `"tls.key"` | |
| TLS.secret.secretName | string | `""` | |
Expand All @@ -70,7 +70,7 @@ helm delete <my-release> --namespace <namespace>
| priorityClassName | string | `""` | |
| redisCluster.clusterSize | int | `3` | Default number of replicas for both leader and follower when not explicitly set |
| redisCluster.clusterVersion | string | `"v7"` | |
| redisCluster.enableMasterSlaveAntiAffinity | bool | `false` | Enable 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.enableMasterSlaveAntiAffinity | bool | `false` | Enable 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.affinity | string | `nil` | |
| redisCluster.follower.livenessProbe | object | `{}` | |
| redisCluster.follower.nodeSelector | string | `nil` | |
Expand Down Expand Up @@ -103,7 +103,7 @@ helm delete <my-release> --namespace <namespace>
| redisCluster.name | string | `""` | |
| redisCluster.persistenceEnabled | bool | `true` | |
| redisCluster.persistentVolumeClaimRetentionPolicy | object | `{}` | |
| redisCluster.recreateStatefulSetOnUpdateInvalid | bool | `false` | Some 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.recreateStatefulSetOnUpdateInvalid | bool | `false` | Some 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.secretKey | string | `""` | |
| redisCluster.redisSecret.secretName | string | `""` | |
| redisCluster.resources | object | `{}` | |
Expand Down
3 changes: 2 additions & 1 deletion charts/redis-cluster/templates/follower-service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if and (gt (int .Values.redisCluster.follower.replicas) 0) (eq .Values.externalService.enabled true) }}
{{- $followerReplicas := .Values.redisCluster.follower.replicas | default .Values.redisCluster.clusterSize }}
{{- if and (gt (int $followerReplicas) 0) (eq .Values.externalService.enabled true) }}
---
apiVersion: v1
kind: Service
Expand Down
4 changes: 3 additions & 1 deletion charts/redis-cluster/templates/follower-sm.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if and (eq .Values.serviceMonitor.enabled true) (gt (int .Values.redisCluster.follower.replicas) 0) }}
{{- $followerReplicas := .Values.redisCluster.follower.replicas | default .Values.redisCluster.clusterSize }}
{{- if and (eq .Values.serviceMonitor.enabled true) (eq .Values.redisExporter.enabled true) (gt (int $followerReplicas) 0) }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand All @@ -19,6 +20,7 @@ spec:
selector:
matchLabels:
app: {{ .Values.redisCluster.name | default .Release.Name }}-follower
app.kubernetes.io/component: metrics
redis_setup_type: cluster
role: follower
endpoints:
Expand Down
3 changes: 2 additions & 1 deletion charts/redis-cluster/templates/leader-service.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if and (gt (int .Values.redisCluster.leader.replicas) 0) (eq .Values.externalService.enabled true) }}
{{- $leaderReplicas := .Values.redisCluster.leader.replicas | default .Values.redisCluster.clusterSize }}
{{- if and (gt (int $leaderReplicas) 0) (eq .Values.externalService.enabled true) }}
---
apiVersion: v1
kind: Service
Expand Down
4 changes: 3 additions & 1 deletion charts/redis-cluster/templates/leader-sm.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{{- if and (eq .Values.serviceMonitor.enabled true) (gt (int .Values.redisCluster.leader.replicas) 0) }}
{{- $leaderReplicas := .Values.redisCluster.leader.replicas | default .Values.redisCluster.clusterSize }}
{{- if and (eq .Values.serviceMonitor.enabled true) (eq .Values.redisExporter.enabled true) (gt (int $leaderReplicas) 0) }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand All @@ -19,6 +20,7 @@ spec:
selector:
matchLabels:
app: {{ .Values.redisCluster.name | default .Release.Name }}-leader
app.kubernetes.io/component: metrics
redis_setup_type: cluster
role: leader
endpoints:
Expand Down
4 changes: 2 additions & 2 deletions charts/redis-cluster/templates/redis-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ spec:
persistenceEnabled: {{ .Values.redisCluster.persistenceEnabled }}
clusterVersion: {{ .Values.redisCluster.clusterVersion }}
redisLeader: {{- include "redis.role" .Values.redisCluster.leader | nindent 4 }}
replicas: {{ .Values.redisCluster.leader.replicas }}
replicas: {{ .Values.redisCluster.leader.replicas | default .Values.redisCluster.clusterSize }}
{{- if .Values.externalConfig.enabled }}
redisConfig:
additionalRedisConfig: "{{ .Values.redisCluster.name | default .Release.Name }}-ext-config"
{{- end }}

redisFollower: {{- include "redis.role" .Values.redisCluster.follower | nindent 4 }}
replicas: {{ .Values.redisCluster.follower.replicas }}
replicas: {{ .Values.redisCluster.follower.replicas | default .Values.redisCluster.clusterSize }}
{{- if .Values.externalConfig.enabled }}
redisConfig:
additionalRedisConfig: "{{ .Values.redisCluster.name | default .Release.Name }}-ext-config"
Expand Down
8 changes: 4 additions & 4 deletions charts/redis-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ redisCluster:
# memory: 128Mi
minReadySeconds: 0
# -- Some fields of statefulset are immutable, such as volumeClaimTemplates.
# When set to true, the operator will delete the statefulset and recreate it.
# When set to true, the operator will delete the statefulset and recreate it.
# Default is false.
recreateStatefulSetOnUpdateInvalid: false
# -- MaxMemoryPercentOfLimit is the percentage of the Redis container memory limit to be used as maxmemory.
Expand All @@ -35,7 +35,7 @@ redisCluster:
# whenScaled: Retain
# -- Enable 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.
# otherwise it will only add an annotation to the RedisCluster CR.
# Default is false.
enableMasterSlaveAntiAffinity: false
leader:
Expand Down Expand Up @@ -83,7 +83,7 @@ redisCluster:
# successThreshold: 1
# failureThreshold: 4
# initialDelaySeconds: 15

follower:
# -- Number of Redis follower (slave) nodes. If not set, uses clusterSize value
replicas: 3
Expand Down Expand Up @@ -238,7 +238,7 @@ podSecurityContext:
# serviceAccountName: redis-sa

TLS:
ca: ca.key
ca: ca.crt
cert: tls.crt
key: tls.key
secret:
Expand Down
13 changes: 8 additions & 5 deletions charts/redis-operator/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ spec:
description: |-
PersistentVolumeClaim-based ACL configuration
Specify the PVC name to mount ACL file from persistent storage
The operator will automatically mount /etc/redis/user.acl from the PVC
The operator mounts the PVC at /data/redis so Redis can read and update /data/redis/user.acl
This feature requires the GenerateConfigInInitContainer feature gate to be enabled.
type: string
secret:
description: |-
Expand Down Expand Up @@ -3219,7 +3220,7 @@ spec:
type: object
type: array
storage:
description: Storage is the inteface to add pvc and pv support in
description: Storage is the interface to add pvc and pv support in
redis
properties:
keepAfterDelete:
Expand Down Expand Up @@ -5544,7 +5545,8 @@ spec:
description: |-
PersistentVolumeClaim-based ACL configuration
Specify the PVC name to mount ACL file from persistent storage
The operator will automatically mount /etc/redis/user.acl from the PVC
The operator mounts the PVC at /data/redis so Redis can read and update /data/redis/user.acl
This feature requires the GenerateConfigInInitContainer feature gate to be enabled.
type: string
secret:
description: |-
Expand Down Expand Up @@ -13393,7 +13395,8 @@ spec:
description: |-
PersistentVolumeClaim-based ACL configuration
Specify the PVC name to mount ACL file from persistent storage
The operator will automatically mount /etc/redis/user.acl from the PVC
The operator mounts the PVC at /data/redis so Redis can read and update /data/redis/user.acl
This feature requires the GenerateConfigInInitContainer feature gate to be enabled.
type: string
secret:
description: |-
Expand Down Expand Up @@ -16757,7 +16760,7 @@ spec:
type: object
type: array
storage:
description: Storage is the inteface to add pvc and pv support in
description: Storage is the interface to add pvc and pv support in
redis
properties:
keepAfterDelete:
Expand Down
3 changes: 2 additions & 1 deletion charts/redis-operator/templates/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ metadata:
app.kubernetes.io/version : {{ .Chart.AppVersion }}
app.kubernetes.io/component: role
app.kubernetes.io/part-of : {{ .Release.Name }}
rbac.authorization.k8s.io/aggregate-to-admin: "true"
rules:
- apiGroups:
- redis.redis.opstreelabs.in
Expand Down Expand Up @@ -80,7 +81,7 @@ rules:
- configmaps
- events
- persistentvolumeclaims
- namespace
- namespaces
verbs:
- create
- delete
Expand Down
8 changes: 7 additions & 1 deletion charts/redis-replication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ helm delete <my-release> --namespace <namespace>

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| TLS.ca | string | `"ca.key"` | |
| TLS.ca | string | `"ca.crt"` | |
| TLS.cert | string | `"tls.crt"` | |
| TLS.key | string | `"tls.key"` | |
| TLS.secret.secretName | string | `""` | |
Expand Down Expand Up @@ -96,6 +96,12 @@ helm delete <my-release> --namespace <namespace>
| redisReplication.serviceType | string | `"ClusterIP"` | |
| redisReplication.tag | string | `"v7.0.15"` | |
| securityContext | object | `{}` | |
| sentinel | object | `{"announceHostnames":"no","downAfterMilliseconds":"5000","enabled":false,"failoverTimeout":"10000","ignoreAnnotations":[],"image":"quay.io/opstree/redis-sentinel","imagePullPolicy":"IfNotPresent","minReadySeconds":0,"parallelSyncs":"1","persistentVolumeClaimRetentionPolicy":{},"resolveHostnames":"no","resources":{},"size":3,"tag":"v7.0.15"}` | Sentinel configuration for automatic failover. When enabled, the operator creates a Sentinel StatefulSet alongside the replication pods. The operator queries Sentinel for the current master instead of forcing master-by-ordinal. |
| sentinel.announceHostnames | string | `"no"` | Whether Sentinel announces hostnames instead of IPs to clients |
| sentinel.downAfterMilliseconds | string | `"5000"` | Time in milliseconds before master is considered down |
| sentinel.failoverTimeout | string | `"10000"` | Failover timeout in milliseconds |
| sentinel.parallelSyncs | string | `"1"` | Number of replicas to reconfigure in parallel during failover |
| sentinel.resolveHostnames | string | `"no"` | Use hostnames instead of IPs for Sentinel monitoring. WARNING: the operator does not pass RESOLVE_HOSTNAMES env var to sentinel pods, so setting this to "yes" will cause SENTINEL MONITOR to fail. Keep as "no". |
| serviceAccountName | string | `""` | |
| serviceMonitor.enabled | bool | `false` | |
| serviceMonitor.extraLabels | object | `{}` | extraLabels are added to the servicemonitor when enabled set to true |
Expand Down
37 changes: 36 additions & 1 deletion charts/redis-replication/templates/redis-replication.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,39 @@ spec:
minAvailable: {{ .Values.pdb.minAvailable }}
maxUnavailable: {{ .Values.pdb.maxUnavailable }}
{{- end }}

{{- if .Values.sentinel.enabled }}
sentinel:
image: "{{ .Values.sentinel.image }}:{{ .Values.sentinel.tag }}"
imagePullPolicy: "{{ .Values.sentinel.imagePullPolicy }}"
size: {{ .Values.sentinel.size }}
{{- if .Values.sentinel.resources }}
resources: {{ toYaml .Values.sentinel.resources | nindent 6 }}
{{- end }}
{{- if .Values.sentinel.ignoreAnnotations }}
ignoreAnnotations: {{ toYaml .Values.sentinel.ignoreAnnotations | nindent 6 }}
{{- end }}
{{- if .Values.sentinel.minReadySeconds }}
minReadySeconds: {{ .Values.sentinel.minReadySeconds }}
{{- end }}
{{- if .Values.sentinel.persistentVolumeClaimRetentionPolicy }}
persistentVolumeClaimRetentionPolicy: {{ toYaml .Values.sentinel.persistentVolumeClaimRetentionPolicy | nindent 6 }}
{{- end }}
{{- if .Values.sentinel.parallelSyncs }}
parallelSyncs: {{ .Values.sentinel.parallelSyncs | quote }}
{{- end }}
{{- if .Values.sentinel.failoverTimeout }}
failoverTimeout: {{ .Values.sentinel.failoverTimeout | quote }}
{{- end }}
{{- if .Values.sentinel.downAfterMilliseconds }}
downAfterMilliseconds: {{ .Values.sentinel.downAfterMilliseconds | quote }}
{{- end }}
{{- if .Values.sentinel.resolveHostnames }}
resolveHostnames: {{ .Values.sentinel.resolveHostnames | quote }}
{{- end }}
{{- if .Values.sentinel.announceHostnames }}
announceHostnames: {{ .Values.sentinel.announceHostnames | quote }}
{{- end }}
{{- if .Values.sentinel.additionalSentinelConfig }}
additionalSentinelConfig: {{ .Values.sentinel.additionalSentinelConfig | quote }}
{{- end }}
{{- end }}
3 changes: 2 additions & 1 deletion charts/redis-replication/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if eq .Values.serviceMonitor.enabled true }}
{{- if and (eq .Values.serviceMonitor.enabled true) (eq .Values.redisExporter.enabled true) }}
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
Expand All @@ -19,6 +19,7 @@ spec:
selector:
matchLabels:
app: {{ .Values.redisReplication.name | default .Release.Name }}
app.kubernetes.io/component: metrics
redis_setup_type: replication
role: replication
endpoints:
Expand Down
Loading
Loading