Skip to content

feat: add Valkey 8.2/9.0/9.1 support, version-aware config, downgrade…#84

Open
chideat wants to merge 6 commits intomainfrom
valkey-version-support
Open

feat: add Valkey 8.2/9.0/9.1 support, version-aware config, downgrade…#84
chideat wants to merge 6 commits intomainfrom
valkey-version-support

Conversation

@chideat
Copy link
Owner

@chideat chideat commented Mar 18, 2026

… protection, and comprehensive e2e tests

  • Extend version enum to 8.2, 9.0, 9.1 in API and CRDs
  • Add IsAtLeast() helper and version gate constants (MinLatencyTrackingVersion, MinLazyfreeUserFlushVersion)
  • Make CustomConfigs() version-aware: inject latency-tracking and lazyfree-lazy-user-flush for 9.0+
  • Simplify Compare() logic; fix typo GenerateNodePortSerivce → GenerateNodePortService
  • Add webhook version downgrade protection (ValidateUpdate rejects spec.version regressions)
  • Add e2e helpers file with killPod (UID-based), checkInstanceConfig, checkInstanceVersion, skipIfVersionLessThan, patchInstanceVersion
  • Add comprehensive extra test cases: ACL enforcement, auth rejection, config hot-reload, data types, latency-tracking gate, cluster/failover resilience, version upgrades
  • Fix e2e: use node IP:Port for ValkeyReplica clients; increase update timeout 5m→10m; skip upgrade tests when target version unavailable

… protection, and comprehensive e2e tests

- Extend version enum to 8.2, 9.0, 9.1 in API and CRDs
- Add IsAtLeast() helper and version gate constants (MinLatencyTrackingVersion, MinLazyfreeUserFlushVersion)
- Make CustomConfigs() version-aware: inject latency-tracking and lazyfree-lazy-user-flush for 9.0+
- Simplify Compare() logic; fix typo GenerateNodePortSerivce → GenerateNodePortService
- Add webhook version downgrade protection (ValidateUpdate rejects spec.version regressions)
- Add e2e helpers file with killPod (UID-based), checkInstanceConfig, checkInstanceVersion, skipIfVersionLessThan, patchInstanceVersion
- Add comprehensive extra test cases: ACL enforcement, auth rejection, config hot-reload, data types, latency-tracking gate, cluster/failover resilience, version upgrades
- Fix e2e: use node IP:Port for ValkeyReplica clients; increase update timeout 5m→10m; skip upgrade tests when target version unavailable
Copilot AI review requested due to automatic review settings March 18, 2026 14:41
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Valkey 8.2/9.0/9.1 support across APIs/CRDs, introduces version-gated config defaults, prevents version downgrades via webhook validation, and expands/strengthens e2e coverage (including upgrade/resilience scenarios).

Changes:

  • Extend supported Valkey versions (API + CRDs + e2e matrix) and add version-gated defaults via ValkeyVersion.IsAtLeast() + config gates.
  • Add webhook update validation to reject spec.version downgrades, plus an e2e spec validating that behavior.
  • Expand e2e helpers and add a large set of additional e2e test cases (ACL/auth/config reload/data types/resilience/upgrades), plus fix replica client addressing and increase readiness timeouts.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
test/e2e/e2e_testdata_test.go Use NodePort addresses for replica clients; disable client cache to avoid restricted commands; increase readiness timeouts to reduce flakes.
test/e2e/e2e_test.go Expand supported versions and add an e2e webhook test for downgrade rejection.
test/e2e/e2e_helpers_test.go New e2e helper utilities (instance creation, config/version checks, pod kill, version gating, upgrade patching).
test/e2e/e2e_extra_testcases_test.go New comprehensive extra e2e specs (ACL/auth/config reload/data types/version gates/resilience/upgrades).
pkg/version/version.go Add version gate constants, make CustomConfigs version-aware, simplify Compare, add IsAtLeast.
pkg/version/version_test.go Add unit tests for new versions/config gating and IsAtLeast.
internal/webhook/rds/v1alpha1/valkey_webhook.go Add ValidateUpdate downgrade protection using parsed Valkey versions.
internal/ops/cluster/actor/actor_ensure_resource.go Fix function name typo for NodePort service generation.
internal/builder/clusterbuilder/service.go Rename GenerateNodePortSerivceGenerateNodePortService.
internal/builder/clusterbuilder/service_test.go Update test to use renamed NodePort service generator.
config/manager/kustomization.yaml Pin controller image tag to v0.1.0-alpha instead of latest.
config/crd/bases/valkey.buf.red_sentinels.yaml CRD doc update for toleration operators (Exists/Equal/Lt/Gt) and feature gate note.
config/crd/bases/valkey.buf.red_failovers.yaml Same toleration operator doc update.
config/crd/bases/valkey.buf.red_clusters.yaml Same toleration operator doc update.
config/crd/bases/rds.valkey.buf.red_valkeys.yaml Update spec.version enum + description to include 8.2/9.0/9.1.
api/rds/v1alpha1/valkey_types.go Update spec.version comment + enum to include 8.2/9.0/9.1 and stability notes.
CLAUDE.md Add repository guidance (commands, architecture notes, testing patterns).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

chideat and others added 4 commits March 18, 2026 22:54
Prevents nil pointer dereference when ValidateUpdate is called with a nil
oldInst (e.g. in unit tests or edge-case admission review requests).
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Seer <kvcnow@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Seer <kvcnow@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Seer <kvcnow@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants