Skip to content

Support sentinel-password-in-url for workhorse go-redis client

Sylvester Chin requested to merge sc1-workhorse-sentinel-password-in-url into master

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

  1. Spin up redis sentinel with password (you can use https://gitlab.com/schin1/redis-sentinel-setup)

  2. Update workhorse/config.toml and set export GITLAB_WORKHORSE_FF_GO_REDIS_ENABLED=true in env.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"
  1. 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.

Edited by Sylvester Chin

Merge request reports