fix: use gateway ip set in zlangateway lable

main
Malar Invention 2025-01-12 17:35:42 +05:30
parent c51c400a4b
commit 924c24b16b
1 changed files with 3 additions and 1 deletions

View File

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