janiussyafiq opened a new pull request, #2846:
URL: https://github.com/apache/apisix-ingress-controller/pull/2846

   ### Type of change:
   
   - [x] Bugfix
   
   ### What this PR does / why we need it:
   
   Fixes #2800.
   
   `Gateway.status.addresses` was only populated from 
`GatewayProxy.spec.statusAddress`.
   When `spec.publishService` is set instead, the Gateway published no address, 
even though the Ingress status path already falls back to the publish Service's 
LoadBalancer address.
   
   This PR extracts shared publish-Service resolution helpers, makes 
`Gateway.status.addresses` fall back to the LoadBalancer address of 
`spec.publishService` when `statusAddress` is empty (`statusAddress` still wins 
when both are set), and refactors the Ingress LoadBalancer status branch onto 
the same helpers.
   
   Note: addresses are typed with `net.ParseIP` (existing convention), so a 
LoadBalancer ingress entry whose `hostname` field holds a literal IP string is 
published as an IP-type address.
   
   A follow-up PR will add a `publishService` field index and a Service watch 
on both reconcilers, so a reassigned LoadBalancer address re-triggers status 
reconciliation instead of waiting for an unrelated event.
   
   ### Pre-submission checklist:
   
   - [x] Did you explain what problem does this PR solve? Or what new features 
have been added?
   - [x] Have you added corresponding test cases?
   - [ ] Have you modified the corresponding document?
   - [x] Is this PR backward compatible?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to