Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support cluster announce params when redis cluster use nodeport #66

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ port_setup() {
{
echo port "${REDIS_PORT}"
} >> /etc/redis/redis.conf

if [[ "${NODEPORT}" == "true" ]]; then
{
echo cluster-announce-port "${CLUSTER_ANNOUNCE_PORT}"
echo cluster-announce-bus-port "${CLUSTER_ANNOUNCE_BUS_PORT}"
} >> /etc/redis/redis.conf
fi
}

external_config() {
Expand All @@ -113,7 +120,7 @@ start_redis() {
if [[ "${SETUP_MODE}" == "cluster" ]]; then
echo "Starting redis service in cluster mode....."
if [[ "${NODEPORT}" == "true" ]]; then
CLUSTER_ANNOUNCE_IP_VAR="node_ip_$(hostname | tr '-' '_')"
CLUSTER_ANNOUNCE_IP_VAR="HOST_IP"
CLUSTER_ANNOUNCE_IP="${!CLUSTER_ANNOUNCE_IP_VAR}"
else
CLUSTER_ANNOUNCE_IP="${POD_IP}"
Expand Down