You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by al...@apache.org on 2026/05/26 05:42:09 UTC

(apisix-ingress-controller) branch master updated: fix: update observedGeneration on Gateway-API route status conditions (#2768)

This is an automated email from the ASF dual-hosted git repository.

AlinsRan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-ingress-controller.git


The following commit(s) were added to refs/heads/master by this push:
     new 7d8aa4ea fix: update observedGeneration on Gateway-API route status conditions (#2768)
7d8aa4ea is described below

commit 7d8aa4ea754e70a568c14f837cbd444a115579ed
Author: hyarkoni-DN <hy...@drivenets.com>
AuthorDate: Tue May 26 08:42:03 2026 +0300

    fix: update observedGeneration on Gateway-API route status conditions (#2768)
    
    Signed-off-by: hyarkoni-DN <hy...@drivenets.com>
---
 internal/provider/apisix/status.go | 4 ++++
 test/e2e/gatewayapi/status.go      | 1 +
 2 files changed, 5 insertions(+)

diff --git a/internal/provider/apisix/status.go b/internal/provider/apisix/status.go
index 9a2824a8..864b7e79 100644
--- a/internal/provider/apisix/status.go
+++ b/internal/provider/apisix/status.go
@@ -123,6 +123,7 @@ func (d *apisixProvider) updateStatus(nnk types.NamespacedNameKind, condition me
 			Resource:       &gatewayv1.HTTPRoute{},
 			Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
 				cp := obj.(*gatewayv1.HTTPRoute).DeepCopy()
+				condition.ObservedGeneration = cp.GetGeneration()
 				gatewayNs := cp.GetNamespace()
 				for i, ref := range cp.Status.Parents {
 					ns := gatewayNs
@@ -158,6 +159,7 @@ func (d *apisixProvider) updateStatus(nnk types.NamespacedNameKind, condition me
 			Resource:       &gatewayv1alpha2.UDPRoute{},
 			Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
 				cp := obj.(*gatewayv1alpha2.UDPRoute).DeepCopy()
+				condition.ObservedGeneration = cp.GetGeneration()
 				gatewayNs := cp.GetNamespace()
 				for i, ref := range cp.Status.Parents {
 					ns := gatewayNs
@@ -193,6 +195,7 @@ func (d *apisixProvider) updateStatus(nnk types.NamespacedNameKind, condition me
 			Resource:       &gatewayv1alpha2.TCPRoute{},
 			Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
 				cp := obj.(*gatewayv1alpha2.TCPRoute).DeepCopy()
+				condition.ObservedGeneration = cp.GetGeneration()
 				gatewayNs := cp.GetNamespace()
 				for i, ref := range cp.Status.Parents {
 					ns := gatewayNs
@@ -228,6 +231,7 @@ func (d *apisixProvider) updateStatus(nnk types.NamespacedNameKind, condition me
 			Resource:       &gatewayv1.GRPCRoute{},
 			Mutator: status.MutatorFunc(func(obj client.Object) client.Object {
 				cp := obj.(*gatewayv1.GRPCRoute).DeepCopy()
+				condition.ObservedGeneration = cp.GetGeneration()
 				gatewayNs := cp.GetNamespace()
 				for i, ref := range cp.Status.Parents {
 					ns := gatewayNs
diff --git a/test/e2e/gatewayapi/status.go b/test/e2e/gatewayapi/status.go
index da89c6bb..35290622 100644
--- a/test/e2e/gatewayapi/status.go
+++ b/test/e2e/gatewayapi/status.go
@@ -170,6 +170,7 @@ spec:
 					And(
 						ContainSubstring(`status: "True"`),
 						ContainSubstring(`reason: Accepted`),
+						ContainSubstring(`observedGeneration: 1`),
 					),
 				)