feat: add Valkey 8.2/9.0/9.1 support, version-aware config, downgrade…#84
Open
feat: add Valkey 8.2/9.0/9.1 support, version-aware config, downgrade…#84
Conversation
… 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
Contributor
There was a problem hiding this comment.
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.versiondowngrades, 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 GenerateNodePortSerivce → GenerateNodePortService. |
| 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.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
… protection, and comprehensive e2e tests