fix: use gateway ip set in zlangateway lable
parent
c51c400a4b
commit
924c24b16b
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue