pirmaryinfo fup

This commit is contained in:
2025-07-22 13:36:12 +02:00
parent 867fd7cb1d
commit a428e0d12f
2 changed files with 11 additions and 1 deletions

View File

@ -16,11 +16,14 @@ pingSentinel() {
getPrimaryInfo() {
masterName=${VALKEY_MASTER_NAME:-"mymaster"}
info=$(valkey-cli --csv -h ${VALKEY_HEADLESS_SERVICE} -p ${VALKEY_SENTINEL_PORT} sentinel get-primary-addr-by-name "${masterName}"| \
awk -F ',' '{ gsub(/"/,"",$0); print $1 " " $2 }')
if [ -z "${info}" ]; then
echo "Failed to get primary info for master '${masterName}'"
return 1
getPrimaryInfo
#return 1
fi
if [[ "${info}" =~ /^NULL/ ]]; then
getPrimaryInfo

View File

@ -91,6 +91,9 @@ spec:
- --no-overwrite
- replication.conf.orig
- sentinel.conf.orig
env:
- name: VALKEY_MASTER_NAME
value: "mymaster"
envFrom:
- configMapRef:
name: valkey-env
@ -119,6 +122,8 @@ spec:
env:
- name: VALKEY_ROLE
value: "replication"
- name: VALKEY_MASTER_NAME
value: "mymaster"
envFrom:
- configMapRef:
name: valkey-env
@ -206,6 +211,8 @@ spec:
value: "yes"
- name: VALKEY_SENTINEL_TLS_ENABLED
value: "no"
- name: VALKEY_MASTER_NAME
value: "mymaster"
envFrom:
- configMapRef:
name: valkey-env