Skip to content

Added support for dedicated environment variable for redis password

I started using glitchtip with redis cluster with multiple sentinels. Previously password for redis should be specified both in REDIS_URL and CELERY_BROKER_URL which complicates secret management.

This MR adding new environment variable CELERY_BROKER_PASSWORD for celery redis password, defaulting to REDIS_PASSWORD if not specified. And env REDIS_PASSWORD is set up in cache OPTIONS if specified.

This allows to have following sentinel url params without specifying redis password in url:

CELERY_BROKER_URL: 'sentinel://192.168.3.2:26382/1;sentinel://192.168.3.2:26381/1;sentinel://192.168.3.2:26380/1'
REDIS_URL: 'redis://redismaster/1'
REDIS_PASSWORD: 'myredispassword'
# Or specify password for celery only
# CELERY_BROKER_PASSWORD: 'myredispassword'

Merge request reports

Loading