fix: log only if updating

main
Malar Invention 2025-01-12 19:41:05 +05:30
parent 799071601e
commit bb50947391
1 changed files with 2 additions and 3 deletions

View File

@ -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)