Conversation
Add spec.sentinel.enabled field to allow operator-managed failover instead of Redis Sentinel, reducing pod overhead from 5 pods (2 Redis + 3 Sentinel) to 2 pods (Redis only). Changes: - Add sentinel.enabled and sentinel.failoverTimeout API fields - Add GetReplicationInfo() to Redis client for smart replica selection - Add operator-managed failover logic (checkAndHealOperatorManagedMode) - Add EnsureNotPresentSentinelResources() for Sentinel cleanup - Add PromoteBestReplica() for failover with replication offset selection - Modify shutdown script to skip Sentinel failover when disabled - Add comprehensive unit tests for new functionality Failover behavior when sentinel.enabled=false: - 0 masters: elect best replica by replication offset (or oldest) - 1 master: check health, failover if unhealthy - Multiple masters: error state requiring manual intervention
- Document sentinel-free mode in README - Update version references to v1.7.0 - Update roadmap to include sentinel-free feature - Add connection instructions for sentinel-free mode - Add E2E test job for sentinel-free architecture - Regenerate CRD with sentinel.enabled and failoverTimeout fields
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.
Summary
Add
spec.sentinel.enabledfield to allow operator-managed failover instead of Redis Sentinel, reducing pod overhead from 5 pods (2 Redis + 3 Sentinel) to 2 pods (Redis only).This is the v1.7.0 release.
Changes
Core Implementation
sentinel.enabled(default: true) andsentinel.failoverTimeout(default: 10s) API fieldsGetReplicationInfo()to Redis client for smart replica selection by replication offsetcheckAndHealOperatorManagedMode)EnsureNotPresentSentinelResources()for Sentinel resource cleanupPromoteBestReplica()for failover with replication offset-based selectionDocumentation
Testing
Failover behavior when
sentinel.enabled=falseExample Usage
Test plan
go test ./...)go build ./...)enabled: falseCloses #9