AlinsRan commented on code in PR #2846:
URL:
https://github.com/apache/apisix-ingress-controller/pull/2846#discussion_r3780474283
##########
internal/controller/gateway_controller.go:
##########
@@ -194,10 +194,14 @@ func (r *GatewayReconciler) Reconcile(ctx
context.Context, req ctrl.Request) (ct
msg: "gateway proxy not found",
}
} else {
- for _, addr := range gatewayProxy.Spec.StatusAddress {
- if addr == "" {
- continue
- }
+ statusAddresses, err := r.resolveStatusAddresses(ctx,
&gatewayProxy)
+ if err != nil {
+ // fail the reconcile so a missing or invalid publish
Service retries
+ // with backoff, mirroring the Ingress status path
+ r.Log.Error(err, "failed to resolve gateway status
addresses", "gateway", req.NamespacedName)
+ return ctrl.Result{}, err
Review Comment:
This returns before `r.Provider.Update` (L234), so a `publishService` that
cannot be resolved — a typo, or the Service not created yet — stops the Gateway
from being pushed to APISIX at all. A status-only problem becomes a data plane
outage.
--
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]