Allow to configure Redis Sentinel via environment variables. This change does not break existing configurations.
Contrast to Current Behavior
Cannot configure Redis Sentinels without using extra config mechanism.
Discussion: Benefits and Drawbacks
If environment variable REDIS_SENTINELS or REDIS_CACHE_SENTINELS are not defined, the resulting configuration will be an empty list []. Upstream netbox also defaults it to [] (redis tasks, redis cache).
Related Issue: None
New Behavior
Allow to configure Redis Sentinel via environment variables. This change does not break existing configurations.
Contrast to Current Behavior
Cannot configure Redis Sentinels without using extra config mechanism.
Discussion: Benefits and Drawbacks
If environment variable
REDIS_SENTINELS
orREDIS_CACHE_SENTINELS
are not defined, the resulting configuration will be an empty list[]
. Upstream netbox also defaults it to[]
(redis tasks, redis cache).I chose to not default
REDIS["cache"]["SENTINELS"]
to redis tasks Sentinels (as it is done forHOST
andPORT
for example), becauseSENTINELS
always takes precedence over direct connection. And one may want to use Sentinels for a redis instance but not the other one.Benefits:
Changes to the Wiki
I don't think any
Proposed Release Note Entry
Allow to configure Redis Sentinels via environment variables
Double Check
develop
branch.