@@ -26,7 +26,7 @@ test || __() {
2626
2727redis_announce_host_value=" "
2828redis_announce_port_value=" "
29- redis_default_service_port=6379
29+ redis_default_service_port=${INNER_SERVICE_PORT :- 6379}
3030if [ -f /data/.fixed_pod_ip_enabled ]; then
3131 # if the file /data/.fixed_pod_ip_enabled exists, it means that the redis pod is running in fixed pod ip mode.
3232 FIXED_POD_IP_ENABLED=true
@@ -41,15 +41,6 @@ load_common_library() {
4141 source " ${common_library_file} "
4242}
4343
44- init_redis_service_port () {
45- if env_exist SERVICE_PORT; then
46- redis_default_service_port=$SERVICE_PORT
47- fi
48- if [ " $TLS_ENABLED " == " true" ]; then
49- redis_default_service_port=$NON_TLS_SERVICE_PORT
50- fi
51- }
52-
5344extract_lb_host_by_svc_name () {
5445 local svc_name=" $1 "
5546 for lb_composed_name in $( echo " $REDIS_LB_ADVERTISED_HOST " | tr ' ,' ' \n' ) ; do
@@ -223,12 +214,9 @@ get_master_addr_by_name(){
223214register_to_sentinel () {
224215 local sentinel_host=$1
225216 local master_name=$2
226- local sentinel_port=${SENTINEL_SERVICE_PORT :- 26379}
217+ local sentinel_port=${SENTINEL_INNER_SERVICE_PORT :- 26379}
227218 local redis_primary_host=$3
228219 local redis_primary_port=$4
229- if [ -n " $SENTINEL_NON_TLS_SERVICE_PORT " ]; then
230- sentinel_port=$SENTINEL_NON_TLS_SERVICE_PORT
231- fi
232220
233221 unset_xtrace_when_ut_mode_false
234222 # Check connectivity to sentinel host and redis primary host
@@ -316,7 +304,6 @@ register_to_sentinel_wrapper() {
316304 # get minimum lexicographical order pod name as default primary node (the same logic as redis initialize primary node selection)
317305 redis_default_primary_pod_name=$( min_lexicographical_order_pod " $REDIS_POD_NAME_LIST " )
318306 redis_default_primary_pod_fqdn=$( get_target_pod_fqdn_from_pod_fqdn_vars " $REDIS_POD_FQDN_LIST " " $redis_default_primary_pod_name " )
319- init_redis_service_port
320307 parse_redis_primary_announce_addr " $redis_default_primary_pod_name "
321308 if is_empty " $CUSTOM_SENTINEL_MASTER_NAME " ; then
322309 master_name=$REDIS_COMPONENT_NAME
0 commit comments