File tree 2 files changed +10
-1
lines changed
docker-images/valkey/valkey-entrypoint
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ echo "Starting Valkey server in ${VALKEY_NODE_TYPE:-valkey} mode"
17
17
18
18
args=()
19
19
if [[ ${VALKEY_NODE_TYPE:- } != " sentinel" ]]; then
20
- args=( " ${args[@]} " --user valkey )
20
+ args=(" ${args[@]} " --user valkey)
21
21
fi
22
22
23
23
exec /usr/local/bin/docker-entrypoint.sh " ${args[@]} " " $@ "
Original file line number Diff line number Diff line change @@ -17,6 +17,9 @@ run_sentinel_cmd() {
17
17
shift
18
18
local cmd_output
19
19
20
+ export VALKEY_PASSWORD=" ${VALKEY_SENTINEL_PASSWORD:- } "
21
+ export REDISCLI_AUTH=" ${VALKEY_SENTINEL_PASSWORD:- } "
22
+
20
23
# shellcheck disable=SC2086
21
24
cmd_output=$( valkey-cli $common_args -h " $sentinel_host " -p 26379 sentinel " $@ " )
22
25
@@ -48,6 +51,9 @@ get_master_addr_by_name() {
48
51
local sentinel_host=" $1 "
49
52
local valkey_name=" $2 "
50
53
54
+ export VALKEY_PASSWORD=" ${VALKEY_SENTINEL_PASSWORD:- } "
55
+ export REDISCLI_AUTH=" ${VALKEY_SENTINEL_PASSWORD:- } "
56
+
51
57
# shellcheck disable=SC2086
52
58
output=$( valkey-cli $common_args --json -h " $sentinel_host " -p 26379 sentinel get-master-addr-by-name " $valkey_name " )
53
59
echo " $output "
@@ -56,6 +62,9 @@ get_master_addr_by_name() {
56
62
wait_for_sentinel () {
57
63
local sentinel_host=" $1 "
58
64
65
+ export VALKEY_PASSWORD=" ${VALKEY_SENTINEL_PASSWORD:- } "
66
+ export REDISCLI_AUTH=" ${VALKEY_SENTINEL_PASSWORD:- } "
67
+
59
68
echo " Waiting for Valkey Sentinel to be ready"
60
69
local timeout=$(( SECONDS + STARTUP_TIMEOUT))
61
70
You can’t perform that action at this time.
0 commit comments