diff --git a/resources/node/files/conf/replication.conf.tpl b/resources/node/files/conf/replication.conf.tpl index 6eaec23..7b50acc 100644 --- a/resources/node/files/conf/replication.conf.tpl +++ b/resources/node/files/conf/replication.conf.tpl @@ -1,5 +1,5 @@ {{- $hostname := env "HOSTNAME" }} -{{- $service := env "VALKEY_SERVICE" }} +{{- $service := env "VALKEY_HEADLESS_SERVICE" }} {{- $namespace := env "NAMESPACE" }} {{- $port := env "VALKEY_PORT" }} {{- $sentinel_port := env "VALKEY_SENTINEL_PORT" }} diff --git a/resources/node/files/conf/replication.conf.tpl.full b/resources/node/files/conf/replication.conf.tpl.full index 20b18c5..f0720b4 100644 --- a/resources/node/files/conf/replication.conf.tpl.full +++ b/resources/node/files/conf/replication.conf.tpl.full @@ -1,5 +1,5 @@ {{- $hostname := env "HOSTNAME" }} -{{- $service := env "VALKEY_SERVICE" }} +{{- $service := env "VALKEY_HEADLESS_SERVICE" }} {{- $namespace := env "NAMESPACE" }} {{- $port := env "VALKEY_PORT" }} {{- $sentinel_port := env "VALKEY_SENTINEL_PORT" }} diff --git a/resources/node/files/conf/sentinel.conf.tpl b/resources/node/files/conf/sentinel.conf.tpl index 40b2007..fcc6aff 100644 --- a/resources/node/files/conf/sentinel.conf.tpl +++ b/resources/node/files/conf/sentinel.conf.tpl @@ -1,5 +1,5 @@ {{- $hostname := env "HOSTNAME" }} -{{- $service := env "VALKEY_SERVICE" }} +{{- $service := env "VALKEY_HEADLESS_SERVICE" }} {{- $namespace := env "NAMESPACE" }} {{- $port := env "VALKEY_PORT" }} {{- $name := env "VALKEY_NAME" }} diff --git a/resources/node/files/scripts/common.sh b/resources/node/files/scripts/common.sh index 4d18377..391b885 100644 --- a/resources/node/files/scripts/common.sh +++ b/resources/node/files/scripts/common.sh @@ -2,7 +2,7 @@ pingSentinel() { - svc=${VALKEY_SERVICE:-"localhost"} + svc=${VALKEY_HEADLESS_SERVICE:-"localhost"} resp=$(timeout -s 15 $1 \ valkey-cli \ @@ -15,7 +15,7 @@ pingSentinel() { } getPrimaryInfo() { - valkey-cli --csv -h ${VALKEY_SERVICE} -p ${VALKEY_SENTINEL_PORT} sentinel get-primary-addr-by-name "mymaster"| \ + valkey-cli --csv -h ${VALKEY_HEADLESS_SERVICE} -p ${VALKEY_SENTINEL_PORT} sentinel get-primary-addr-by-name "mymaster"| \ awk -F ',' '{ gsub(/"/,"",$0); print $1 " " $2 }' return ${?} } @@ -76,6 +76,6 @@ sentinelIsMaster() { sentinelReset() { # Reset the sentinel - valkey-cli -h ${VALKEY_SERVICE} -p ${VALKEY_SENTINEL_PORT} sentinel reset "${1}" + valkey-cli -h ${VALKEY_HEADLESS_SERVICE} -p ${VALKEY_SENTINEL_PORT} sentinel reset "${1}" return $? } \ No newline at end of file diff --git a/resources/node/files/scripts/pre-stop.sh b/resources/node/files/scripts/pre-stop.sh index 67e9b8c..2bbc799 100644 --- a/resources/node/files/scripts/pre-stop.sh +++ b/resources/node/files/scripts/pre-stop.sh @@ -8,7 +8,7 @@ vcli() { # Run Sentinel command vcli-sentinel() { - valkey-cli -h "$VALKEY_SERVICE" -p "$VALKEY_SENTINEL_PORT" sentinel "$@" + valkey-cli -h "${VALKEY_HEADLESS_SERVICE}" -p "${VALKEY_SENTINEL_PORT}" sentinel "$@" return $? } diff --git a/resources/node/files/scripts/start-node.sh b/resources/node/files/scripts/start-node.sh index d14f967..10dc695 100644 --- a/resources/node/files/scripts/start-node.sh +++ b/resources/node/files/scripts/start-node.sh @@ -3,7 +3,7 @@ pingSentinel() { resp=$(timeout -s 15 $1 \ valkey-cli \ - -h ${VALKEY_SERVICE} \ + -h ${VALKEY_HEADLESS_SERVICE} \ -p ${VALKEY_SENTINEL_PORT} \ ping) ret=${?} @@ -12,7 +12,7 @@ pingSentinel() { } getPrimaryInfo() { - valkey-cli -t 15 --csv -h ${VALKEY_SERVICE} -p ${VALKEY_SENTINEL_PORT} sentinel get-primary-addr-by-name "mymaster"| \ + valkey-cli -t 15 --csv -h ${VALKEY_HEADLESS_SERVICE} -p ${VALKEY_SENTINEL_PORT} sentinel get-primary-addr-by-name "mymaster"| \ awk -F ',' '{ gsub(/"/,"",$0); print $1 " " $2 }' return ${?} }