Skip to content

Commit

Permalink
add configure w
Browse files Browse the repository at this point in the history
Signed-off-by: Shubham Gupta <[email protected]>
  • Loading branch information
shubham-cmyk committed Sep 14, 2023
1 parent b179e9f commit a7693ee
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,15 @@ external_config() {
start_redis() {
if [[ "${SETUP_MODE}" == "cluster" ]]; then
echo "Starting redis service in cluster mode....."
if [[ "${NODEPORT}" == "true" ]]; then
CLUSTER_ANNOUNCE_IP="node-ip-$(hostname)"
else
CLUSTER_ANNOUNCE_IP="${POD_IP}"
fi

if [[ "${REDIS_MAJOR_VERSION}" != "v7" ]]; then
redis-server /etc/redis/redis.conf \
--cluster-announce-ip "${POD_IP}" \
--cluster-announce-ip "${CLUSTER_ANNOUNCE_IP}" \
--cluster-announce-hostname "${POD_HOSTNAME}"
else
redis-server /etc/redis/redis.conf
Expand Down

0 comments on commit a7693ee

Please sign in to comment.