Skip to content
  • Stan Hu's avatar
    Support password authentication for Redis Sentinel · 0fe2bac2
    Stan Hu authored and Balasankar 'Balu' C's avatar Balasankar 'Balu' C committed
    This commit adds a separate password parameter for each Sentinel group
    and enables GitLab Rails, Workhorse, and `gitlab-kas` to use a
    password specified in `requirepass` in the Sentinel configuration:
    
    ```ruby
    gitlab_rails['redis_sentinels_password']
    gitlab_rails['redis_cache_sentinels_password']
    gitlab_rails['redis_queues_sentinels_password']
    gitlab_rails['redis_shared_state_sentinels_password']
    gitlab_rails['redis_trace_chunks_sentinels_password']
    gitlab_rails['redis_actioncable_sentinels_password']
    gitlab_rails['redis_rate_limiting_sentinels_password']
    gitlab_rails['redis_sessions_sentinels_password']
    gitlab_rails['redis_cluster_rate_limiting_sentinels_password']
    gitlab_rails['redis_repository_cache_sentinels_password']
    ```
    
    We could avoid these extra configuration parameters by having the
    admin specify a `password` parameter for each host/port combination in
    `redis_sentinels`, `redis_cache_sentinels`, etc. However, this would
    add much duplication in the configuration and different passwords
    aren't actually supported by Redis Sentinel. gitlab-kas also expects a
    single Sentinel password stored in the `sentinel_password_file`
    configuration parameter.
    
    Relates to gitlab#235938
    
    Changelog: added
    0fe2bac2