Skip to content

Commit 6091967

Browse files
fix: explicitly pass active-active env vars (#90)
1 parent 0698309 commit 6091967

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

init.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,14 @@ log_level=${LOG_LEVEL:-warn}
2626
marathon_host=${MARATHON_HOST}
2727
sleep_duration=${MARATHON_POLL_INTERVAL:-5}
2828
force_reload_interval_s=${FORCE_RELOAD_INTERVAL_S:--1}
29+
active_active_api_gateway_token=${ACTIVE_ACTIVE_API_GATEWAY_TOKEN}
30+
active_active_namespace_0=${ACTIVE_ACTIVE_NAMESPACE_0}
31+
active_active_namespace_1=${ACTIVE_ACTIVE_NAMESPACE_1}
32+
active_active_set_upstream_interval=${ACTIVE_ACTIVE_SET_UPSTREAM_INTERVAL}
33+
active_active_status_check_interval=${ACTIVE_ACTIVE_STATUS_CHECK_INTERVAL}
34+
active_active_upstreams_csv_path=${ACTIVE_ACTIVE_UPSTREAMS_CSV_PATH}
35+
active_active_weight_0=${ACTIVE_ACTIVE_WEIGHT_0}
36+
active_active_weight_1=${ACTIVE_ACTIVE_WEIGHT_1}
2937
active_active=${ACTIVE_ACTIVE:-false}
3038

3139
#
@@ -125,4 +133,4 @@ else
125133
fi
126134

127135
echo " ... using log level: '${log_level}'. Override it with -e 'LOG_LEVEL=<level>' "
128-
sudo -E api-gateway -p /usr/local/api-gateway/ -c /etc/api-gateway/api-gateway.conf -g "daemon off; error_log /dev/stderr ${log_level}; env ACTIVE_ACTIVE=${active_active};"
136+
sudo api-gateway -p /usr/local/api-gateway/ -c /etc/api-gateway/api-gateway.conf -g "daemon off; error_log /dev/stderr ${log_level}; env ACTIVE_ACTIVE=${active_active}; env ACTIVE_ACTIVE_API_GATEWAY_TOKEN=${active_active_api_gateway_token}; env ACTIVE_ACTIVE_NAMESPACE_0=${active_active_namespace_0}; env ACTIVE_ACTIVE_NAMESPACE_1=${active_active_namespace_1}; env ACTIVE_ACTIVE_SET_UPSTREAM_INTERVAL=${active_active_set_upstream_interval}; env ACTIVE_ACTIVE_STATUS_CHECK_INTERVAL=${active_active_status_check_interval}; env ACTIVE_ACTIVE_UPSTREAMS_CSV_PATH=${active_active_upstreams_csv_path}; env ACTIVE_ACTIVE_WEIGHT_0=${active_active_weight_0}; env ACTIVE_ACTIVE_WEIGHT_1=${active_active_weight_1};"

0 commit comments

Comments
 (0)