Skip to content

fix: fix validation errors that occur when the redis url contains valid sentinel or cluster config#6394

Merged
arkodg merged 9 commits intoenvoyproxy:mainfrom
keithfz:fix/5086
Jul 3, 2025
Merged

fix: fix validation errors that occur when the redis url contains valid sentinel or cluster config#6394
arkodg merged 9 commits intoenvoyproxy:mainfrom
keithfz:fix/5086

Conversation

@keithfz
Copy link
Contributor

@keithfz keithfz commented Jun 24, 2025

What type of PR is this?

Fixes validation errors that occur when the Redis URL contains "valid" sentinel or cluster configurations.

What this PR does / why we need it:

There are three modes of deployment for Redis that are also compatible with the rate limit service. They each have a slightly different format under the url configuration field.

  • Standalone: A single hostname. The only current configuration considered validation by the validation code
  • Sentinel: the name of the primary node followed by a comma separated list of Redis Sentinel nodes. The primary node can contain alphanumeric characters, -, ., and _.
  • Cluster: comma separated list of all hostnames in the Redis cluster.

This splits the url string by commas, and then validates all returned items in the list. This way, Sentinel and Cluster configurations are also considered valid, and do not need work-arounds that obfuscate the actual configuration.

Which issue(s) this PR fixes:

Fixes #5086

Release Notes: Yes

keithfz added 4 commits June 23, 2025 19:52
…hosts.

Signed-off-by: keithfz <kzeto4@gmail.com>
Signed-off-by: keithfz <kzeto4@gmail.com>
Signed-off-by: keithfz <kzeto4@gmail.com>
Signed-off-by: keithfz <kzeto4@gmail.com>
@keithfz keithfz requested a review from a team as a code owner June 24, 2025 05:37
Signed-off-by: keithfz <kzeto4@gmail.com>
@codecov
Copy link

codecov bot commented Jun 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.90%. Comparing base (5016dda) to head (5255c72).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6394      +/-   ##
==========================================
- Coverage   70.92%   70.90%   -0.03%     
==========================================
  Files         220      220              
  Lines       37260    37262       +2     
==========================================
- Hits        26428    26420       -8     
- Misses       9285     9294       +9     
- Partials     1547     1548       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

keithfz added 3 commits June 24, 2025 02:19
Signed-off-by: keithfz <kzeto4@gmail.com>
Signed-off-by: keithfz <kzeto4@gmail.com>
arkodg
arkodg previously approved these changes Jun 26, 2025
Copy link
Contributor

@arkodg arkodg left a comment

Choose a reason for hiding this comment

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

LGTM thanks !

@arkodg arkodg requested review from a team June 26, 2025 22:31
@arkodg arkodg added this to the v1.5.0-rc.1 Release milestone Jun 26, 2025
Signed-off-by: Keith <kzeto4@gmail.com>
@zirain
Copy link
Member

zirain commented Jul 2, 2025

/retest

Copy link
Member

@zirain zirain left a comment

Choose a reason for hiding this comment

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

Thanks!

@arkodg arkodg merged commit 393e2b4 into envoyproxy:main Jul 3, 2025
48 of 50 checks passed
tjvdmolen pushed a commit to tjvdmolen/gateway that referenced this pull request Jul 11, 2025
…id sentinel or cluster config (envoyproxy#6394)

* Update redis url validations to accept comma delimited list of names/hosts.

Signed-off-by: keithfz <kzeto4@gmail.com>
Signed-off-by: Tjeerd Jan van der Molen <34071+tjvdmolen@users.noreply.github.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.

Use Redis Sentinel for Global Ratelimiting

4 participants