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: