Skip to content

Conversation

@pierluigilenoci
Copy link
Contributor

Summary

This PR adds an explicit warning in the values.yaml documentation about the required min-replicas-to-write: 0 configuration when using Redis HA with a single replica.

Problem

When users configure redis-ha.replicas: 1, Redis by default requires at least one secondary replica to accept writes. Without setting min-replicas-to-write: 0, users encounter the error:

NOREPLICAS Not enough good replicas to write

Solution

This PR adds an IMPORTANT note directly after the replicas: 1 setting, making it immediately clear that users must also configure min-replicas-to-write: 0 when using a single replica setup.

Changes:

  • Added explicit warning comment with "IMPORTANT" prefix
  • Positioned the note immediately after replicas: 1 for visibility
  • Included example configuration to uncomment
  • Added reference to Stack Overflow explanation

Why supersede #359?

While #359 identified the same issue, this PR improves the documentation by:

  1. Adding explicit warning text with "IMPORTANT" and "MUST" keywords
  2. Better positioning - placed right after replicas: 1 instead of after persistentVolume
  3. Clearer explanation - explicitly states the error message users will encounter
  4. Maintains context - keeps the related configurations together

Validation

This configuration is already used in the project's CI tests:

  • helm/oauth2-proxy/ci/redis-standalone-values.yaml:29

Supersedes #359

Ref: https://stackoverflow.com/a/59737862

pierluigilenoci and others added 2 commits January 15, 2026 10:19
When using redis-ha with a single replica (replicas: 1), Redis requires
min-replicas-to-write to be set to 0, otherwise write operations fail
with 'NOREPLICAS Not enough good replicas to write' error.

This change adds an explicit IMPORTANT note in the values.yaml
documentation, positioned immediately after the replicas setting to
make the requirement clear to users.

This configuration is already used in the CI tests
(helm/oauth2-proxy/ci/redis-standalone-values.yaml:29) and is
documented in the Redis documentation.

Supersedes oauth2-proxy#359

Signed-off-by: Pierluigi Lenoci <[email protected]>
Signed-off-by: Pierluigi Lenoci <[email protected]>
@pierluigilenoci pierluigilenoci force-pushed the docs/redis-single-replica-config branch from 0b37384 to 284d264 Compare January 15, 2026 09:19
@tuunit tuunit force-pushed the docs/redis-single-replica-config branch from 6073992 to 82b7237 Compare January 16, 2026 07:55
@tuunit tuunit force-pushed the docs/redis-single-replica-config branch from 82b7237 to 7638d06 Compare January 16, 2026 07:55
@tuunit tuunit merged commit fe3e9c8 into oauth2-proxy:main Jan 16, 2026
1 of 2 checks passed
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