Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,8 @@ kubeconfig
temp/*
tmp/*

.cursor/hooks/state/
.cursor/hooks/state/

site/
.cache/
.venv-docs/
2 changes: 2 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ make manifests # regenerates config/crd/bases/

**Run `make lint` before finishing.** CI will catch it anyway; fix it locally first.

**Keep code comments sparse.** Avoid verbose comments that restate the implementation; add comments only when they clarify non-obvious intent, invariants, or external contracts.

---

## Commands
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ The format follows Keep a Changelog, and this project adheres to Semantic Versio

## [Unreleased]

## [0.2.3]

### Fixed
- Treat Redis `loadmodule` directives as restart-only config so module paths in `spec.redis` are not sent through live `CONFIG SET` reconciliation.

## [0.2.2]

### Fixed
Expand Down
2 changes: 2 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ make manifests # regenerates config/crd/bases/

**Run `make lint` before finishing.** CI will catch it anyway; fix it locally first.

**Keep code comments sparse.** Avoid verbose comments that restate the implementation; add comments only when they clarify non-obvious intent, invariants, or external contracts.

---

## Commands
Expand Down
4 changes: 2 additions & 2 deletions charts/redis-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: redis-operator
description: A Kubernetes operator for managing Redis 7.2 clusters with automatic failover, rolling updates, and backup support.
type: application
version: 0.2.2
appVersion: "0.2.2"
version: 0.2.3
appVersion: "0.2.3"
keywords:
- redis
- operator
Expand Down
7 changes: 6 additions & 1 deletion internal/instance-manager/reconciler/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,13 @@ func requiresRestart(key string) bool {
"tls-port": true,
"unixsocket": true,
"databases": true,
"loadmodule": true,
}
return restartKeys[key]
directive := key
if i := strings.IndexAny(key, " \t"); i >= 0 {
directive = key[:i]
}
return restartKeys[directive]
Comment on lines +447 to +451

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Normalize restart-only directive names before lookup

For clusters whose spec.redis uses valid Redis config casing or leading whitespace, such as LoadModule /usr/local/lib/redis/modules/rejson.so, this keeps directive as LoadModule and the lookup returns false. The pod's generated redis.conf can still load that module at startup, but the instance reconciler will try to apply the same directive via live CONFIG SET on every reconcile instead of skipping it, reintroducing the failure this change is meant to avoid for those inputs. Trim and lowercase the directive before checking restartKeys.

Useful? React with 👍 / 👎.

}

func isTLSEnabled(cluster *redisv1.RedisCluster) bool {
Expand Down
3 changes: 3 additions & 0 deletions internal/instance-manager/reconciler/reconciler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,9 @@ func TestRequiresRestart(t *testing.T) {
{"", false},
{"appendonly", false},
{"hz", false},
{"loadmodule", true},
{"loadmodule /usr/local/lib/redis/modules/redistimeseries.so", true},
{"loadmodule\t/usr/local/lib/redis/modules/rejson.so", true},
}

for _, tt := range tests {
Expand Down
Loading