fix: log only if updating
parent
799071601e
commit
bb50947391
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue