Support sentinel-password-in-url for workhorse go-redis client
What does this MR do and why?
This MR adds support for password-in-url sentinel addresses. As discussed in #421656 (comment 1617616890)
This resolves #422820 (closed). Note: changelog omitted as go-redis is still behind feature flag.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
-
Spin up redis sentinel with password (you can use https://gitlab.com/schin1/redis-sentinel-setup)
-
Update
workhorse/config.toml
and setexport GITLAB_WORKHORSE_FF_GO_REDIS_ENABLED=true
inenv.runit
.
➜ gitlab git:(sc1-workhorse-sentinel-password-in-url) ✗ cat workhorse/config.toml
[redis]
DB = 0
Sentinel = [
'redis://:password456@localhost:26480',
'redis://:password456@localhost:26481',
'redis://:password456@localhost:26482',
]
SentinelMaster = "mymaster"
Password = "password123"
- Build and run this on gdk and verify in the logs that redis is connected
gdk restart gitlab-workhorse
gdk tail gitlab-workhorse
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Sylvester Chin