feat(helm): add sentinel support to redis-replication chart#1684
Open
vvyushmanov wants to merge 1 commit intoOT-CONTAINER-KIT:mainfrom
Open
feat(helm): add sentinel support to redis-replication chart#1684vvyushmanov wants to merge 1 commit intoOT-CONTAINER-KIT:mainfrom
vvyushmanov wants to merge 1 commit intoOT-CONTAINER-KIT:mainfrom
Conversation
The RedisReplication CRD supports an embedded spec.sentinel field, but the redis-replication Helm chart does not template it. This forces users to use kubectl patch after Helm install, which creates a race condition with the operator reconciler. Add a sentinel section to values.yaml (disabled by default) and template all supported sentinel fields in redis-replication.yaml, including container config, auth, and sentinel-specific parameters. Fixes OT-CONTAINER-KIT#1683 Signed-off-by: Vadim Iushmanov <vadim.yushmanov@gmail.com>
7ee1ec7 to
13e8c2c
Compare
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.
Description
The
RedisReplicationCRD supports an embeddedspec.sentinelfield, but theredis-replicationHelm chart (v0.16.13) does not template it. This forces usersto use
kubectl patchafter Helm install to enable Sentinel, which creates a racecondition with the operator reconciler — the operator briefly reconciles the CR
without sentinel config before the patch arrives.
This PR adds a
sentinelsection tovalues.yaml(disabled by default) andtemplates all supported fields in
redis-replication.yaml:image,tag,imagePullPolicy,imagePullSecrets,resourcesredisSecret(separate from main redis secret)ignoreAnnotations,minReadySeconds,persistentVolumeClaimRetentionPolicyquorum,parallelSyncs,failoverTimeout,downAfterMilliseconds,resolveHostnames,announceHostnames,additionalSentinelConfigFixes #1683
Type of change
Checklist
Additional Context
Sentinel is disabled by default (
sentinel.enabled: false), so this is fullybackwards-compatible. When enabled, the chart renders the same
spec.sentinelblock that users currently have to inject via
kubectl patch.Tested with
helm template— both sentinel-disabled and sentinel-enabled casesrender correctly. Verified against the
Sentinelstruct inapi/redisreplication/v1beta2/redisreplication_types.goto ensure all CRD fieldsare covered. Fields not templated for the main
kubernetesConfigsection(
updateStrategy,service) were intentionally excluded for consistency.Tested with redis-operator v0.23.0 on K3s 1.32.