88import syslog
99
1010from collections import defaultdict
11- from ctrmgr .ctrmgr_iptables import iptable_proxy_rule_upd
1211
1312from swsscommon import swsscommon
1413from sonic_py_common import device_info
8887JOIN_LATENCY = "join_latency_on_boot_seconds"
8988JOIN_RETRY = "retry_join_interval_seconds"
9089LABEL_RETRY = "retry_labels_update_seconds"
91- USE_K8S_PROXY = "use_k8s_as_http_proxy"
9290
9391remote_ctr_config = {
9492 JOIN_LATENCY : 10 ,
9593 JOIN_RETRY : 10 ,
96- LABEL_RETRY : 2 ,
97- USE_K8S_PROXY : ""
94+ LABEL_RETRY : 2
9895 }
9996
10097def log_debug (m ):
@@ -312,9 +309,6 @@ def __init__(self, server):
312309
313310 self .start_time = datetime .datetime .now ()
314311
315- if remote_ctr_config [USE_K8S_PROXY ] == "y" :
316- iptable_proxy_rule_upd (self .cfg_server [CFG_SER_IP ])
317-
318312 if not self .st_server [ST_FEAT_UPDATE_TS ]:
319313 # This is upon system start. Sleep 10m before join
320314 self .start_time += datetime .timedelta (
@@ -342,9 +336,6 @@ def on_config_update(self, key, op, data):
342336 log_debug ("Received config update: {}" .format (str (data )))
343337 self .cfg_server = cfg_data
344338
345- if remote_ctr_config [USE_K8S_PROXY ] == "y" :
346- iptable_proxy_rule_upd (self .cfg_server [CFG_SER_IP ])
347-
348339 if self .pending :
349340 tnow = datetime .datetime .now ()
350341 if tnow < self .start_time :
@@ -368,7 +359,7 @@ def handle_update(self):
368359
369360 ip = self .cfg_server [CFG_SER_IP ]
370361 disable = self .cfg_server [CFG_SER_DISABLE ] != "false"
371-
362+
372363 pre_state = dict (self .st_server )
373364 log_debug ("server: handle_update: disable={} ip={}" .format (disable , ip ))
374365 if disable or not ip :
0 commit comments