hyarkoni-DN opened a new issue, #2767:
URL: https://github.com/apache/apisix-ingress-controller/issues/2767

   ### Current Behavior
   
   `apisix-ingress-controller` writes status conditions on `HTTPRoute`, 
`UDPRoute`, `TCPRoute`, and `GRPCRoute` parent rows with `observedGeneration: 
0` instead of the live object's `metadata.generation`. The `metav1.Condition` 
convention is that `observedGeneration` reflects the spec generation the 
controller processed; consumers compare it to `metadata.generation` to tell 
whether the status reflects the current spec.
   
   This behavior is not exhibited in the old CRDs like ApisixRoute, they are in 
line with the standard behavior.
   
   ### Expected Behavior
   
   APISIX IC should set the route's `observedGeneration` to the generation it 
observes. Notably, this is already the case with the old CRDs (such as 
ApisixRoute)
   
   - 
[`k8s.io/apimachinery/pkg/apis/meta/v1.Condition`](https://pkg.go.dev/k8s.io/apimachinery/pkg/apis/meta/v1#Condition)
   
     > `ObservedGeneration` represents the `.metadata.generation` that the 
condition was set based upon. For instance, if `.metadata.generation` is 
currently 12, but the `.status.conditions[x].observedGeneration` is 9, the 
condition is out of date with respect to the current state of the instance.
   
   - [Kubernetes API 
conventions](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties)
 — controllers must stamp `observedGeneration` from `metadata.generation` when 
reconciling the spec.
   
   
   ### Error Logs
   
   _No response_
   
   ### Steps to Reproduce
   
   1. Deploy a Gateway and an HTTPRoute (parent attached to the Gateway).
   2. Trigger an ADC sync failure, then restore — for instance, point the 
APISIX LB at an invalid `ExternalName`, then set it to the right one again.
   3. Inspect the route's `observedGeneration` on the parent's `Accepted` 
condition:
      ```yaml
      metadata:
        generation: 1
      status:
        parents:
        - conditions:
          - type: Accepted
            status: "True"
            reason: Accepted
            observedGeneration: 0   # ← should be 1
      ```
   
   ### Environment
   
   - `apisix-ingress-controller` master or 2.0.1
   - Kubernetes 1.30
   


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