fix: log only if updating
This commit is contained in:
@@ -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"
|
||||
)
|
||||
|
||||
if annotated_ips != external_ipset:
|
||||
logger.debug(f"Current annotation: {current_annotation}")
|
||||
logger.debug(f"Target annotation: {target_annotation}")
|
||||
if annotated_ips != external_ipset:
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user