From 924c24b16bff1edde14fdad635a028cf5069118b Mon Sep 17 00:00:00 2001 From: Malar Invention Date: Sun, 12 Jan 2025 17:35:42 +0530 Subject: [PATCH] fix: use gateway ip set in zlangateway lable --- node_external_ip_controller_async.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node_external_ip_controller_async.py b/node_external_ip_controller_async.py index c5833fe..01dc675 100644 --- a/node_external_ip_controller_async.py +++ b/node_external_ip_controller_async.py @@ -25,7 +25,9 @@ async def update_service_annotation(v1, service, external_ips): service_obj = await v1.read_namespaced_service(service_name, namespace) current_annotation = service_obj.metadata.annotations.get(ANNOTATION_KEY) - target_annotation = ",".join(external_ips) + "," + ZERO_GATEWAY_IP + zlan_gateway_ip = service_obj.metadata.labels.get(SERVICE_LABEL_KEY) + logger.debug(f"Zlan Gateway IP: {zlan_gateway_ip}") + target_annotation = ",".join(external_ips) + "," + zlan_gateway_ip logger.debug(f"Current annotation: {current_annotation}") logger.debug(f"Target annotation: {target_annotation}") if current_annotation != target_annotation: