diff --git a/node_external_ip_controller_async.py b/node_external_ip_controller_async.py index eb94cd0..adcbcbf 100644 --- a/node_external_ip_controller_async.py +++ b/node_external_ip_controller_async.py @@ -48,10 +48,9 @@ async def update_service_annotation(v1, service, external_ipset): logger.debug( f"Invalid Zlan Gateway IP: {zlan_gateway_ip}, excluding from target annotation" ) - - logger.debug(f"Current annotation: {current_annotation}") - logger.debug(f"Target annotation: {target_annotation}") if annotated_ips != external_ipset: + logger.debug(f"Current annotation: {current_annotation}") + logger.debug(f"Target annotation: {target_annotation}") body = {"metadata": {"annotations": {ANNOTATION_KEY: target_annotation}}} logger.debug(f"Patching service {service_name} with body: {body}") await v1.patch_namespaced_service(service_name, namespace, body)