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

   <!-- Please answer these questions before submitting a pull request -->
   
   ### Type of change:
   
   <!-- Please delete options that are not relevant. -->
   
   <!-- Select all the options from below that matches the type your PR best -->
   
   - [ ] Bugfix
   - [x] New feature provided
   - [ ] Improve performance
   - [ ] Backport patches
   - [ ] Documentation
   - [x] Refactor
   - [ ] Chore
   - [ ] CI/CD or Tests
   
   ### What this PR does / why we need it:
   
   Accurately report instance status.
   
   Errors are detected based on the status and error messages for each 
individual endpoint contained in the `endpoint_status` returned by the ADC, and 
these are logged in the newly added `status.conditions` field of the Gateway 
Proxy resource.
   The `status.conditions` conforms to the Kubernetes definition and is not a 
custom one. The `DataPlaneAvailable` condition is used to log node anomalies. 
When an anomaly occurs, the `reason` is set to `DataPlaneInstanceUnavailable`, 
and the `message` contains an aggregated error message.
   
   ```yaml
   # bad
   status:
     conditions:
     - type: DataPlaneAvailable
       status: "False"
       observedGeneration: 1
       lastTransitionTime: "2026-09-04T02:10:03Z"
       reason: DataPlaneInstanceUnavailable
       message: "1/2 gateway instance(s) failed to apply the last sync: 
http://unreachable-instance.invalid:9180: dial tcp: lookup 
unreachable-instance.invalid: server misbehaving"
   
   # good
   status:
     conditions:
     - type: DataPlaneAvailable
       status: "True"
       observedGeneration: 1
       lastTransitionTime: "2026-09-04T02:25:11Z"
       reason: DataPlaneAvailable
       message: ""
   ```
   
   In addition, errors at the per-endpoint level are reported as events and 
associated with the Gateway Proxy.
   
   ```
   Events:
     Type     Reason                        Age                 From            
 Message
     ----     ------                        ----                ----            
 -------
     Warning  DataPlaneInstanceUnavailable  8s (x23 over 12m)   apisix-provider 
 http://apisix-2:9180: dial tcp 10.244.0.12:9180: connect: connection refused
     Warning  DataPlaneInstanceUnavailable  8s (x23 over 12m)   apisix-provider 
 https://apisix-3:9180: tls: handshake failure
   ```
   
   ```yaml
   apiVersion: v1
   kind: Event
   metadata:
     name: gateway-proxy-partial-instance.17f2a3c1d0e5f6a7
     namespace: ns-e2e-test
   count: 23
   firstTimestamp: "2026-09-04T02:10:03Z"
   lastTimestamp: "2026-09-04T02:22:11Z"
   type: Warning
   reason: DataPlaneInstanceUnavailable
   message: "http://apisix-2:9180: dial tcp 10.244.0.12:9180: connect: 
connection refused"
   involvedObject:
     apiVersion: apisix.apache.org/v1alpha1
     kind: GatewayProxy
     name: gateway-proxy-partial-instance
     namespace: ns-e2e-test
   source:
     component: apisix-provider
   ```
   
   ### Pre-submission checklist:
   
   <!--
   Please follow the requirements:
   1. Use Draft if the PR is not ready to be reviewed
   2. Test is required for the feat/fix PR, unless you have a good reason
   3. Doc is required for the feat PR
   4. Use a new commit to resolve review instead of `push -f`
   5. Use "request review" to notify the reviewer once you have resolved the 
review
   -->
   
   - [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? **If it is not backward compatible, 
please discuss on the [mailing 
list](https://github.com/apache/apisix-ingress-controller#community) first**
   


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