pub async fn resolve_ips_from_gateways(
client: &Client,
route_namespace: &str,
parent_refs: &[ParentReference],
gateway_services: &BTreeMap<String, GatewayServiceTarget>,
) -> Option<Vec<String>>Expand description
Follows a route’s parentRefs back to the serving Gateway(s) and resolves
their external IP(s).
For each parentRef that resolves to a Gateway, Scout resolves the IP by:
- reading the Gateway’s
status.addresses(IP-typed) — no extra configuration required; works as long as the gateway controller populates its own status. - if
status.addressesis empty, looking up the gateway class in the operator-configuredgateway_servicesmap and reading the external IP of the mapped LoadBalancer Service.
Returns the de-duplicated IPs in discovery order, or None when nothing
resolves. Individual lookup failures are logged and skipped so one
unreachable Gateway does not blank out the others.
§Arguments
client- Local cluster client (Gateways and Services live on the workload cluster)route_namespace- Namespace of the route, used as the default parentRef namespaceparent_refs- The route’sspec.parentRefsgateway_services- Optional fallback map:gatewayClass → Serviceused only whenstatus.addressesis absent