How to disable sentinel config rewrite?

I run redis-sentinel with nomad, configuration is managed in git and copied inside sentinel container on start, but then it does config rewrite and sentinel auth-pass sentinel auth-user <master> <creds> endup in config file which is in plaintext and accessible via UI

Redis [QUESTION] Sentinel: disable config rewrite

Comment From: nahsi

As a workaround I mount host volume to /data with sentinel.conf file with only one option: include /local/sentinel.conf and run sentinel with redis-sentinel /data/sentinel.conf.

This is a bit hacky but better than having passwords in plaintext or live without convinience of configuration in git.

Comment From: shadjiiski

As a workaround I mount host volume to /data with sentinel.conf file with only one option: include /local/sentinel.conf and run sentinel with redis-sentinel /data/sentinel.conf.

This approach does not appear to resolve the issue on my setup. I have moved the requirepass and sentinel auth-pass directives to a sentinel-creds.conf file and added include sentinel-creds.conf in my sentinel.conf. At startup the sentinel appears to rewrite the config - it leaves the include in place but also shows the plaintext passwords:

...
include /opt/bitnami/redis-sentinel/etc/sentinel-credentials.conf
...
# Generated by CONFIG REWRITE
...
requirepass "sentinelpass"
sentinel auth-pass redis-master redispass
...

Comment From: ostrolucky

My use case is to have sentinel config in git of non-docker environment. Every time redis sentinel runs, it overwrites current working directly there. That's undesired, as working directory depends on which user is running the project.

So I had to add a notice in my README so that people don't accidentally commit this file https://github.com/snc/SncRedisBundle?tab=readme-ov-file#contributing